4 zTree_Function: null,
\r
6 overlayContent : null,
\r
7 overlayDetailDiv : null,
\r
8 overlayCloseBtn: null,
\r
10 contentBoxDiv : null,
\r
13 overlaySearch: null,
\r
15 searchResultInput: null,
\r
16 searchPrevBtn: null,
\r
17 searchNextBtn: null,
\r
24 this.overlayDiv = $("#overlayDiv");
\r
25 this.overlayContent = $("#overlayContent");
\r
26 this.overlayDetailDiv = $("#overlayDetailDiv");
\r
27 this.overlayCloseBtn = $("#overlayDivCloseBtn");
\r
28 this.overlayArrow = $("#overlayDivArrow");
\r
29 this.contentBoxDiv = $("#contentBox");
\r
30 this.settingDiv = $("#api_setting");
\r
31 this.functionDiv = $("#api_function");
\r
32 this.searchKey = $(".searchKey");
\r
33 this.overlaySearch = $(".overlaySearch");
\r
34 this.searchResultInput = $(".searchResult");
\r
35 this.searchPrevBtn = $(".searchPrev");
\r
36 this.searchNextBtn = $(".searchNext");
\r
39 fontCss: this.getFontCss,
\r
41 showIcon: this.showIcon,
\r
42 showTitle: this.getTitle,
\r
43 selectedMulti: false,
\r
44 dblClickExpand: false
\r
58 onNodeCreated: this.onNodeCreated,
\r
59 beforeClick: this.beforeClick
\r
62 var setting_nodes =[
\r
63 {id:1, pId:0, t:"setting", name:"var setting = {", open:true},
\r
64 {id:11, pId:1, t:"treeId", name:"treeId : \"\",", iconSkin:"core", showAPI:true},
\r
65 {id:12, pId:1, t:"treeObj", name:"treeObj : null,", iconSkin:"core", showAPI:true},
\r
66 {id:121, pId:1, name:""},
\r
68 {id:20, pId:1, t:"async", name:"async : {", open:true},
\r
69 {id:201, pId:20, t:"autoParam", name:"autoParam : [],", iconSkin:"core", showAPI:true},
\r
70 {id:208, pId:20, t:"contentType", name:"contentType : \"application...\",", iconSkin:"core", showAPI:true},
\r
71 {id:202, pId:20, t:"dataFilter", name:"dataFilter : null,", iconSkin:"core", showAPI:true},
\r
72 {id:203, pId:20, t:"dataType", name:"dataType : \"text\",", iconSkin:"core", showAPI:true},
\r
73 {id:204, pId:20, t:"enable", name:"enable : false,", iconSkin:"core", showAPI:true},
\r
74 {id:205, pId:20, t:"otherParam", name:"otherParam : [],", iconSkin:"core", showAPI:true},
\r
75 {id:206, pId:20, t:"type", name:"type : \"post\",", iconSkin:"core", showAPI:true},
\r
76 {id:207, pId:20, t:"url", name:"url : \"\"", iconSkin:"core", showAPI:true},
\r
77 {id:21, pId:1, name:"},"},
\r
78 {id:22, pId:1, name:""},
\r
80 {id:30, pId:1, t:"callback", name:"callback : {", open:true},
\r
81 {id:3001, pId:30, t:"beforeAsync", name:"beforeAsync : null,", iconSkin:"core", showAPI:true},
\r
82 {id:3002, pId:30, t:"beforeCheck", name:"beforeCheck : null,", iconSkin:"check", showAPI:true},
\r
83 {id:3003, pId:30, t:"beforeClick", name:"beforeClick : null,", iconSkin:"core", showAPI:true},
\r
84 {id:3004, pId:30, t:"beforeCollapse", name:"beforeCollapse : null,", iconSkin:"core", showAPI:true},
\r
85 {id:3004, pId:30, t:"beforeDblClick", name:"beforeDblClick : null,", iconSkin:"core", showAPI:true},
\r
86 {id:3005, pId:30, t:"beforeDrag", name:"beforeDrag : null,", iconSkin:"edit", showAPI:true},
\r
87 {id:3006, pId:30, t:"beforeDragOpen", name:"beforeDragOpen : null,", iconSkin:"edit", showAPI:true},
\r
88 {id:3007, pId:30, t:"beforeDrop", name:"beforeDrop : null,", iconSkin:"edit", showAPI:true},
\r
89 {id:3029, pId:30, t:"beforeEditName", name:"beforeEditName : null,", iconSkin:"edit", showAPI:true},
\r
90 {id:3008, pId:30, t:"beforeExpand", name:"beforeExpand : null,", iconSkin:"core", showAPI:true},
\r
91 {id:3009, pId:30, t:"beforeMouseDown", name:"beforeMouseDown : null,", iconSkin:"core", showAPI:true},
\r
92 {id:3010, pId:30, t:"beforeMouseUp", name:"beforeMouseUp : null,", iconSkin:"core", showAPI:true},
\r
93 {id:3011, pId:30, t:"beforeRemove", name:"beforeRemove : null,", iconSkin:"edit", showAPI:true},
\r
94 {id:3012, pId:30, t:"beforeRename", name:"beforeRename : null,", iconSkin:"edit", showAPI:true},
\r
95 {id:3013, pId:30, t:"beforeRightClick", name:"beforeRightClick : null,", iconSkin:"core", showAPI:true},
\r
96 {id:3014, pId:30, name:""},
\r
97 {id:3015, pId:30, t:"onAsyncError", name:"onAsyncError : null,", iconSkin:"core", showAPI:true},
\r
98 {id:3016, pId:30, t:"onAsyncSuccess", name:"onAsyncSuccess : null,", iconSkin:"core", showAPI:true},
\r
99 {id:3017, pId:30, t:"onCheck", name:"onCheck : null,", iconSkin:"check", showAPI:true},
\r
100 {id:3018, pId:30, t:"onClick", name:"onClick : null,", iconSkin:"core", showAPI:true},
\r
101 {id:3019, pId:30, t:"onCollapse", name:"onCollapse : null,", iconSkin:"core", showAPI:true},
\r
102 {id:3029, pId:30, t:"onDblClick", name:"onDblClick : null,", iconSkin:"core", showAPI:true},
\r
103 {id:3020, pId:30, t:"onDrag", name:"onDrag : null,", iconSkin:"edit", showAPI:true},
\r
104 {id:3030, pId:30, t:"onDragMove", name:"onDragMove : null,", iconSkin:"edit", showAPI:true},
\r
105 {id:3021, pId:30, t:"onDrop", name:"onDrop : null,", iconSkin:"edit", showAPI:true},
\r
106 {id:3022, pId:30, t:"onExpand", name:"onExpand : null,", iconSkin:"core", showAPI:true},
\r
107 {id:3023, pId:30, t:"onMouseDown", name:"onMouseDown : null,", iconSkin:"core", showAPI:true},
\r
108 {id:3024, pId:30, t:"onMouseUp", name:"onMouseUp : null,", iconSkin:"core", showAPI:true},
\r
109 {id:3025, pId:30, t:"onNodeCreated", name:"onNodeCreated : null,", iconSkin:"core", showAPI:true},
\r
110 {id:3026, pId:30, t:"onRemove", name:"onRemove : null,", iconSkin:"edit", showAPI:true},
\r
111 {id:3027, pId:30, t:"onRename", name:"onRename : null,", iconSkin:"edit", showAPI:true},
\r
112 {id:3028, pId:30, t:"onRightClick", name:"onRightClick : null", iconSkin:"core", showAPI:true},
\r
113 {id:31, pId:1, name:"},"},
\r
114 {id:32, pId:1, name:""},
\r
116 {id:40, pId:1, t:"check", name:"check : {", open:true},
\r
117 {id:405, pId:40, t:"autoCheckTrigger", name:"autoCheckTrigger : false,", iconSkin:"check", showAPI:true},
\r
118 {id:401, pId:40, t:"chkboxType", name:"chkboxType : {\"Y\": \"ps\", \"N\": \"ps\"},", iconSkin:"check", showAPI:true},
\r
119 {id:402, pId:40, t:"chkStyle", name:"chkStyle : \"checkbox\",", iconSkin:"check", showAPI:true},
\r
120 {id:403, pId:40, t:"enable", name:"enable : false,", iconSkin:"check", showAPI:true},
\r
121 {id:406, pId:40, t:"nocheckInherit", name:"nocheckInherit : false", iconSkin:"check", showAPI:true},
\r
122 {id:407, pId:40, t:"chkDisabledInherit", name:"chkDisabledInherit : false", iconSkin:"check", showAPI:true},
\r
123 {id:404, pId:40, t:"radioType", name:"radioType : \"level\"", iconSkin:"check", showAPI:true},
\r
124 {id:41, pId:1, name:"},"},
\r
125 {id:42, pId:1, name:""},
\r
127 {id:50, pId:1, t:"data", name:"data : {", open:true},
\r
128 {id:500, pId:50, t:"keep", name:"keep : {", open:true},
\r
129 {id:5001, pId:500, t:"leaf", name:"leaf : false,", iconSkin:"core", showAPI:true},
\r
130 {id:5002, pId:500, t:"parent", name:"parent : false", iconSkin:"core", showAPI:true},
\r
131 {id:501, pId:50, name:"},"},
\r
133 {id:510, pId:50, t:"key", name:"key : {", open:true},
\r
134 {id:5101, pId:510, t:"checked", name:"checked : \"checked\",", iconSkin:"check", showAPI:true},
\r
135 {id:5102, pId:510, t:"children", name:"children : \"children\",", iconSkin:"core", showAPI:true},
\r
136 {id:5103, pId:510, t:"name", name:"name : \"name\",", iconSkin:"core", showAPI:true},
\r
137 {id:5104, pId:510, t:"title", name:"title : \"\"", iconSkin:"core", showAPI:true},
\r
138 {id:5105, pId:510, t:"url", name:"url : \"url\"", iconSkin:"core", showAPI:true},
\r
139 {id:511, pId:50, name:"},"},
\r
141 {id:520, pId:50, t:"simpleData", name:"simpleData : {", open:true},
\r
142 {id:5201, pId:520, t:"enable", name:"enable : false,", iconSkin:"core", showAPI:true},
\r
143 {id:5202, pId:520, t:"idKey", name:"idKey : \"id\",", iconSkin:"core", showAPI:true},
\r
144 {id:5203, pId:520, t:"pIdKey", name:"pIdKey : \"pId\",", iconSkin:"core", showAPI:true},
\r
145 {id:5204, pId:520, t:"rootPId", name:"rootPId : null", iconSkin:"core", showAPI:true},
\r
146 {id:521, pId:50, name:"}"},
\r
147 {id:51, pId:1, name:"},"},
\r
148 {id:52, pId:1, name:""},
\r
150 {id:60, pId:1, t:"edit", name:"edit : {", open:true},
\r
151 {id:601, pId:60, t:"drag", name:"drag : {", open:true},
\r
152 {id:60111, pId:601, t:"autoExpandTrigger", name:"autoExpandTrigger : true,", iconSkin:"edit", showAPI:true},
\r
153 {id:60101, pId:601, t:"isCopy", name:"isCopy : true,", iconSkin:"edit", showAPI:true},
\r
154 {id:60102, pId:601, t:"isMove", name:"isMove : true,", iconSkin:"edit", showAPI:true},
\r
155 {id:60103, pId:601, t:"prev", name:"prev : true,", iconSkin:"edit", showAPI:true},
\r
156 {id:60104, pId:601, t:"next", name:"next : true,", iconSkin:"edit", showAPI:true},
\r
157 {id:60105, pId:601, t:"inner", name:"inner : true,", iconSkin:"edit", showAPI:true},
\r
158 {id:60107, pId:601, t:"borderMax", name:"borderMax : 10,", iconSkin:"edit", showAPI:true},
\r
159 {id:60108, pId:601, t:"borderMin", name:"borderMin : -5,", iconSkin:"edit", showAPI:true},
\r
160 {id:60106, pId:601, t:"minMoveSize", name:"minMoveSize : 5,", iconSkin:"edit", showAPI:true},
\r
161 {id:60109, pId:601, t:"maxShowNodeNum", name:"maxShowNodeNum : 5,", iconSkin:"edit", showAPI:true},
\r
162 {id:60110, pId:601, t:"autoOpenTime", name:"autoOpenTime : 500", iconSkin:"edit", showAPI:true},
\r
163 {id:602, pId:60, name:"},"},
\r
164 {id:608, pId:60, t:"editNameSelectAll", name:"editNameSelectAll : false,", iconSkin:"edit", showAPI:true},
\r
165 {id:603, pId:60, t:"enable", name:"enable : false,", iconSkin:"edit", showAPI:true},
\r
166 {id:604, pId:60, t:"removeTitle", name:"removeTitle : \"remove\",", iconSkin:"edit", showAPI:true},
\r
167 {id:605, pId:60, t:"renameTitle", name:"renameTitle : \"rename\",", iconSkin:"edit", showAPI:true},
\r
168 {id:606, pId:60, t:"showRemoveBtn", name:"showRemoveBtn : true,", iconSkin:"edit", showAPI:true},
\r
169 {id:607, pId:60, t:"showRenameBtn", name:"showRenameBtn : true", iconSkin:"edit", showAPI:true},
\r
170 {id:61, pId:1, name:"},"},
\r
171 {id:62, pId:1, name:""},
\r
173 {id:70, pId:1, t:"view", name:"view : {", open:true},
\r
174 {id:7001, pId:70, t:"addDiyDom", name:"addDiyDom : null,", iconSkin:"core", showAPI:true},
\r
175 {id:7002, pId:70, t:"addHoverDom", name:"addHoverDom : null,", iconSkin:"edit", showAPI:true},
\r
176 {id:7003, pId:70, t:"autoCancelSelected", name:"autoCancelSelected : true,", iconSkin:"core", showAPI:true},
\r
177 {id:7004, pId:70, t:"dblClickExpand", name:"dblClickExpand : true,", iconSkin:"core", showAPI:true},
\r
178 {id:7005, pId:70, t:"expandSpeed", name:"expandSpeed : \"fast\",", iconSkin:"core", showAPI:true},
\r
179 {id:7006, pId:70, t:"fontCss", name:"fontCss : {},", iconSkin:"core", showAPI:true},
\r
180 {id:7012, pId:70, t:"nameIsHTML", name:"nameIsHTML : false,", iconSkin:"core", showAPI:true},
\r
181 {id:7007, pId:70, t:"removeHoverDom", name:"removeHoverDom : null,", iconSkin:"edit", showAPI:true},
\r
182 {id:7008, pId:70, t:"selectedMulti", name:"selectedMulti : true,", iconSkin:"core", showAPI:true},
\r
183 {id:7009, pId:70, t:"showIcon", name:"showIcon : true,", iconSkin:"core", showAPI:true},
\r
184 {id:7010, pId:70, t:"showLine", name:"showLine : true,", iconSkin:"core", showAPI:true},
\r
185 {id:7011, pId:70, t:"showTitle", name:"showTitle : true,", iconSkin:"core", showAPI:true},
\r
186 {id:7012, pId:70, t:"txtSelectedEnable", name:"txtSelectedEnable : false", iconSkin:"core", showAPI:true},
\r
187 {id:71, pId:1, name:"}"},
\r
189 {id:2, pId:0, name:"}"}
\r
192 var treenode_nodes =[
\r
193 {id:1, pId:0, t:"treeNode", name:"treeNode : {", open:true},
\r
194 {id:101, pId:1, t:"checked", name:"checked", iconSkin:"check", showAPI:true},
\r
195 {id:102, pId:1, t:"children", name:"children", iconSkin:"core", showAPI:true},
\r
196 {id:128, pId:1, t:"chkDisabled", name:"chkDisabled", iconSkin:"check", showAPI:true},
\r
197 {id:127, pId:1, t:"click", name:"click", iconSkin:"core", showAPI:true},
\r
198 {id:103, pId:1, t:"getCheckStatus", name:"getCheckStatus ()", iconSkin:"check", showAPI:true},
\r
199 {id:104, pId:1, t:"getNextNode", name:"getNextNode ()", iconSkin:"core", showAPI:true},
\r
200 {id:105, pId:1, t:"getParentNode", name:"getParentNode ()", iconSkin:"core", showAPI:true},
\r
201 {id:106, pId:1, t:"getPreNode", name:"getPreNode ()", iconSkin:"core", showAPI:true},
\r
202 {id:129, pId:1, t:"halfCheck", name:"halfCheck", iconSkin:"check", showAPI:true},
\r
203 {id:107, pId:1, t:"icon", name:"icon", iconSkin:"core", showAPI:true},
\r
204 {id:108, pId:1, t:"iconClose", name:"iconClose", iconSkin:"core", showAPI:true},
\r
205 {id:109, pId:1, t:"iconOpen", name:"iconOpen", iconSkin:"core", showAPI:true},
\r
206 {id:110, pId:1, t:"iconSkin", name:"iconSkin", iconSkin:"core", showAPI:true},
\r
207 {id:131, pId:1, t:"isHidden", name:"isHidden", iconSkin:"hide", showAPI:true},
\r
208 {id:111, pId:1, t:"isParent", name:"isParent", iconSkin:"core", showAPI:true},
\r
209 {id:132, pId:1, t:"name", name:"name", iconSkin:"core", showAPI:true},
\r
210 {id:112, pId:1, t:"nocheck", name:"nocheck", iconSkin:"check", showAPI:true},
\r
211 {id:113, pId:1, t:"open", name:"open", iconSkin:"core", showAPI:true},
\r
212 {id:133, pId:1, t:"target", name:"target", iconSkin:"core", showAPI:true},
\r
213 {id:134, pId:1, t:"url", name:"url", iconSkin:"core", showAPI:true},
\r
214 {id:114, pId:1, t:"diy", name:"*DIY*", iconSkin:"core", showAPI:true},
\r
215 {id:115, pId:1, name:""},
\r
216 {id:116, pId:1, t:"check_Child_State", name:"[check_Child_State]", iconSkin:"check", showAPI:true},
\r
217 {id:117, pId:1, t:"check_Focus", name:"[check_Focus]", iconSkin:"check", showAPI:true},
\r
218 {id:118, pId:1, t:"checkedOld", name:"[checkedOld]", iconSkin:"check", showAPI:true},
\r
219 {id:119, pId:1, t:"editNameFlag", name:"[editNameFlag]", iconSkin:"edit", showAPI:true},
\r
220 {id:120, pId:1, t:"isAjaxing", name:"[isAjaxing]", iconSkin:"core", showAPI:true},
\r
221 {id:121, pId:1, t:"isFirstNode", name:"[isFirstNode]", iconSkin:"core", showAPI:true},
\r
222 {id:122, pId:1, t:"isHover", name:"[isHover]", iconSkin:"edit", showAPI:true},
\r
223 {id:123, pId:1, t:"isLastNode", name:"[isLastNode]", iconSkin:"core", showAPI:true},
\r
224 {id:124, pId:1, t:"level", name:"[level]", iconSkin:"core", showAPI:true},
\r
225 {id:125, pId:1, t:"parentTId", name:"[parentTId]", iconSkin:"core", showAPI:true},
\r
226 {id:126, pId:1, t:"tId", name:"[tId]", iconSkin:"core", showAPI:true},
\r
227 {id:130, pId:1, t:"zAsync", name:"[zAsync]", iconSkin:"core", showAPI:true},
\r
228 {id:2, pId:0, name:"}"}
\r
231 var function_nodes =[
\r
232 {id:1, pId:0, t:"$.fn.zTree", name:"$.fn.zTree : {", open:true},
\r
233 {id:11, pId:1, t:"init", name:"init (obj, zSetting, zNodes)", iconSkin:"core", showAPI:true},
\r
234 {id:12, pId:1, t:"getZTreeObj", name:"getZTreeObj (treeId)", iconSkin:"core", showAPI:true},
\r
235 {id:14, pId:1, t:"destroy", name:"destroy (treeId)", iconSkin:"core", showAPI:true},
\r
236 {id:13, pId:1, t:"_z", name:"_z : {tools, view, event, data}", iconSkin:"core", showAPI:true},
\r
237 {id:2, pId:0, name:"}"},
\r
238 {id:3, pId:0, name:""},
\r
239 {id:4, pId:0, t:"zTreeObj", name:"zTreeObj : {", open:true},
\r
240 {id:401, pId:4, t:"setting", name:"setting", iconSkin:"core", showAPI:true},
\r
241 {id:402, pId:4, t:"addNodes", name:"addNodes (parentNode, newNodes, isSilent)", iconSkin:"core", showAPI:true},
\r
242 {id:403, pId:4, t:"cancelEditName", name:"cancelEditName (newName)", iconSkin:"edit", showAPI:true},
\r
243 {id:404, pId:4, t:"cancelSelectedNode", name:"cancelSelectedNode (node)", iconSkin:"core", showAPI:true},
\r
244 {id:405, pId:4, t:"checkAllNodes", name:"checkAllNodes (checked)", iconSkin:"check", showAPI:true},
\r
245 {id:406, pId:4, t:"checkNode", name:"checkNode (node, checked, checkTypeFlag, callbackFlag)", iconSkin:"check", showAPI:true},
\r
246 {id:407, pId:4, t:"copyNode", name:"copyNode (targetNode, node, moveType, isSilent)", iconSkin:"edit", showAPI:true},
\r
247 {id:436, pId:4, t:"destroy", name:"destroy ()", iconSkin:"core", showAPI:true},
\r
248 {id:408, pId:4, t:"editName", name:"editName (node)", iconSkin:"edit", showAPI:true},
\r
249 {id:409, pId:4, t:"expandAll", name:"expandAll (expandFlag)", iconSkin:"core", showAPI:true},
\r
250 {id:410, pId:4, t:"expandNode", name:"expandNode (node, expandFlag, sonSign, focus, callbackFlag)", iconSkin:"core", showAPI:true},
\r
251 {id:411, pId:4, t:"getChangeCheckedNodes", name:"getChangeCheckedNodes ()", iconSkin:"check", showAPI:true},
\r
252 {id:412, pId:4, t:"getCheckedNodes", name:"getCheckedNodes (checked)", iconSkin:"check", showAPI:true},
\r
253 {id:413, pId:4, t:"getNodeByParam", name:"getNodeByParam (key, value, parentNode)", iconSkin:"core", showAPI:true},
\r
254 {id:414, pId:4, t:"getNodeByTId", name:"getNodeByTId (tId)", iconSkin:"core", showAPI:true},
\r
255 {id:415, pId:4, t:"getNodeIndex", name:"getNodeIndex (node)", iconSkin:"core", showAPI:true},
\r
256 {id:416, pId:4, t:"getNodes", name:"getNodes ()", iconSkin:"core", showAPI:true},
\r
257 {id:431, pId:4, t:"getNodesByFilter", name:"getNodesByFilter (filter, isSingle, parentNode, invokeParam)", iconSkin:"core", showAPI:true},
\r
258 {id:417, pId:4, t:"getNodesByParam", name:"getNodesByParam (key, value, parentNode)", iconSkin:"core", showAPI:true},
\r
259 {id:418, pId:4, t:"getNodesByParamFuzzy", name:"getNodesByParamFuzzy (key, value, parentNode)", iconSkin:"core", showAPI:true},
\r
260 {id:419, pId:4, t:"getSelectedNodes", name:"getSelectedNodes ()", iconSkin:"core", showAPI:true},
\r
261 {id:432, pId:4, t:"hideNode", name:"hideNode (node)", iconSkin:"hide", showAPI:true},
\r
262 {id:433, pId:4, t:"hideNodes", name:"hideNodes (nodes)", iconSkin:"hide", showAPI:true},
\r
263 {id:420, pId:4, t:"moveNode", name:"moveNode (targetNode, node, moveType, isSilent)", iconSkin:"edit", showAPI:true},
\r
264 {id:421, pId:4, t:"reAsyncChildNodes", name:"reAsyncChildNodes (parentNode, reloadType, isSilent)", iconSkin:"core", showAPI:true},
\r
265 {id:422, pId:4, t:"refresh", name:"refresh ()", iconSkin:"core", showAPI:true},
\r
266 {id:423, pId:4, t:"removeChildNodes", name:"removeChildNodes (parentNode)", iconSkin:"core", showAPI:true},
\r
267 {id:424, pId:4, t:"removeNode", name:"removeNode (node, callbackFlag)", iconSkin:"core", showAPI:true},
\r
268 {id:425, pId:4, t:"selectNode", name:"selectNode (node, addFlag)", iconSkin:"core", showAPI:true},
\r
269 {id:430, pId:4, t:"setChkDisabled", name:"setChkDisabled (node, disabled, inheritParent, inheritChildren)", iconSkin:"check", showAPI:true},
\r
270 {id:426, pId:4, t:"setEditable", name:"setEditable (editable)", iconSkin:"edit", showAPI:true},
\r
271 {id:434, pId:4, t:"showNode", name:"showNode (node)", iconSkin:"hide", showAPI:true},
\r
272 {id:435, pId:4, t:"showNodes", name:"showNodes (nodes)", iconSkin:"hide", showAPI:true},
\r
273 {id:427, pId:4, t:"transformToArray", name:"transformToArray (nodes)", iconSkin:"core", showAPI:true},
\r
274 {id:428, pId:4, t:"transformTozTreeNodes", name:"transformTozTreeNodes (simpleNodes)", iconSkin:"core", showAPI:true},
\r
275 {id:429, pId:4, t:"updateNode", name:"updateNode (node, checkTypeFlag)", iconSkin:"core", showAPI:true},
\r
276 {id:5, pId:0, name:"}"}
\r
279 apiContent.zTree_Setting = $.fn.zTree.init($("#settingTree"), $.fn.zTree._z.tools.clone(setting), setting_nodes);
\r
280 apiContent.zTree_Node = $.fn.zTree.init($("#treenodeTree"), $.fn.zTree._z.tools.clone(setting), treenode_nodes);
\r
281 apiContent.zTree_Function = $.fn.zTree.init($("#functionTree"), $.fn.zTree._z.tools.clone(setting), function_nodes);
\r
285 bindEvent: function() {
\r
286 $(document).bind("keydown", this.listenKeyDown)
\r
287 this.overlayCloseBtn.bind("click", apiContent.overlayClose);
\r
288 this.searchResultInput.bind("click", function(e) {
\r
289 $(this).prev().get(0).focus();
\r
291 }).bind("focus", function(e) {
\r
294 this.searchKey.bind("focus", this.focusKey)
\r
295 .bind("blur", this.blurKey)
\r
296 .bind("propertychange", this.searchNode)
\r
297 .bind("input", this.searchNode);
\r
298 this.searchPrevBtn.bind("click", this.searchPrev);
\r
299 this.searchNextBtn.bind("click", this.searchNext);
\r
301 setSameKey: function(value) {
\r
302 apiContent.searchKey.attr("value", value);
\r
304 focusKey: function(e) {
\r
305 if (apiContent.searchKey.hasClass("empty")) {
\r
306 apiContent.searchKey.removeClass("empty");
\r
309 blurKey: function(e) {
\r
310 apiContent.setSameKey(e.target.value);
\r
311 if (e.target.value === "") {
\r
312 apiContent.searchKey.addClass("empty");
\r
315 listenKeyDown: function(e) {
\r
316 if (e.keyCode=="13" && apiContent.overlayDiv.is(":hidden")) {
\r
317 apiContent.openAPI();
\r
318 } else if (e.keyCode=="37") {
\r
319 apiContent.searchPrev();
\r
320 } else if (e.keyCode=="13" || e.keyCode=="39") {
\r
321 apiContent.searchNext();
\r
324 openAPI: function() {
\r
325 if (apiContent.searchNodes.length > 0) {
\r
326 var setting_zTree = $.fn.zTree.getZTreeObj("settingTree"),
\r
327 treenode_zTree = $.fn.zTree.getZTreeObj("treenodeTree"),
\r
328 function_zTree = $.fn.zTree.getZTreeObj("functionTree");
\r
329 if (apiContent.searchNodesCur < 0 || apiContent.searchNodesCur > apiContent.searchNodes.length -1) {
\r
330 apiContent.searchNodesCur = 0;
\r
332 var node = apiContent.searchNodes[apiContent.searchNodesCur];
\r
334 if (node.tId.indexOf("setting") > -1) {
\r
335 setting_zTree.selectNode(node);
\r
336 } else if (node.tId.indexOf("treenode") > -1) {
\r
337 treenode_zTree.selectNode(node);
\r
339 function_zTree.selectNode(node);
\r
341 apiContent.beforeClick(node.tId.substring(0, node.tId.indexOf("_")), node, true);
\r
342 apiContent.searchCur();
\r
345 searchNode: function(e) {
\r
346 var setting_zTree = $.fn.zTree.getZTreeObj("settingTree"),
\r
347 treenode_zTree = $.fn.zTree.getZTreeObj("treenodeTree"),
\r
348 function_zTree = $.fn.zTree.getZTreeObj("functionTree");
\r
349 if (apiContent.curKey == e.target.value) return;
\r
350 apiContent.curKey = e.target.value;
\r
351 var value = $.trim(apiContent.curKey);
\r
352 apiContent.setSameKey(apiContent.curKey);
\r
353 if (apiContent.searchKey.hasClass("empty")) {
\r
355 apiContent.searchResultInput.removeClass("noResult").attr("value","");
\r
357 if (apiContent.lastValue === value) return;
\r
359 apiContent.updateNodes(false);
\r
360 apiContent.lastValue = value;
\r
361 if (value === "" || value.length < 2) {
\r
362 apiContent.searchNodes = [];
\r
363 apiContent.searchNodesCur = -1;
\r
364 apiContent.searchCur(true);
\r
368 var settingNodeList = setting_zTree.getNodesByFilter(apiContent.searchFilter);
\r
369 var functionNodeList = function_zTree.getNodesByFilter(apiContent.searchFilter);
\r
370 var treenodeNodeList = treenode_zTree.getNodesByFilter(apiContent.searchFilter);
\r
371 apiContent.searchNodes = settingNodeList.concat(functionNodeList).concat(treenodeNodeList);
\r
372 apiContent.searchNodesCur = -1;
\r
373 apiContent.searchCur();
\r
374 apiContent.updateNodes(true);
\r
376 searchFilter: function(node) {
\r
377 var value = $.trim(apiContent.searchKey.get(0).value).toLowerCase();
\r
378 return (node.showAPI && node.name.toLowerCase().indexOf(value) > -1);
\r
380 searchPrev: function(e) {
\r
381 if (apiContent.searchPrevBtn.hasClass("disabled")) return;
\r
382 apiContent.searchNodesCur--;
\r
383 if (apiContent.searchNodesCur < 0 || apiContent.searchNodesCur > apiContent.searchNodes.length -1) {
\r
384 apiContent.searchNodesCur = apiContent.searchNodes.length -1;
\r
386 apiContent.openAPI();
\r
388 searchNext: function(e) {
\r
389 if (apiContent.searchNextBtn.hasClass("disabled")) return;
\r
390 apiContent.searchNodesCur++;
\r
391 apiContent.openAPI();
\r
393 searchCur: function(init) {
\r
394 var result = apiContent.searchNodes;
\r
396 apiContent.searchResultInput.removeClass("noResult").attr("value","");
\r
397 } else if (result.length == 0) {
\r
398 apiContent.searchResultInput.addClass("noResult").attr("value"," [ 0 / 0 ] ");
\r
400 apiContent.searchResultInput.removeClass("noResult").attr("value"," [ " + (apiContent.searchNodesCur > -1 ? apiContent.searchNodesCur+1 : "?")+ " / " + result.length + " ] ");
\r
402 if (result.length > 0) {
\r
403 apiContent.searchPrevBtn.removeClass("disabled");
\r
404 apiContent.searchNextBtn.removeClass("disabled");
\r
406 apiContent.searchPrevBtn.addClass("disabled");
\r
407 apiContent.searchNextBtn.addClass("disabled");
\r
410 updateNodes: function(highlight) {
\r
411 var setting_zTree = $.fn.zTree.getZTreeObj("settingTree"),
\r
412 treenode_zTree = $.fn.zTree.getZTreeObj("treenodeTree"),
\r
413 function_zTree = $.fn.zTree.getZTreeObj("functionTree"),
\r
415 for( var i=0, l=apiContent.searchNodes.length; i<l; i++) {
\r
416 node = apiContent.searchNodes[i];
\r
417 if (node.level > 0) {
\r
418 node.highlight = highlight;
\r
419 if (node.tId.indexOf("setting") > -1) {
\r
420 setting_zTree.updateNode(node);
\r
421 } else if (node.tId.indexOf("treenode") > -1) {
\r
422 treenode_zTree.updateNode(node);
\r
424 function_zTree.updateNode(node);
\r
429 getFontCss: function(treeId, treeNode) {
\r
430 return (!!treeNode.highlight) ? {color:"#A60000", "font-weight":"bold"} : {color:"#333", "font-weight":"normal"};
\r
432 getTitle: function(treeId, node) {
\r
433 var t = [], n = node;
\r
434 while (n && !!n.t) {
\r
436 n = n.getParentNode();
\r
439 node.tt = t.join('.');
\r
442 showIcon: function(treeId, node) {
\r
443 return (!!node.iconSkin);
\r
445 onNodeCreated: function (e, treeId, node) {
\r
446 var a = $("#" + node.tId + "_a");
\r
447 if (node.showAPI) {
\r
448 a.attr("rel", "#overlayDiv");
\r
450 a.css({cursor: "default"});
\r
453 beforeClick: function (treeId, node, noClear) {
\r
454 if (!node.showAPI) return false;
\r
455 var o = $("#" + node.tId + "_a");
\r
456 if (!!apiContent.apiCache[node.tId]) {
\r
457 apiContent.tmpDiv.html(apiContent.apiCache[node.tId]);
\r
458 apiContent.overlayShow(o, (apiContent.lastNode === node));
\r
460 apiContent.overlayAjax(treeId, node);
\r
462 apiContent.lastNode = node;
\r
463 if (node.tId.indexOf("settingTree")>-1) {
\r
464 apiContent.settingDiv.removeClass("right").addClass("left");
\r
465 apiContent.functionDiv.removeClass("left").addClass("right");
\r
467 apiContent.settingDiv.removeClass("left").addClass("right");
\r
468 apiContent.functionDiv.removeClass("right").addClass("left");
\r
472 apiContent.clearSelectedNode();
\r
476 clearSelectedNode: function() {
\r
477 apiContent.zTree_Setting.cancelSelectedNode();
\r
478 apiContent.zTree_Node.cancelSelectedNode();
\r
479 apiContent.zTree_Function.cancelSelectedNode();
\r
481 overlayAutoClose: function(e) {
\r
482 var eId = e.target.id, eRel = e.target.getAttribute("rel"), eClass = e.target.className;
\r
483 if (eId === "overlayDiv" || eId === "overlayDivArrow" || eClass.indexOf("searchPrev") > -1 || eClass.indexOf("searchNext") > -1 || !!eRel) return;
\r
484 if (!$(e.target).parents("[rel]").length && !$(e.target).parents("#overlayDiv").length) {
\r
485 apiContent.overlayClose();
\r
488 overlayClose: function() {
\r
489 var o = apiContent.overlayDiv;
\r
491 apiContent.clearSelectedNode();
\r
495 setTimeout(function() {o.fadeTo("fast", 0, function(){o.hide();})}, 200);
\r
497 $(document).unbind("click", apiContent.overlayAutoClose);
\r
499 overlayShow: function(target, isSameNode) {
\r
500 var w = $(window), o = apiContent.overlayDiv, a = apiContent.overlayArrow,
\r
501 oc = apiContent.overlayContent, c = apiContent.contentBoxDiv,
\r
502 t = target.offset().top - 30,
\r
503 cMaxLeft = c.offset().left + c.outerWidth({margin:true}) - o.outerWidth({margin:true}) - 10,
\r
504 l = Math.min(cMaxLeft, target.offset().left + target.width() + 40),
\r
505 arrowT = target.offset().top + 16,
\r
506 wMinTop = 100, footerHeight = 50, onlyFade = false,
\r
507 wHeight = w.height(), wScrollTop=w.scrollTop(), wMaxTop = wHeight + wScrollTop - footerHeight;
\r
508 if (!apiContent.overlayMaxTop) {
\r
509 apiContent.overlayMaxTop = apiContent.contentBoxDiv.offset().top + apiContent.contentBoxDiv.height();
\r
512 if (o.css("display") !== "block") {
\r
513 o.css({top: t, left: l});
\r
514 a.css({top:arrowT - t});
\r
515 $(document).bind("click", apiContent.overlayAutoClose);
\r
521 o.fadeTo("fast", 1);
\r
524 var h = apiContent.tmpDiv.outerHeight({margin:true}) + apiContent.overlaySearch.outerHeight();
\r
525 if ((t + h) > wMaxTop) {
\r
528 if ((t + h) > apiContent.overlayMaxTop) {
\r
529 t = apiContent.overlayMaxTop - h;
\r
531 t = Math.max(t, wScrollTop, wMinTop);
\r
532 if ((t + h) > ($("body").height()-footerHeight-20)) {
\r
533 o.css("padding-bottom", footerHeight + "px");
\r
535 o.css("padding-bottom", "0");
\r
537 apiContent.overlayDetailDiv.empty();
\r
538 apiContent.overlayDetailDiv.append(apiContent.tmpDiv.children());
\r
540 onlyFade = (isSameNode && t === parseInt(o.css("top").replace("px", "")));
\r
543 a.removeClass("reverse");
\r
544 if ( (arrowT - t) > (h-55) ) {
\r
545 a.addClass("reverse");
\r
550 o.css({top: t, left: l});
\r
551 oc.css({height: h});
\r
552 a.css({top:arrowT - t});
\r
554 o.animate({top: t, left: l}, {duration: "normal",easing: "swing", complete:null});
\r
555 oc.animate({height: h}, {duration: "fast",easing: "swing", complete:null});
\r
556 a.animate({top:arrowT - t}, {duration: "normal",easing: "linear", complete:null});
\r
559 overlayAjax: function(treeId, node) {
\r
560 var o = $("#" + node.tId + "_a");
\r
561 if (node.isAjax) return;
\r
562 node.isAjax = true;
\r
565 url: "" + lang + "/" + node.tt.replace("$.", "") + ".html",
\r
568 success: function(msg) {
\r
569 if (!apiContent.tmpDiv) {
\r
570 var tmpDiv = $(document.createElement("div"));
\r
571 tmpDiv.addClass("baby_overlay_tmp");
\r
572 $("body").append(tmpDiv)
\r
573 apiContent.tmpDiv = $(document.createElement("div"));
\r
574 apiContent.tmpDiv.addClass("details");
\r
575 tmpDiv.append(apiContent.tmpDiv);
\r
578 apiContent.tmpDiv.empty();
\r
580 apiContent.tmpDiv.html(msg);
\r
581 apiContent.overlayShow(o, false);
\r
582 apiContent.apiCache[node.tId] = msg;
\r
583 node.isAjax = false;
\r
585 error: function(XMLHttpRequest, textStatus, errorThrown) {
\r
587 if (apiContent.tmpDiv) apiContent.tmpDiv.empty();
\r
588 node.isAjax = false;
\r