Previous essay: Using Axure in the requirements analysis tool, I shared that I made a axure component that makes it easy to make various UML diagrams in Axure.
Friends with Axure may find a problem, such as that all the folders in the Axure generated HTML site are open by default, and it is cumbersome to find the target file if there are too many files.
I want to solve this problem, and then play the initiative to add the "Close all nodes" function for this site.
Find the corresponding file: Install directory \defaultsettings\prototype_files\start.html, add some JS to this file, as follows:
<script type= "Text/javascript" >//Close all nodesfunctionCloseAll () {varOpennode = $ (' #sitemapTreeContainer ul:eq (0) '). Children ('. Sitemapexpandablenode ')); Closenode (Opennode);}//Close NodefunctionClosenode (node) {Node.each (function(i,e) {//Find child nodes if($ (E). Find (' ul:eq (0) '). Children ('. Sitemapexpandablenode '). length>0) { //RecursiveClosenode ($ (e). Find (' ul:eq (0) '). Children ('. Sitemapexpandablenode '))); } //Invoke Click event$ (E). Find ('. Sitemapminus:eq (0) '). Click (); });} $(function(){ //toolbar to add the "Close Node" button$ (' #sitemapToolbar div:eq (0) '). Append (' <a id= "Closenode" onclick= "CloseAll ();" Title= "Close node" > Close node </a> ');});</script>
This is how the resulting site works:
No style, more ugly, the need for friends can continue to transform, haha.
Add the ability to close all nodes for the HTML site generated by axure