Add the ability to close all nodes for the HTML site generated by axure

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.