CLIENT GUI Framework
[vnfsdk/refrepo.git] / openo-portal / portal-common / src / main / webapp / common / thirdparty / zTree / api / en / setting.view.fontCss.html
1 <div class="apiDetail">\r
2 <div>\r
3         <h2><span>JSON / Function(treeId, treeNode)</span><span class="path">setting.view.</span>fontCss</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>Personalized text style, only applies to &lt;A&gt; object in the node DOM</p>\r
9                         <p>Default: {}</p>\r
10                 </div>\r
11         </div>\r
12         <h3>JSON Format</h3>\r
13         <div class="desc">\r
14         <p>As same as .css() method in jQuery. e.g. <span class="highlight_red">{color:"#ff0011", background:"blue"}</span></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 use the personalized text style</p>\r
22         <h4 class="topLine"><b>Return </b><span>JSON</span></h4>\r
23         <p>Return value is same as 'JSON Format'. e.g. <span class="highlight_red">{color:"#ff0011", background:"blue"}</span></p>\r
24         </div>\r
25         <h3>Examples of setting & function</h3>\r
26         <h4>1. Don't modify css file, and set the node name's color to red</h4>\r
27         <pre xmlns=""><code>var setting = {\r
28         view: {\r
29                 fontCss : {color:"red"}\r
30         }\r
31 };</code></pre>\r
32         <h4>2. Don't modify css file, and set the root node name's color to red</h4>\r
33         <pre xmlns=""><code>function setFontCss(treeId, treeNode) {\r
34         return treeNode.level == 0 ? {color:"red"} : {};\r
35 };\r
36 var setting = {\r
37         view: {\r
38                 fontCss: setFontCss\r
39         }\r
40 };</code></pre>\r
41 </div>\r
42 </div>