提交 ed1b9171 编写于 作者: Z ztree

* [修改] selectNode 方法 增加 isSilent 参数,可以禁止 选中节点时,自动滚动到视图

上级 2c77ffee
jQuery Tree Plugin ---- zTree
============
last verson : 3.5.22
last verson : 3.5.23
**Donate to zTree** : http://www.ztree.me/v3/donate.php
......
......@@ -35,7 +35,7 @@
<div class="ieSuggest">浏览本网站建议您使用 Chrome、FireFox、Opera、IE9 等浏览器(只要不是 IE6 7 8 就行), 速度会更快,画面会更炫!</div>
<div class="google_plus"><g:plusone></g:plusone></div>
<div class="header-text">
<h1><em>zTree v3.5.22 API 文档</em></h1><p></p>
<h1><em>zTree v3.5.23 API 文档</em></h1><p></p>
<p>all.js = core + excheck + exedit ( 不包括 exhide ); 发现错误请及时通知,谢谢。</p>
</div>
<ul class="shortcuts language" style="top:0;">
......
......@@ -34,7 +34,7 @@
<div class="ieSuggest">If you use the Chrome / FireFox / Opera / IE9 browser will be even more dazzling effect!</div>
<div class="google_plus"><g:plusone></g:plusone></div>
<div class="header-text">
<h1><em>zTree v3.5.22 API Document</em></h1><p></p>
<h1><em>zTree v3.5.23 API Document</em></h1><p></p>
<p>all.js = core + excheck + exedit ( without exhide ); if you found some mistakes please contact me.</p>
</div>
<ul class="shortcuts language" style="top:0;">
......
......@@ -267,7 +267,7 @@ var apiContent = {
{id:422, pId:4, t:"refresh", name:"refresh ()", iconSkin:"core", showAPI:true},
{id:423, pId:4, t:"removeChildNodes", name:"removeChildNodes (parentNode)", iconSkin:"core", showAPI:true},
{id:424, pId:4, t:"removeNode", name:"removeNode (node, callbackFlag)", iconSkin:"core", showAPI:true},
{id:425, pId:4, t:"selectNode", name:"selectNode (node, addFlag)", iconSkin:"core", showAPI:true},
{id:425, pId:4, t:"selectNode", name:"selectNode (node, addFlag, isSilent)", iconSkin:"core", showAPI:true},
{id:430, pId:4, t:"setChkDisabled", name:"setChkDisabled (node, disabled, inheritParent, inheritChildren)", iconSkin:"check", showAPI:true},
{id:426, pId:4, t:"setEditable", name:"setEditable (editable)", iconSkin:"edit", showAPI:true},
{id:434, pId:4, t:"showNode", name:"showNode (node)", iconSkin:"hide", showAPI:true},
......
此差异已折叠。
<div class="apiDetail">
<div>
<h2><span>Function(treeNode, addFlag)</span><span class="path">zTreeObj.</span>selectNode</h2>
<h2><span>Function(treeNode, addFlag, isSilent)</span><span class="path">zTreeObj.</span>selectNode</h2>
<h3>概述<span class="h3_info">[ 依赖 <span class="highlight_green">jquery.ztree.core</span> 核心 js ]</span></h3>
<div class="desc">
<p></p>
......@@ -17,8 +17,12 @@
<p class="highlight_red">请务必保证此节点数据对象 是 zTree 内部的数据对象</p>
<h4 class="topLine"><b>addFlag</b><span>Boolean</span></h4>
<p>addFlag = true 表示追加选中,会出现多点同时被选中的情况</p>
<p>addFlag = false 表示单独选中,原先被选中的节点会被取消选中状态</p>
<p>addFlag = false (默认)表示单独选中,原先被选中的节点会被取消选中状态</p>
<p class="highlight_red">setting.view.selectedMulti = false 时,此参数无效,始终进行单独选中</p>
<h4 class="topLine"><b>isSilent</b><span>Boolean</span></h4>
<p>isSilent = true 选中节点时,不会让节点自动滚到到可视区域内</p>
<p>isSilent = false (默认)表示选中节点时,会让节点自动滚到到可视区域内</p>
<p class="highlight_red">(v3.5.23+)</p>
<h4 class="topLine"><b>返回值</b><span></span></h4>
<p>目前无任何返回值</p>
</div>
......
<div class="apiDetail">
<div>
<h2><span>Function(treeNode, addFlag)</span><span class="path">zTreeObj.</span>selectNode</h2>
<h2><span>Function(treeNode, addFlag, isSilent)</span><span class="path">zTreeObj.</span>selectNode</h2>
<h3>Overview<span class="h3_info">[ depends on <span class="highlight_green">jquery.ztree.core</span> js ]</span></h3>
<div class="desc">
<p></p>
......@@ -17,8 +17,11 @@
<p class="highlight_red">Please ensure that this data object is an internal node data object in zTree.</p>
<h4 class="topLine"><b>addFlag</b><span>Boolean</span></h4>
<p>addFlag = true means: append to select node, don't affect the previously selected node, can select multiple nodes.</p>
<p>addFlag = false means: select single node, prior the selected node is deselected.</p>
<p>addFlag = false (default) means: select single node, prior the selected node is deselected.</p>
<p class="highlight_red">If setting.view.selectedMulti = false, this para, this parameter is not valid, always select single node</p>
<p>isSilent = true means: when you select node, zTree will not scroll the node into view.</p>
<p>isSilent = false (default) means: when you select node, zTree will scroll the node into view.</p>
<p class="highlight_red">(v3.5.23+)</p>
<h4 class="topLine"><b>Return </b><span>none</span></h4>
<p>no return value</p>
</div>
......
/*
* JQuery zTree core v3.5.22
* JQuery zTree core v3.5.23
* http://zTree.me/
*
* Copyright (c) 2010 Hunter.z
......@@ -9,7 +9,7 @@
* http://www.opensource.org/licenses/mit-license.php
*
* email: hunter.z@263.net
* Date: 2016-03-01
* Date: 2016-04-01
*/
(function($){
var settings = {}, roots = {}, caches = {},
......@@ -1347,6 +1347,18 @@
$$(node, consts.id.UL, setting).empty();
}
},
scrollIntoView: function(dom) {
if (!dom) {
return;
}
if (dom.scrollIntoViewIfNeeded) {
dom.scrollIntoViewIfNeeded();
} else if (dom.scrollIntoView) {
dom.scrollIntoView(false);
} else {
try{dom.focus().blur();}catch(e){}
}
},
setFirstNode: function(setting, parentNode) {
var childKey = setting.data.key.children, childLength = parentNode[childKey].length;
if ( childLength > 0) {
......@@ -1659,11 +1671,7 @@
function showNodeFocus() {
var a = $$(node, setting).get(0);
if (a && focus !== false) {
if (a.scrollIntoView) {
a.scrollIntoView(false);
} else {
try{a.focus().blur();}catch(e){}
}
view.scrollIntoView(a);
}
}
},
......@@ -1756,7 +1764,7 @@
this.setting.treeObj.trigger(consts.event.REMOVE, [setting.treeId, node]);
}
},
selectNode : function(node, addFlag) {
selectNode : function(node, addFlag, isSilent) {
if (!node) return;
if (tools.uCanDo(setting)) {
addFlag = setting.view.selectedMulti && addFlag;
......@@ -1769,14 +1777,11 @@
}
function showNodeFocus() {
var a = $$(node, setting).get(0);
if (a) {
if (a.scrollIntoView) {
a.scrollIntoView(false);
} else {
try{a.focus().blur();}catch(e){}
}
if (isSilent) {
return;
}
var a = $$(node, setting).get(0);
view.scrollIntoView(a);
}
},
transformTozTreeNodes : function(simpleNodes) {
......@@ -1814,7 +1819,7 @@
consts = zt.consts;
})(jQuery);
/*
* JQuery zTree excheck v3.5.22
* JQuery zTree excheck v3.5.23
* http://zTree.me/
*
* Copyright (c) 2010 Hunter.z
......@@ -1823,7 +1828,7 @@
* http://www.opensource.org/licenses/mit-license.php
*
* email: hunter.z@263.net
* Date: 2016-03-01
* Date: 2016-04-01
*/
(function($){
//default consts of excheck
......@@ -2442,7 +2447,7 @@
}
})(jQuery);
/*
* JQuery zTree exedit v3.5.22
* JQuery zTree exedit v3.5.23
* http://zTree.me/
*
* Copyright (c) 2010 Hunter.z
......@@ -2451,7 +2456,7 @@
* http://www.opensource.org/licenses/mit-license.php
*
* email: hunter.z@263.net
* Date: 2016-03-01
* Date: 2016-04-01
*/
(function($){
//default consts of exedit
......@@ -3135,13 +3140,7 @@
view.selectNodes(targetSetting, newNodes);
var a = $$(newNodes[0], setting).get(0);
if (a) {
if (a.scrollIntoView) {
a.scrollIntoView(false);
} else {
try{a.focus().blur();}catch(e){}
}
}
view.scrollIntoView(a);
setting.treeObj.trigger(consts.event.DROP, [event, targetSetting.treeId, newNodes, dragTargetNode, moveType, isCopy]);
}
......
此差异已折叠。
/*
* JQuery zTree core v3.5.22
* JQuery zTree core v3.5.23
* http://zTree.me/
*
* Copyright (c) 2010 Hunter.z
......@@ -8,7 +8,7 @@
* http://www.opensource.org/licenses/mit-license.php
*
* email: hunter.z@263.net
* Date: 2016-03-01
* Date: 2016-04-01
*/
(function($){
var settings = {}, roots = {}, caches = {},
......@@ -1346,6 +1346,18 @@
$$(node, consts.id.UL, setting).empty();
}
},
scrollIntoView: function(dom) {
if (!dom) {
return;
}
if (dom.scrollIntoViewIfNeeded) {
dom.scrollIntoViewIfNeeded();
} else if (dom.scrollIntoView) {
dom.scrollIntoView(false);
} else {
try{dom.focus().blur();}catch(e){}
}
},
setFirstNode: function(setting, parentNode) {
var childKey = setting.data.key.children, childLength = parentNode[childKey].length;
if ( childLength > 0) {
......@@ -1658,11 +1670,7 @@
function showNodeFocus() {
var a = $$(node, setting).get(0);
if (a && focus !== false) {
if (a.scrollIntoView) {
a.scrollIntoView(false);
} else {
try{a.focus().blur();}catch(e){}
}
view.scrollIntoView(a);
}
}
},
......@@ -1755,7 +1763,7 @@
this.setting.treeObj.trigger(consts.event.REMOVE, [setting.treeId, node]);
}
},
selectNode : function(node, addFlag) {
selectNode : function(node, addFlag, isSilent) {
if (!node) return;
if (tools.uCanDo(setting)) {
addFlag = setting.view.selectedMulti && addFlag;
......@@ -1768,14 +1776,11 @@
}
function showNodeFocus() {
var a = $$(node, setting).get(0);
if (a) {
if (a.scrollIntoView) {
a.scrollIntoView(false);
} else {
try{a.focus().blur();}catch(e){}
}
if (isSilent) {
return;
}
var a = $$(node, setting).get(0);
view.scrollIntoView(a);
}
},
transformTozTreeNodes : function(simpleNodes) {
......
此差异已折叠。
/*
* JQuery zTree excheck v3.5.22
* JQuery zTree excheck v3.5.23
* http://zTree.me/
*
* Copyright (c) 2010 Hunter.z
......@@ -8,7 +8,7 @@
* http://www.opensource.org/licenses/mit-license.php
*
* email: hunter.z@263.net
* Date: 2016-03-01
* Date: 2016-04-01
*/
(function($){
//default consts of excheck
......
/*
* JQuery zTree excheck v3.5.22
* JQuery zTree excheck v3.5.23
* http://zTree.me/
*
* Copyright (c) 2010 Hunter.z
......@@ -8,7 +8,7 @@
* http://www.opensource.org/licenses/mit-license.php
*
* email: hunter.z@263.net
* Date: 2016-03-01
* Date: 2016-04-01
*/
(function(m){var p,q,r,o={event:{CHECK:"ztree_check"},id:{CHECK:"_check"},checkbox:{STYLE:"checkbox",DEFAULT:"chk",DISABLED:"disable",FALSE:"false",TRUE:"true",FULL:"full",PART:"part",FOCUS:"focus"},radio:{STYLE:"radio",TYPE_ALL:"all",TYPE_LEVEL:"level"}},v={check:{enable:!1,autoCheckTrigger:!1,chkStyle:o.checkbox.STYLE,nocheckInherit:!1,chkDisabledInherit:!1,radioType:o.radio.TYPE_LEVEL,chkboxType:{Y:"ps",N:"ps"}},data:{key:{checked:"checked"}},callback:{beforeCheck:null,onCheck:null}};p=function(c,
a){if(a.chkDisabled===!0)return!1;var b=g.getSetting(c.data.treeId),d=b.data.key.checked;if(k.apply(b.callback.beforeCheck,[b.treeId,a],!0)==!1)return!0;a[d]=!a[d];e.checkNodeRelation(b,a);d=n(a,j.id.CHECK,b);e.setChkClass(b,d,a);e.repairParentChkClassWithSelf(b,a);b.treeObj.trigger(j.event.CHECK,[c,b.treeId,a]);return!0};q=function(c,a){if(a.chkDisabled===!0)return!1;var b=g.getSetting(c.data.treeId),d=n(a,j.id.CHECK,b);a.check_Focus=!0;e.setChkClass(b,d,a);return!0};r=function(c,a){if(a.chkDisabled===
......
/*
* JQuery zTree exedit v3.5.22
* JQuery zTree exedit v3.5.23
* http://zTree.me/
*
* Copyright (c) 2010 Hunter.z
......@@ -8,7 +8,7 @@
* http://www.opensource.org/licenses/mit-license.php
*
* email: hunter.z@263.net
* Date: 2016-03-01
* Date: 2016-04-01
*/
(function($){
//default consts of exedit
......@@ -692,13 +692,7 @@
view.selectNodes(targetSetting, newNodes);
var a = $$(newNodes[0], setting).get(0);
if (a) {
if (a.scrollIntoView) {
a.scrollIntoView(false);
} else {
try{a.focus().blur();}catch(e){}
}
}
view.scrollIntoView(a);
setting.treeObj.trigger(consts.event.DROP, [event, targetSetting.treeId, newNodes, dragTargetNode, moveType, isCopy]);
}
......
/*
* JQuery zTree exedit v3.5.22
* JQuery zTree exedit v3.5.23
* http://zTree.me/
*
* Copyright (c) 2010 Hunter.z
......@@ -8,7 +8,7 @@
* http://www.opensource.org/licenses/mit-license.php
*
* email: hunter.z@263.net
* Date: 2016-03-01
* Date: 2016-04-01
*/
(function(v){var J={event:{DRAG:"ztree_drag",DROP:"ztree_drop",RENAME:"ztree_rename",DRAGMOVE:"ztree_dragmove"},id:{EDIT:"_edit",INPUT:"_input",REMOVE:"_remove"},move:{TYPE_INNER:"inner",TYPE_PREV:"prev",TYPE_NEXT:"next"},node:{CURSELECTED_EDIT:"curSelectedNode_Edit",TMPTARGET_TREE:"tmpTargetzTree",TMPTARGET_NODE:"tmpTargetNode"}},x={onHoverOverNode:function(b,a){var c=m.getSetting(b.data.treeId),d=m.getRoot(c);if(d.curHoverNode!=a)x.onHoverOutNode(b);d.curHoverNode=a;f.addHoverDom(c,a)},onHoverOutNode:function(b){var b=
m.getSetting(b.data.treeId),a=m.getRoot(b);if(a.curHoverNode&&!m.isSelectedNode(b,a.curHoverNode))f.removeTreeDom(b,a.curHoverNode),a.curHoverNode=null},onMousedownNode:function(b,a){function c(b){if(B.dragFlag==0&&Math.abs(O-b.clientX)<e.edit.drag.minMoveSize&&Math.abs(P-b.clientY)<e.edit.drag.minMoveSize)return!0;var a,c,n,k,i;i=e.data.key.children;M.css("cursor","pointer");if(B.dragFlag==0){if(g.apply(e.callback.beforeDrag,[e.treeId,l],!0)==!1)return r(b),!0;for(a=0,c=l.length;a<c;a++){if(a==0)B.dragNodeShowBefore=
......@@ -25,8 +25,8 @@ H=n?i?0.25:k?0.5:1:-1,N=k?i?0.75:n?0.5:0:-1,y=(b.clientY+y-p)/F.height(),(H==1||
h.edit.drag.autoOpenTime+50),window.zTreeMoveTargetNodeTId=z.tId}}else if(w=d.move.TYPE_INNER,s&&g.apply(h.edit.drag.inner,[h.treeId,l,null],!!h.edit.drag.inner)?s.addClass(d.node.TMPTARGET_TREE):s=null,A.css({display:"none"}),window.zTreeMoveTimer)clearTimeout(window.zTreeMoveTimer),window.zTreeMoveTargetNodeTId=null;T=u;U=w;e.treeObj.trigger(d.event.DRAGMOVE,[b,e.treeId,l])}return!1}function r(b){if(window.zTreeMoveTimer)clearTimeout(window.zTreeMoveTimer),window.zTreeMoveTargetNodeTId=null;U=T=
null;G.unbind("mousemove",c);G.unbind("mouseup",r);G.unbind("selectstart",k);M.css("cursor","auto");s&&(s.removeClass(d.node.TMPTARGET_TREE),u&&v("#"+u+d.id.A,s).removeClass(d.node.TMPTARGET_NODE+"_"+d.move.TYPE_PREV).removeClass(d.node.TMPTARGET_NODE+"_"+J.move.TYPE_NEXT).removeClass(d.node.TMPTARGET_NODE+"_"+J.move.TYPE_INNER));g.showIfameMask(e,!1);t.showHoverDom=!0;if(B.dragFlag!=0){B.dragFlag=0;var a,i,j;for(a=0,i=l.length;a<i;a++)j=l[a],j.isParent&&B.dragNodeShowBefore[j.tId]&&!j.open&&(f.expandCollapseNode(e,
j,!j.open),delete B.dragNodeShowBefore[j.tId]);D&&D.remove();A&&A.remove();var p=(b.ctrlKey||b.metaKey)&&e.edit.drag.isMove&&e.edit.drag.isCopy||!e.edit.drag.isMove&&e.edit.drag.isCopy;!p&&s&&u&&l[0].parentTId&&u==l[0].parentTId&&w==d.move.TYPE_INNER&&(s=null);if(s){var q=u==null?null:m.getNodeCache(h,u);if(g.apply(e.callback.beforeDrop,[h.treeId,l,q,w,p],!0)==!1)f.selectNodes(x,l);else{var C=p?g.clone(l):l;a=function(){if(K){if(!p)for(var a=0,c=l.length;a<c;a++)f.removeNode(e,l[a]);w==d.move.TYPE_INNER?
f.addNodes(h,q,-1,C):f.addNodes(h,q.getParentNode(),w==d.move.TYPE_PREV?q.getIndex():q.getIndex()+1,C)}else if(p&&w==d.move.TYPE_INNER)f.addNodes(h,q,-1,C);else if(p)f.addNodes(h,q.getParentNode(),w==d.move.TYPE_PREV?q.getIndex():q.getIndex()+1,C);else if(w!=d.move.TYPE_NEXT)for(a=0,c=C.length;a<c;a++)f.moveNode(h,q,C[a],w,!1);else for(a=-1,c=C.length-1;a<c;c--)f.moveNode(h,q,C[c],w,!1);f.selectNodes(h,C);if(a=o(C[0],e).get(0))if(a.scrollIntoView)a.scrollIntoView(!1);else try{a.focus().blur()}catch(r){}e.treeObj.trigger(d.event.DROP,
[b,h.treeId,C,q,w,p])};w==d.move.TYPE_INNER&&g.canAsync(h,q)?f.asyncNode(h,q,!1,a):a()}}else f.selectNodes(x,l),e.treeObj.trigger(d.event.DROP,[b,e.treeId,l,null,null,null])}}function k(){return!1}var i,j,e=m.getSetting(b.data.treeId),B=m.getRoot(e),t=m.getRoots();if(b.button==2||!e.edit.enable||!e.edit.drag.isCopy&&!e.edit.drag.isMove)return!0;var p=b.target,q=m.getRoot(e).curSelectedList,l=[];if(m.isSelectedNode(e,a))for(i=0,j=q.length;i<j;i++){if(q[i].editNameFlag&&g.eqs(p.tagName,"input")&&p.getAttribute("treeNode"+
f.addNodes(h,q,-1,C):f.addNodes(h,q.getParentNode(),w==d.move.TYPE_PREV?q.getIndex():q.getIndex()+1,C)}else if(p&&w==d.move.TYPE_INNER)f.addNodes(h,q,-1,C);else if(p)f.addNodes(h,q.getParentNode(),w==d.move.TYPE_PREV?q.getIndex():q.getIndex()+1,C);else if(w!=d.move.TYPE_NEXT)for(a=0,c=C.length;a<c;a++)f.moveNode(h,q,C[a],w,!1);else for(a=-1,c=C.length-1;a<c;c--)f.moveNode(h,q,C[c],w,!1);f.selectNodes(h,C);a=o(C[0],e).get(0);f.scrollIntoView(a);e.treeObj.trigger(d.event.DROP,[b,h.treeId,C,q,w,p])};
w==d.move.TYPE_INNER&&g.canAsync(h,q)?f.asyncNode(h,q,!1,a):a()}}else f.selectNodes(x,l),e.treeObj.trigger(d.event.DROP,[b,e.treeId,l,null,null,null])}}function k(){return!1}var i,j,e=m.getSetting(b.data.treeId),B=m.getRoot(e),t=m.getRoots();if(b.button==2||!e.edit.enable||!e.edit.drag.isCopy&&!e.edit.drag.isMove)return!0;var p=b.target,q=m.getRoot(e).curSelectedList,l=[];if(m.isSelectedNode(e,a))for(i=0,j=q.length;i<j;i++){if(q[i].editNameFlag&&g.eqs(p.tagName,"input")&&p.getAttribute("treeNode"+
d.id.INPUT)!==null)return!0;l.push(q[i]);if(l[0].parentTId!==q[i].parentTId){l=[a];break}}else l=[a];f.editNodeBlur=!0;f.cancelCurEditNode(e);var G=v(e.treeObj.get(0).ownerDocument),M=v(e.treeObj.get(0).ownerDocument.body),D,A,s,K=!1,h=e,x=e,I,R,T=null,U=null,u=null,w=d.move.TYPE_INNER,O=b.clientX,P=b.clientY,L=(new Date).getTime();g.uCanDo(e)&&G.bind("mousemove",c);G.bind("mouseup",r);G.bind("selectstart",k);b.preventDefault&&b.preventDefault();return!0}};v.extend(!0,v.fn.zTree.consts,J);v.extend(!0,
v.fn.zTree._z,{tools:{getAbs:function(b){b=b.getBoundingClientRect();return[b.left+(document.body.scrollLeft+document.documentElement.scrollLeft),b.top+(document.body.scrollTop+document.documentElement.scrollTop)]},inputFocus:function(b){b.get(0)&&(b.focus(),g.setCursorPosition(b.get(0),b.val().length))},inputSelect:function(b){b.get(0)&&(b.focus(),b.select())},setCursorPosition:function(b,a){if(b.setSelectionRange)b.focus(),b.setSelectionRange(a,a);else if(b.createTextRange){var c=b.createTextRange();
c.collapse(!0);c.moveEnd("character",a);c.moveStart("character",a);c.select()}},showIfameMask:function(b,a){for(var c=m.getRoot(b);c.dragMaskList.length>0;)c.dragMaskList[0].remove(),c.dragMaskList.shift();if(a)for(var d=o("iframe",b),f=0,i=d.length;f<i;f++){var j=d.get(f),e=g.getAbs(j),j=o("<div id='zTreeMask_"+f+"' class='zTreeMask' style='top:"+e[1]+"px; left:"+e[0]+"px; width:"+j.offsetWidth+"px; height:"+j.offsetHeight+"px;'></div>",b);j.appendTo(o("body",b));c.dragMaskList.push(j)}}},view:{addEditBtn:function(b,
......
/*
* JQuery zTree exHideNodes v3.5.22
* JQuery zTree exHideNodes v3.5.23
* http://zTree.me/
*
* Copyright (c) 2010 Hunter.z
......@@ -8,7 +8,7 @@
* http://www.opensource.org/licenses/mit-license.php
*
* email: hunter.z@263.net
* Date: 2016-03-01
* Date: 2016-04-01
*/
(function($){
//default init node of exLib
......
/*
* JQuery zTree exHideNodes v3.5.22
* JQuery zTree exHideNodes v3.5.23
* http://zTree.me/
*
* Copyright (c) 2010 Hunter.z
......@@ -8,7 +8,7 @@
* http://www.opensource.org/licenses/mit-license.php
*
* email: hunter.z@263.net
* Date: 2016-03-01
* Date: 2016-04-01
*/
(function(i){i.extend(!0,i.fn.zTree._z,{view:{clearOldFirstNode:function(c,a){for(var b=a.getNextNode();b;){if(b.isFirstNode){b.isFirstNode=!1;d.setNodeLineIcos(c,b);break}if(b.isLastNode)break;b=b.getNextNode()}},clearOldLastNode:function(c,a,b){for(a=a.getPreNode();a;){if(a.isLastNode){a.isLastNode=!1;b&&d.setNodeLineIcos(c,a);break}if(a.isFirstNode)break;a=a.getPreNode()}},makeDOMNodeMainBefore:function(c,a,b){c.push("<li ",b.isHidden?"style='display:none;' ":"","id='",b.tId,"' class='",l.className.LEVEL,
b.level,"' tabindex='0' hidefocus='true' treenode>")},showNode:function(c,a){a.isHidden=!1;f.initShowForExCheck(c,a);j(a,c).show()},showNodes:function(c,a,b){if(a&&a.length!=0){var e={},g,k;for(g=0,k=a.length;g<k;g++){var h=a[g];if(!e[h.parentTId]){var i=h.getParentNode();e[h.parentTId]=i===null?f.getRoot(c):h.getParentNode()}d.showNode(c,h,b)}for(var j in e)a=e[j][c.data.key.children],d.setFirstNodeForShow(c,a),d.setLastNodeForShow(c,a)}},hideNode:function(c,a){a.isHidden=!0;a.isFirstNode=!1;a.isLastNode=
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册