CLIENT GUI Framework
[vnfsdk/refrepo.git] / portal-common / src / main / webapp / common / thirdparty / zTree / api / en / treeNode.iconSkin.html
1 <div class="apiDetail">\r
2 <div>\r
3         <h2><span>String</span><span class="path">treeNode.</span>iconSkin</h2>\r
4         <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>\r
5         <div class="desc">\r
6                 <p></p>\r
7                 <div class="longdesc">\r
8                         <p>The className of node's custom icon.</p>\r
9                         <p class="highlight_red">1. You need to modify the css, add the definition of className.</p>\r
10                         <p class="highlight_red">2. The css is simple, convenient, and support the parent node to switch icons when it is expanded or collapsed.</p>\r
11                         <p class="highlight_red">3. Recommend the use of CSS Sprites, can reduce repeating load the image, to avoid image flicker.</p>\r
12                         <p class="highlight_red">4. The 'iconSkin' support IE6 in zTree v3.x.</p>\r
13                         <p class="highlight_red">5. If you need to use image's URL to set the custom icon, please set the 'treeNode.icon' or 'treeNode.iconOpen' or 'treeNode.iconClose' attribute.</p>\r
14                         <p>Default: undefined</p>\r
15                 </div>\r
16         </div>\r
17         <h3>String Format</h3>\r
18         <div class="desc">\r
19         <p>The string about custom icon's className.</p>\r
20         </div>\r
21         <h3>Examples of css & treeNode</h3>\r
22         <h4>1. Set the custom icon</h4>\r
23         <pre xmlns=""><code>css example:\r
24 .ztree li span.button.diy01_ico_open, .ztree li span.button.diy01_ico_close{...}\r
25 \r
26 .ztree li span.button.diy02_ico_open{...}\r
27 .ztree li span.button.diy02_ico_close{...}\r
28 \r
29 .ztree li span.button.diy03_ico_docu{...}\r
30 \r
31 node's data example:\r
32 var nodes = [\r
33         //Only show one icon when it is expanded or collapsed.\r
34         { name:"Parent Node 1", iconSkin:"diy01"},\r
35 \r
36         //Show two icons when it is expanded or collapsed.\r
37         { name:"Parent Node 2", iconSkin:"diy02"},\r
38 \r
39         //the custom icon for leaf node\r
40         { name:"Leaf Node", iconSkin:"diy03"}\r
41 ]</code></pre>\r
42 </div>\r
43 </div>