CLIENT GUI Framework
[vnfsdk/refrepo.git] / portal-common / src / main / webapp / common / thirdparty / zTree / api / en / setting.view.showIcon.html
1 <div class="apiDetail">\r
2 <div>\r
3         <h2><span>Boolean / Function(treeId, treeNode)</span><span class="path">setting.view.</span>showIcon</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>Set to show or hide node icon.</p>\r
9                         <p>Default: true</p>\r
10                 </div>\r
11         </div>\r
12         <h3>Boolean Format</h3>\r
13         <div class="desc">\r
14         <p> true means: show node icon.</p>\r
15         <p> false means: hide node icon.</p>\r
16         </div>\r
17         <h3>Function Parameter Descriptions</h3>\r
18         <div class="desc">\r
19         <h4><b>treeId</b><span>String</span></h4>\r
20         <p>zTree unique identifier: <b class="highlight_red">treeId</b>, easy for users to control.</p>\r
21         <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>\r
22         <p>JSON data object of the node which need to show icon.</p>\r
23         <h4 class="topLine"><b>Return </b><span>Boolean</span></h4>\r
24         <p>Return value is same as 'Boolean Format'</p>\r
25         </div>\r
26         <h3>Examples of setting & function</h3>\r
27         <h4>1. Hide node icon</h4>\r
28         <pre xmlns=""><code>var setting = {\r
29         view: {\r
30                 showIcon: false\r
31         }\r
32 };\r
33 ......</code></pre>\r
34         <h4>2. Hide node icon which level=2</h4>\r
35         <pre xmlns=""><code>function showIconForTree(treeId, treeNode) {\r
36         return treeNode.level != 2;\r
37 };\r
38 var setting = {\r
39         view: {\r
40                 showIcon: showIconForTree\r
41         }\r
42 };\r
43 ......</code></pre>\r
44 </div>\r
45 </div>