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