提交 bf972931 编写于 作者: Z ztree

fixed issue: The return value of the function (data.nodeChecked &...

fixed issue: The return value of the function (data.nodeChecked & data.isHidden)  is set to a Boolean Thanks @xinhochen & @田biubiu & @FelixFly
上级 3d8c17b4
jQuery Tree Plugin ---- zTree jQuery Tree Plugin ---- zTree
============ ============
last verson : 3.5.38 last verson : 3.5.39
**Donate to zTree** : http://www.treejs.cn/v3/donate.php **Donate to zTree** : http://www.treejs.cn/v3/donate.php
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<div class="ieSuggest">浏览本网站建议您使用 Chrome、FireFox、Opera、IE9 等浏览器(只要不是 IE6 7 8 就行), 速度会更快,画面会更炫!</div> <div class="ieSuggest">浏览本网站建议您使用 Chrome、FireFox、Opera、IE9 等浏览器(只要不是 IE6 7 8 就行), 速度会更快,画面会更炫!</div>
<div class="google_plus"><g:plusone></g:plusone></div> <div class="google_plus"><g:plusone></g:plusone></div>
<div class="header-text"> <div class="header-text">
<h1><em>zTree v3.5.37 API 文档</em></h1><p></p> <h1><em>zTree v3.5.39 API 文档</em></h1><p></p>
<p>all.js = core + excheck + exedit ( 不包括 exhide ); 发现错误请及时通知,谢谢。</p> <p>all.js = core + excheck + exedit ( 不包括 exhide ); 发现错误请及时通知,谢谢。</p>
</div> </div>
<ul class="shortcuts language" style="top:0;"> <ul class="shortcuts language" style="top:0;">
......
...@@ -34,7 +34,7 @@ ...@@ -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="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="google_plus"><g:plusone></g:plusone></div>
<div class="header-text"> <div class="header-text">
<h1><em>zTree v3.5.37 API Document</em></h1><p></p> <h1><em>zTree v3.5.39 API Document</em></h1><p></p>
<p>all.js = core + excheck + exedit ( without exhide ); if you found some mistakes please contact me.</p> <p>all.js = core + excheck + exedit ( without exhide ); if you found some mistakes please contact me.</p>
</div> </div>
<ul class="shortcuts language" style="top:0;"> <ul class="shortcuts language" style="top:0;">
......
此差异已折叠。
/* /*
* JQuery zTree core v3.5.38 * JQuery zTree core v3.5.39
* http://treejs.cn/ * http://treejs.cn/
* *
* Copyright (c) 2010 Hunter.z * Copyright (c) 2010 Hunter.z
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* http://www.opensource.org/licenses/mit-license.php * http://www.opensource.org/licenses/mit-license.php
* *
* email: hunter.z@263.net * email: hunter.z@263.net
* Date: 2019-01-08 * Date: 2019-01-017
*/ */
(function ($) { (function ($) {
var settings = {}, roots = {}, caches = {}, var settings = {}, roots = {}, caches = {},
...@@ -303,8 +303,7 @@ ...@@ -303,8 +303,7 @@
n.parentTId = parentNode ? parentNode.tId : null; n.parentTId = parentNode ? parentNode.tId : null;
n.open = (typeof n.open == "string") ? tools.eqs(n.open, "true") : !!n.open; n.open = (typeof n.open == "string") ? tools.eqs(n.open, "true") : !!n.open;
var isParent = data.nodeIsParent(setting, n); var isParent = data.nodeIsParent(setting, n);
if (tools.isArray(children) && if (tools.isArray(children)) {
!(isParent === false || (typeof isParent == "string" && tools.eqs(isParent, "false")))) {
data.nodeIsParent(setting, n, true); data.nodeIsParent(setting, n, true);
n.zAsync = true; n.zAsync = true;
} else { } else {
...@@ -634,6 +633,10 @@ ...@@ -634,6 +633,10 @@
} }
newIsParent = !!newIsParent; newIsParent = !!newIsParent;
node[key] = newIsParent; node[key] = newIsParent;
} else if (typeof node[key] == "string"){
node[key] = tools.eqs(node[key], "true");
} else {
node[key] = !!node[key];
} }
return node[key]; return node[key];
}, },
...@@ -1983,7 +1986,7 @@ ...@@ -1983,7 +1986,7 @@
consts = zt.consts; consts = zt.consts;
})(jQuery); })(jQuery);
/* /*
* JQuery zTree excheck v3.5.38 * JQuery zTree excheck v3.5.39
* http://treejs.cn/ * http://treejs.cn/
* *
* Copyright (c) 2010 Hunter.z * Copyright (c) 2010 Hunter.z
...@@ -1992,7 +1995,7 @@ ...@@ -1992,7 +1995,7 @@
* http://www.opensource.org/licenses/mit-license.php * http://www.opensource.org/licenses/mit-license.php
* *
* email: hunter.z@263.net * email: hunter.z@263.net
* Date: 2019-01-08 * Date: 2019-01-017
*/ */
(function ($) { (function ($) {
//default consts of excheck //default consts of excheck
...@@ -2117,7 +2120,6 @@ ...@@ -2117,7 +2120,6 @@
_initNode = function (setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) { _initNode = function (setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) {
if (!n) return; if (!n) return;
var checked = data.nodeChecked(setting, n); var checked = data.nodeChecked(setting, n);
checked = data.nodeChecked(setting, n, checked);
n.checkedOld = checked; n.checkedOld = checked;
if (typeof n.nocheck == "string") n.nocheck = tools.eqs(n.nocheck, "true"); if (typeof n.nocheck == "string") n.nocheck = tools.eqs(n.nocheck, "true");
n.nocheck = !!n.nocheck || (setting.check.nocheckInherit && parentNode && !!parentNode.nocheck); n.nocheck = !!n.nocheck || (setting.check.nocheckInherit && parentNode && !!parentNode.nocheck);
...@@ -2589,8 +2591,12 @@ ...@@ -2589,8 +2591,12 @@
} }
newChecked = !!newChecked; newChecked = !!newChecked;
node[key] = newChecked; node[key] = newChecked;
} else if (typeof node[key] == "string"){
node[key] = tools.eqs(node[key], "true");
} else {
node[key] = !!node[key];
} }
return !!node[key]; return node[key];
}; };
data.exSetting(_setting); data.exSetting(_setting);
...@@ -2631,7 +2637,7 @@ ...@@ -2631,7 +2637,7 @@
} }
})(jQuery); })(jQuery);
/* /*
* JQuery zTree exedit v3.5.38 * JQuery zTree exedit v3.5.39
* http://treejs.cn/ * http://treejs.cn/
* *
* Copyright (c) 2010 Hunter.z * Copyright (c) 2010 Hunter.z
...@@ -2640,7 +2646,7 @@ ...@@ -2640,7 +2646,7 @@
* http://www.opensource.org/licenses/mit-license.php * http://www.opensource.org/licenses/mit-license.php
* *
* email: hunter.z@263.net * email: hunter.z@263.net
* Date: 2019-01-08 * Date: 2019-01-017
*/ */
(function ($) { (function ($) {
//default consts of exedit //default consts of exedit
......
此差异已折叠。
/* /*
* JQuery zTree core v3.5.38 * JQuery zTree core v3.5.39
* http://treejs.cn/ * http://treejs.cn/
* *
* Copyright (c) 2010 Hunter.z * Copyright (c) 2010 Hunter.z
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* http://www.opensource.org/licenses/mit-license.php * http://www.opensource.org/licenses/mit-license.php
* *
* email: hunter.z@263.net * email: hunter.z@263.net
* Date: 2019-01-08 * Date: 2019-01-017
*/ */
(function ($) { (function ($) {
var settings = {}, roots = {}, caches = {}, var settings = {}, roots = {}, caches = {},
...@@ -302,8 +302,7 @@ ...@@ -302,8 +302,7 @@
n.parentTId = parentNode ? parentNode.tId : null; n.parentTId = parentNode ? parentNode.tId : null;
n.open = (typeof n.open == "string") ? tools.eqs(n.open, "true") : !!n.open; n.open = (typeof n.open == "string") ? tools.eqs(n.open, "true") : !!n.open;
var isParent = data.nodeIsParent(setting, n); var isParent = data.nodeIsParent(setting, n);
if (tools.isArray(children) && if (tools.isArray(children)) {
!(isParent === false || (typeof isParent == "string" && tools.eqs(isParent, "false")))) {
data.nodeIsParent(setting, n, true); data.nodeIsParent(setting, n, true);
n.zAsync = true; n.zAsync = true;
} else { } else {
...@@ -633,6 +632,10 @@ ...@@ -633,6 +632,10 @@
} }
newIsParent = !!newIsParent; newIsParent = !!newIsParent;
node[key] = newIsParent; node[key] = newIsParent;
} else if (typeof node[key] == "string"){
node[key] = tools.eqs(node[key], "true");
} else {
node[key] = !!node[key];
} }
return node[key]; return node[key];
}, },
......
此差异已折叠。
/* /*
* JQuery zTree excheck v3.5.38 * JQuery zTree excheck v3.5.39
* http://treejs.cn/ * http://treejs.cn/
* *
* Copyright (c) 2010 Hunter.z * Copyright (c) 2010 Hunter.z
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* http://www.opensource.org/licenses/mit-license.php * http://www.opensource.org/licenses/mit-license.php
* *
* email: hunter.z@263.net * email: hunter.z@263.net
* Date: 2019-01-08 * Date: 2019-01-017
*/ */
(function ($) { (function ($) {
//default consts of excheck //default consts of excheck
...@@ -133,7 +133,6 @@ ...@@ -133,7 +133,6 @@
_initNode = function (setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) { _initNode = function (setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) {
if (!n) return; if (!n) return;
var checked = data.nodeChecked(setting, n); var checked = data.nodeChecked(setting, n);
checked = data.nodeChecked(setting, n, checked);
n.checkedOld = checked; n.checkedOld = checked;
if (typeof n.nocheck == "string") n.nocheck = tools.eqs(n.nocheck, "true"); if (typeof n.nocheck == "string") n.nocheck = tools.eqs(n.nocheck, "true");
n.nocheck = !!n.nocheck || (setting.check.nocheckInherit && parentNode && !!parentNode.nocheck); n.nocheck = !!n.nocheck || (setting.check.nocheckInherit && parentNode && !!parentNode.nocheck);
...@@ -605,8 +604,12 @@ ...@@ -605,8 +604,12 @@
} }
newChecked = !!newChecked; newChecked = !!newChecked;
node[key] = newChecked; node[key] = newChecked;
} else if (typeof node[key] == "string"){
node[key] = tools.eqs(node[key], "true");
} else {
node[key] = !!node[key];
} }
return !!node[key]; return node[key];
}; };
data.exSetting(_setting); data.exSetting(_setting);
......
此差异已折叠。
/* /*
* JQuery zTree exedit v3.5.38 * JQuery zTree exedit v3.5.39
* http://treejs.cn/ * http://treejs.cn/
* *
* Copyright (c) 2010 Hunter.z * Copyright (c) 2010 Hunter.z
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* http://www.opensource.org/licenses/mit-license.php * http://www.opensource.org/licenses/mit-license.php
* *
* email: hunter.z@263.net * email: hunter.z@263.net
* Date: 2019-01-08 * Date: 2019-01-017
*/ */
(function ($) { (function ($) {
//default consts of exedit //default consts of exedit
......
/* /*
* JQuery zTree exedit v3.5.38 * JQuery zTree exedit v3.5.39
* http://treejs.cn/ * http://treejs.cn/
* *
* Copyright (c) 2010 Hunter.z * Copyright (c) 2010 Hunter.z
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* http://www.opensource.org/licenses/mit-license.php * http://www.opensource.org/licenses/mit-license.php
* *
* email: hunter.z@263.net * email: hunter.z@263.net
* Date: 2019-01-08 * Date: 2019-01-017
*/ */
(function(B){var I={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"}},v={onHoverOverNode:function(a,b){var c=i.getSetting(a.data.treeId),d=i.getRoot(c);if(d.curHoverNode!=b)v.onHoverOutNode(a);d.curHoverNode=b;e.addHoverDom(c,b)},onHoverOutNode:function(a){var a= (function(B){var I={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"}},v={onHoverOverNode:function(a,b){var c=i.getSetting(a.data.treeId),d=i.getRoot(c);if(d.curHoverNode!=b)v.onHoverOutNode(a);d.curHoverNode=b;e.addHoverDom(c,b)},onHoverOutNode:function(a){var a=
i.getSetting(a.data.treeId),b=i.getRoot(a);if(b.curHoverNode&&!i.isSelectedNode(a,b.curHoverNode))e.removeTreeDom(a,b.curHoverNode),b.curHoverNode=null},onMousedownNode:function(a,b){function c(a){if(m.dragFlag==0&&Math.abs(N-a.clientX)<f.edit.drag.minMoveSize&&Math.abs(O-a.clientY)<f.edit.drag.minMoveSize)return!0;var b,c,g,j;L.css("cursor","pointer");if(m.dragFlag==0){if(k.apply(f.callback.beforeDrag,[f.treeId,n],!0)==!1)return l(a),!0;for(b=0,c=n.length;b<c;b++){if(b==0)m.dragNodeShowBefore=[]; i.getSetting(a.data.treeId),b=i.getRoot(a);if(b.curHoverNode&&!i.isSelectedNode(a,b.curHoverNode))e.removeTreeDom(a,b.curHoverNode),b.curHoverNode=null},onMousedownNode:function(a,b){function c(a){if(m.dragFlag==0&&Math.abs(N-a.clientX)<f.edit.drag.minMoveSize&&Math.abs(O-a.clientY)<f.edit.drag.minMoveSize)return!0;var b,c,g,j;L.css("cursor","pointer");if(m.dragFlag==0){if(k.apply(f.callback.beforeDrag,[f.treeId,n],!0)==!1)return l(a),!0;for(b=0,c=n.length;b<c;b++){if(b==0)m.dragNodeShowBefore=[];
......
/* /*
* JQuery zTree exHideNodes v3.5.38 * JQuery zTree exHideNodes v3.5.39
* http://treejs.cn/ * http://treejs.cn/
* *
* Copyright (c) 2010 Hunter.z * Copyright (c) 2010 Hunter.z
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* http://www.opensource.org/licenses/mit-license.php * http://www.opensource.org/licenses/mit-license.php
* *
* email: hunter.z@263.net * email: hunter.z@263.net
* Date: 2019-01-08 * Date: 2019-01-017
*/ */
(function ($) { (function ($) {
var _setting = { var _setting = {
...@@ -300,12 +300,16 @@ ...@@ -300,12 +300,16 @@
var key = setting.data.key.isHidden; var key = setting.data.key.isHidden;
if (typeof newIsHidden !== 'undefined') { if (typeof newIsHidden !== 'undefined') {
if (typeof newIsHidden === "string") { if (typeof newIsHidden === "string") {
newIsHidden = tools.eqs(checked, "true"); newIsHidden = tools.eqs(newIsHidden, "true");
} }
newIsHidden = !!newIsHidden; newIsHidden = !!newIsHidden;
node[key] = newIsHidden; node[key] = newIsHidden;
} else if (typeof node[key] == "string"){
node[key] = tools.eqs(node[key], "true");
} else {
node[key] = !!node[key];
} }
return !!node[key]; return node[key];
}; };
data.exSetting(_setting); data.exSetting(_setting);
......
/* /*
* JQuery zTree exHideNodes v3.5.38 * JQuery zTree exHideNodes v3.5.39
* http://treejs.cn/ * http://treejs.cn/
* *
* Copyright (c) 2010 Hunter.z * Copyright (c) 2010 Hunter.z
...@@ -8,16 +8,16 @@ ...@@ -8,16 +8,16 @@
* http://www.opensource.org/licenses/mit-license.php * http://www.opensource.org/licenses/mit-license.php
* *
* email: hunter.z@263.net * email: hunter.z@263.net
* Date: 2019-01-08 * Date: 2019-01-017
*/ */
(function(j){j.extend(!0,j.fn.zTree._z,{view:{clearOldFirstNode:function(c,a){for(var b=a.getNextNode();b;){if(b.isFirstNode){b.isFirstNode=!1;e.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&&e.setNodeLineIcos(c,a);break}if(a.isFirstNode)break;a=a.getPreNode()}},makeDOMNodeMainBefore:function(c,a,b){a=d.isHidden(a,b);c.push("<li ",a?"style='display:none;' ":"","id='",b.tId,"' class='", (function(j){j.extend(!0,j.fn.zTree._z,{view:{clearOldFirstNode:function(c,a){for(var b=a.getNextNode();b;){if(b.isFirstNode){b.isFirstNode=!1;e.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&&e.setNodeLineIcos(c,a);break}if(a.isFirstNode)break;a=a.getPreNode()}},makeDOMNodeMainBefore:function(c,a,b){a=d.isHidden(a,b);c.push("<li ",a?"style='display:none;' ":"","id='",b.tId,"' class='",
l.className.LEVEL,b.level,"' tabindex='0' hidefocus='true' treenode>")},showNode:function(c,a){d.isHidden(c,a,!1);d.initShowForExCheck(c,a);k(a,c).show()},showNodes:function(c,a,b){if(a&&a.length!=0){var f={},g,i;for(g=0,i=a.length;g<i;g++){var h=a[g];if(!f[h.parentTId]){var u=h.getParentNode();f[h.parentTId]=u===null?d.getRoot(c):h.getParentNode()}e.showNode(c,h,b)}for(var j in f)a=d.nodeChildren(c,f[j]),e.setFirstNodeForShow(c,a),e.setLastNodeForShow(c,a)}},hideNode:function(c,a){d.isHidden(c,a, m.className.LEVEL,b.level,"' tabindex='0' hidefocus='true' treenode>")},showNode:function(c,a){d.isHidden(c,a,!1);d.initShowForExCheck(c,a);k(a,c).show()},showNodes:function(c,a,b){if(a&&a.length!=0){var f={},g,i;for(g=0,i=a.length;g<i;g++){var h=a[g];if(!f[h.parentTId]){var u=h.getParentNode();f[h.parentTId]=u===null?d.getRoot(c):h.getParentNode()}e.showNode(c,h,b)}for(var j in f)a=d.nodeChildren(c,f[j]),e.setFirstNodeForShow(c,a),e.setLastNodeForShow(c,a)}},hideNode:function(c,a){d.isHidden(c,a,
!0);a.isFirstNode=!1;a.isLastNode=!1;d.initHideForExCheck(c,a);e.cancelPreSelectedNode(c,a);k(a,c).hide()},hideNodes:function(c,a,b){if(a&&a.length!=0){var f={},g,i;for(g=0,i=a.length;g<i;g++){var h=a[g];if((h.isFirstNode||h.isLastNode)&&!f[h.parentTId]){var j=h.getParentNode();f[h.parentTId]=j===null?d.getRoot(c):h.getParentNode()}e.hideNode(c,h,b)}for(var k in f)a=d.nodeChildren(c,f[k]),e.setFirstNodeForHide(c,a),e.setLastNodeForHide(c,a)}},setFirstNode:function(c,a){var b=d.nodeChildren(c,a),f= !0);a.isFirstNode=!1;a.isLastNode=!1;d.initHideForExCheck(c,a);e.cancelPreSelectedNode(c,a);k(a,c).hide()},hideNodes:function(c,a,b){if(a&&a.length!=0){var f={},g,i;for(g=0,i=a.length;g<i;g++){var h=a[g];if((h.isFirstNode||h.isLastNode)&&!f[h.parentTId]){var j=h.getParentNode();f[h.parentTId]=j===null?d.getRoot(c):h.getParentNode()}e.hideNode(c,h,b)}for(var k in f)a=d.nodeChildren(c,f[k]),e.setFirstNodeForHide(c,a),e.setLastNodeForHide(c,a)}},setFirstNode:function(c,a){var b=d.nodeChildren(c,a),f=
d.isHidden(c,b[0],!1);b.length>0&&!f?b[0].isFirstNode=!0:b.length>0&&e.setFirstNodeForHide(c,b)},setLastNode:function(c,a){var b=d.nodeChildren(c,a),f=d.isHidden(c,b[0]);b.length>0&&!f?b[b.length-1].isLastNode=!0:b.length>0&&e.setLastNodeForHide(c,b)},setFirstNodeForHide:function(c,a){var b,f,g;for(f=0,g=a.length;f<g;f++){b=a[f];if(b.isFirstNode)break;if(!d.isHidden(c,b)&&!b.isFirstNode){b.isFirstNode=!0;e.setNodeLineIcos(c,b);break}else b=null}return b},setFirstNodeForShow:function(c,a){var b,f, d.isHidden(c,b[0],!1);b.length>0&&!f?b[0].isFirstNode=!0:b.length>0&&e.setFirstNodeForHide(c,b)},setLastNode:function(c,a){var b=d.nodeChildren(c,a),f=d.isHidden(c,b[0]);b.length>0&&!f?b[b.length-1].isLastNode=!0:b.length>0&&e.setLastNodeForHide(c,b)},setFirstNodeForHide:function(c,a){var b,f,g;for(f=0,g=a.length;f<g;f++){b=a[f];if(b.isFirstNode)break;if(!d.isHidden(c,b)&&!b.isFirstNode){b.isFirstNode=!0;e.setNodeLineIcos(c,b);break}else b=null}return b},setFirstNodeForShow:function(c,a){var b,f,
g,i,h;for(f=0,g=a.length;f<g;f++){b=a[f];var j=d.isHidden(c,b);if(!i&&!j&&b.isFirstNode){i=b;break}else if(!i&&!j&&!b.isFirstNode)b.isFirstNode=!0,i=b,e.setNodeLineIcos(c,b);else if(i&&b.isFirstNode){b.isFirstNode=!1;h=b;e.setNodeLineIcos(c,b);break}}return{"new":i,old:h}},setLastNodeForHide:function(c,a){var b,f;for(f=a.length-1;f>=0;f--){b=a[f];if(b.isLastNode)break;if(!d.isHidden(c,b)&&!b.isLastNode){b.isLastNode=!0;e.setNodeLineIcos(c,b);break}else b=null}return b},setLastNodeForShow:function(c, g,i,h;for(f=0,g=a.length;f<g;f++){b=a[f];var j=d.isHidden(c,b);if(!i&&!j&&b.isFirstNode){i=b;break}else if(!i&&!j&&!b.isFirstNode)b.isFirstNode=!0,i=b,e.setNodeLineIcos(c,b);else if(i&&b.isFirstNode){b.isFirstNode=!1;h=b;e.setNodeLineIcos(c,b);break}}return{"new":i,old:h}},setLastNodeForHide:function(c,a){var b,f;for(f=a.length-1;f>=0;f--){b=a[f];if(b.isLastNode)break;if(!d.isHidden(c,b)&&!b.isLastNode){b.isLastNode=!0;e.setNodeLineIcos(c,b);break}else b=null}return b},setLastNodeForShow:function(c,
a){var b,f,g,i;for(f=a.length-1;f>=0;f--){b=a[f];var h=d.isHidden(c,b);if(!g&&!h&&b.isLastNode){g=b;break}else if(!g&&!h&&!b.isLastNode)b.isLastNode=!0,g=b,e.setNodeLineIcos(c,b);else if(g&&b.isLastNode){b.isLastNode=!1;i=b;e.setNodeLineIcos(c,b);break}}return{"new":g,old:i}}},data:{initHideForExCheck:function(c,a){if(d.isHidden(c,a)&&c.check&&c.check.enable){if(typeof a._nocheck=="undefined")a._nocheck=!!a.nocheck,a.nocheck=!0;a.check_Child_State=-1;e.repairParentChkClassWithSelf&&e.repairParentChkClassWithSelf(c, a){var b,f,g,i;for(f=a.length-1;f>=0;f--){b=a[f];var h=d.isHidden(c,b);if(!g&&!h&&b.isLastNode){g=b;break}else if(!g&&!h&&!b.isLastNode)b.isLastNode=!0,g=b,e.setNodeLineIcos(c,b);else if(g&&b.isLastNode){b.isLastNode=!1;i=b;e.setNodeLineIcos(c,b);break}}return{"new":g,old:i}}},data:{initHideForExCheck:function(c,a){if(d.isHidden(c,a)&&c.check&&c.check.enable){if(typeof a._nocheck=="undefined")a._nocheck=!!a.nocheck,a.nocheck=!0;a.check_Child_State=-1;e.repairParentChkClassWithSelf&&e.repairParentChkClassWithSelf(c,
a)}},initShowForExCheck:function(c,a){if(!d.isHidden(c,a)&&c.check&&c.check.enable){if(typeof a._nocheck!="undefined")a.nocheck=a._nocheck,delete a._nocheck;if(e.setChkClass){var b=k(a,l.id.CHECK,c);e.setChkClass(c,b,a)}e.repairParentChkClassWithSelf&&e.repairParentChkClassWithSelf(c,a)}}}});var j=j.fn.zTree,m=j._z.tools,l=j.consts,e=j._z.view,d=j._z.data,k=m.$;d.isHidden=function(c,a,b){if(!a)return!1;c=c.data.key.isHidden;typeof b!=="undefined"&&(typeof b==="string"&&(b=m.eqs(checked,"true")),a[c]= a)}},initShowForExCheck:function(c,a){if(!d.isHidden(c,a)&&c.check&&c.check.enable){if(typeof a._nocheck!="undefined")a.nocheck=a._nocheck,delete a._nocheck;if(e.setChkClass){var b=k(a,m.id.CHECK,c);e.setChkClass(c,b,a)}e.repairParentChkClassWithSelf&&e.repairParentChkClassWithSelf(c,a)}}}});var j=j.fn.zTree,l=j._z.tools,m=j.consts,e=j._z.view,d=j._z.data,k=l.$;d.isHidden=function(c,a,b){if(!a)return!1;c=c.data.key.isHidden;typeof b!=="undefined"?(typeof b==="string"&&(b=l.eqs(b,"true")),a[c]=!!b):
!!b);return!!a[c]};d.exSetting({data:{key:{isHidden:"isHidden"}}});d.addInitNode(function(c,a,b){a=d.isHidden(c,b);d.isHidden(c,b,a);d.initHideForExCheck(c,b)});d.addBeforeA(function(){});d.addZTreeTools(function(c,a){a.showNodes=function(a,b){e.showNodes(c,a,b)};a.showNode=function(a,b){a&&e.showNodes(c,[a],b)};a.hideNodes=function(a,b){e.hideNodes(c,a,b)};a.hideNode=function(a,b){a&&e.hideNodes(c,[a],b)};var b=a.checkNode;if(b)a.checkNode=function(f,e,i,h){(!f||!d.isHidden(c,f))&&b.apply(a,arguments)}}); a[c]=typeof a[c]=="string"?l.eqs(a[c],"true"):!!a[c];return a[c]};d.exSetting({data:{key:{isHidden:"isHidden"}}});d.addInitNode(function(c,a,b){a=d.isHidden(c,b);d.isHidden(c,b,a);d.initHideForExCheck(c,b)});d.addBeforeA(function(){});d.addZTreeTools(function(c,a){a.showNodes=function(a,b){e.showNodes(c,a,b)};a.showNode=function(a,b){a&&e.showNodes(c,[a],b)};a.hideNodes=function(a,b){e.hideNodes(c,a,b)};a.hideNode=function(a,b){a&&e.hideNodes(c,[a],b)};var b=a.checkNode;if(b)a.checkNode=function(f,
var n=d.initNode;d.initNode=function(c,a,b,f,g,i,h){var j=(f?f:d.getRoot(c))[c.data.key.children];d.tmpHideFirstNode=e.setFirstNodeForHide(c,j);d.tmpHideLastNode=e.setLastNodeForHide(c,j);h&&(e.setNodeLineIcos(c,d.tmpHideFirstNode),e.setNodeLineIcos(c,d.tmpHideLastNode));g=d.tmpHideFirstNode===b;i=d.tmpHideLastNode===b;n&&n.apply(d,arguments);h&&i&&e.clearOldLastNode(c,b,h)};var o=d.makeChkFlag;if(o)d.makeChkFlag=function(c,a){(!a||!d.isHidden(c,a))&&o.apply(d,arguments)};var p=d.getTreeCheckedNodes; e,i,h){(!f||!d.isHidden(c,f))&&b.apply(a,arguments)}});var n=d.initNode;d.initNode=function(c,a,b,f,g,i,h){var j=(f?f:d.getRoot(c))[c.data.key.children];d.tmpHideFirstNode=e.setFirstNodeForHide(c,j);d.tmpHideLastNode=e.setLastNodeForHide(c,j);h&&(e.setNodeLineIcos(c,d.tmpHideFirstNode),e.setNodeLineIcos(c,d.tmpHideLastNode));g=d.tmpHideFirstNode===b;i=d.tmpHideLastNode===b;n&&n.apply(d,arguments);h&&i&&e.clearOldLastNode(c,b,h)};var o=d.makeChkFlag;if(o)d.makeChkFlag=function(c,a){(!a||!d.isHidden(c,
if(p)d.getTreeCheckedNodes=function(c,a,b,f){if(a&&a.length>0){var e=a[0].getParentNode();if(e&&d.isHidden(c,e))return[]}return p.apply(d,arguments)};var q=d.getTreeChangeCheckedNodes;if(q)d.getTreeChangeCheckedNodes=function(c,a,b){if(a&&a.length>0){var e=a[0].getParentNode();if(e&&d.isHidden(c,e))return[]}return q.apply(d,arguments)};var r=e.expandCollapseSonNode;if(r)e.expandCollapseSonNode=function(c,a,b,f,g){(!a||!d.isHidden(c,a))&&r.apply(e,arguments)};var s=e.setSonNodeCheckBox;if(s)e.setSonNodeCheckBox= a))&&o.apply(d,arguments)};var p=d.getTreeCheckedNodes;if(p)d.getTreeCheckedNodes=function(c,a,b,f){if(a&&a.length>0){var e=a[0].getParentNode();if(e&&d.isHidden(c,e))return[]}return p.apply(d,arguments)};var q=d.getTreeChangeCheckedNodes;if(q)d.getTreeChangeCheckedNodes=function(c,a,b){if(a&&a.length>0){var e=a[0].getParentNode();if(e&&d.isHidden(c,e))return[]}return q.apply(d,arguments)};var r=e.expandCollapseSonNode;if(r)e.expandCollapseSonNode=function(c,a,b,f,g){(!a||!d.isHidden(c,a))&&r.apply(e,
function(c,a,b,f){(!a||!d.isHidden(c,a))&&s.apply(e,arguments)};var t=e.repairParentChkClassWithSelf;if(t)e.repairParentChkClassWithSelf=function(c,a){(!a||!d.isHidden(c,a))&&t.apply(e,arguments)}})(jQuery); arguments)};var s=e.setSonNodeCheckBox;if(s)e.setSonNodeCheckBox=function(c,a,b,f){(!a||!d.isHidden(c,a))&&s.apply(e,arguments)};var t=e.repairParentChkClassWithSelf;if(t)e.repairParentChkClassWithSelf=function(c,a){(!a||!d.isHidden(c,a))&&t.apply(e,arguments)}})(jQuery);
...@@ -13,7 +13,10 @@ ...@@ -13,7 +13,10 @@
</font> </font>
*2018.12.10* v3.5.38 *2019.01.17* v3.5.39
* [修改] data.nodeChecked & data.isHidden & data.nodeIsParent 的 返回值规范为 boolean Thanks @xinhochen & @田biubiu
*2019.01.08* v3.5.38
* [修改] data.nodeChecked & data.isHidden 的 返回值规范为 boolean Thanks @xinhochen * [修改] data.nodeChecked & data.isHidden 的 返回值规范为 boolean Thanks @xinhochen
*2018.12.10* v3.5.37 *2018.12.10* v3.5.37
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册