CLIENT GUI Framework
[vnfsdk/refrepo.git] / openo-portal / portal-common / src / main / webapp / common / thirdparty / zTree / api / en / setting.edit.removeTitle.html
1 <div class="apiDetail">\r
2 <div>\r
3         <h2><span>String / Function(treeId, treeNode)</span><span class="path">setting.edit.</span>removeTitle</h2>\r
4         <h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.exedit</span> js ]</span></h3>\r
5         <div class="desc">\r
6                 <p></p>\r
7                 <div class="longdesc">\r
8                         <p>the title of the remove button DOM. It is valid when <span class="highlight_red">[setting.edit.enable = true & setting.edit.showRemoveBtn = true]</span></p>\r
9                         <p>Default: "remove"</p>\r
10                 </div>\r
11         </div>\r
12         <h3>String Format</h3>\r
13         <div class="desc">\r
14         <p>When the mouse over the remove button, the browser auto pop-up message content.</p>\r
15         </div>\r
16         <h3>Function Parameter Descriptions</h3>\r
17         <div class="desc">\r
18         <h4><b>treeId</b><span>String</span></h4>\r
19         <p>zTree unique identifier: <b class="highlight_red">treeId</b>, easy for users to control.</p>\r
20         <h4 class="topLine"><b>treeNode</b><span>JSON</span></h4>\r
21         <p>JSON data object of the node which show the remove button</p>\r
22         <h4 class="topLine"><b>Return </b><span>String</span></h4>\r
23         <p>Return value is same as 'String Format'</p>\r
24         </div>\r
25         <h3>Examples of setting & function</h3>\r
26         <h4>1. Set title is 'remove the node' about all the remove button</h4>\r
27         <pre xmlns=""><code>var setting = {\r
28         edit: {\r
29                 enable: true,\r
30                 showRemoveBtn: true,\r
31                 removeTitle: "remove the node"\r
32         }\r
33 };\r
34 ......</code></pre>\r
35         <h4>2. Set title is 'remove the parent node' about the parent node, and is 'remove the leaf node' about the leaf node</h4>\r
36         <pre xmlns=""><code>function setRemoveTitle(treeId, treeNode) {\r
37         return treeNode.isParent ? "remove the parent node":"remove the leaf node";\r
38 }\r
39 var setting = {\r
40         edit: {\r
41                 enable: true,\r
42                 showRemoveBtn: true,\r
43                 removeTitle: setRemoveTitle\r
44         }\r
45 };\r
46 ......</code></pre>\r
47 </div>\r
48 </div>