提交 9523be07 编写于 作者: Z ztree

* [修改] 替换 scrollIntoViewIfNeeded 方法 Thanks @jocki84

   * [修改] 部分 API 文字错误
上级 3935f38e
jQuery Tree Plugin ---- zTree
============
last verson : 3.5.36
last verson : 3.5.37
**Donate to zTree** : http://www.treejs.cn/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.36 API 文档</em></h1><p></p>
<h1><em>zTree v3.5.37 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.36 API Document</em></h1><p></p>
<h1><em>zTree v3.5.37 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;">
......
此差异已折叠。
......@@ -15,7 +15,7 @@
<h4><b>checked</b><span>Boolean</span></h4>
<p>checked = true 表示勾选全部节点</p>
<p>checked = false 表示全部节点取消勾选</p>
<p class="highlight_red">不会影响 treeNode.nochecked = true 的节点。</p>
<p class="highlight_red">不会影响 treeNode.nocheck = true 的节点。</p>
<p class="highlight_red">不会影响未加载的节点。</p>
<h4 class="topLine"><b>返回值</b><span></span></h4>
<p>目前无任何返回值</p>
......
......@@ -19,12 +19,12 @@
<p>checked = true 表示勾选节点</p>
<p>checked = false 表示节点取消勾选</p>
<p class="highlight_red">省略此参数,则根据对此节点的勾选状态进行 toggle 切换</p>
<p class="highlight_red">不影响 treeNode.nochecked = true 的节点。</p>
<p class="highlight_red">不影响 treeNode.nocheck = true 的节点。</p>
<h4 class="topLine"><b>checkTypeFlag</b><span>Boolean</span></h4>
<p>checkTypeFlag = true 表示按照 setting.check.chkboxType 属性进行父子节点的勾选联动操作</p>
<p>checkTypeFlag = false 表示只修改此节点勾选状态,无任何勾选联动操作</p>
<p class="highlight_red">checkTypeFlag = false 且 treeNode.checked = checked 时,不会触发回调函数,直接返回</p>
<p class="highlight_red">不影响父子节点中 treeNode.nochecked = true 的节点。</p>
<p class="highlight_red">不影响父子节点中 treeNode.nocheck = true 的节点。</p>
<h4 class="topLine"><b>callbackFlag</b><span>Boolean</span></h4>
<p>callbackFlag = true 表示执行此方法时触发 beforeCheck & onCheck 事件回调函数</p>
<p>callbackFlag = false 表示执行此方法时不触发事件回调函数</p>
......
......@@ -15,7 +15,7 @@
<p>checked = true 表示获取 被勾选 的节点集合</p>
<p>checked = false 表示获取 未勾选 的节点集合</p>
<p class="highlight_red">省略此参数,等同于 true。</p>
<p class="highlight_red">对于 treeNode.nochecked = true 的节点不进行获取。</p>
<p class="highlight_red">对于 treeNode.nocheck = true 的节点不进行获取。</p>
<h4 class="topLine"><b>返回值</b><span>Array(JSON)</span></h4>
<p>返回全部符合要求的节点集合 Array</p>
</div>
......
......@@ -20,7 +20,7 @@
<p>disabled = true 表示禁用 checkbox / radio</p>
<p>disabled = false 表示解禁 checkbox / radio</p>
<p class="highlight_red">省略此参数,等同于 disabled = false </p>
<p class="highlight_red">不影响 treeNode.nochecked = true 的节点。</p>
<p class="highlight_red">不影响 treeNode.nocheck = true 的节点。</p>
<h4 class="topLine"><b>inheritParent</b><span>Boolean</span></h4>
<p>inheritParent = true 表示全部父节点进行同样的操作</p>
<p>inheritParent = false 表示不影响父节点</p>
......
......@@ -20,7 +20,7 @@
<p>checkTypeFlag = true 表示按照 setting.check.chkboxType 属性进行父子节点的勾选联动操作</p>
<p>checkTypeFlag = false 表示只修改此节点勾选状态,无任何勾选联动操作</p>
<p class="highlight_red">当 setting.check.enable = true 且 setting.check.chkStyle = "checkbox" 时才有效</p>
<p class="highlight_red">不影响父子节点中 treeNode.nochecked = true 的节点。</p>
<p class="highlight_red">不影响父子节点中 treeNode.nocheck = true 的节点。</p>
<h4 class="topLine"><b>返回值</b><span></span></h4>
<p>目前无任何返回值</p>
</div>
......
......@@ -15,7 +15,7 @@
<h4><b>checked</b><span>Boolean</span></h4>
<p>checked = true means: check all nodes.</p>
<p>checked = false means: uncheck all nodes.</p>
<p class="highlight_red">Don't affect the node which 'nochecked' attribute is true.</p>
<p class="highlight_red">Don't affect the node which 'nocheck' attribute is true.</p>
<p class="highlight_red">Don't affect the node is not loaded.</p>
<h4 class="topLine"><b>Return </b><span>none</span></h4>
<p>no return value</p>
......
......@@ -19,12 +19,12 @@
<p>checked = true means: check node.</p>
<p>checked = false means: uncheck node.</p>
<p class="highlight_red">If this parameter is omitted, then toggle check or uncheck depend this node's expanded state.</p>
<p class="highlight_red">Don't affect the node which 'nochecked' attribute is true.</p>
<p class="highlight_red">Don't affect the node which 'nocheck' attribute is true.</p>
<h4 class="topLine"><b>checkTypeFlag</b><span>Boolean</span></h4>
<p>checkTypeFlag = true means: According to 'setting.check.chkboxType' attribute automatically check or uncheck the parent and child nodes.</p>
<p>checkTypeFlag = false means: only check or uncheck this node, don't affect its parent and child nodes.</p>
<p class="highlight_red">When checkTypeFlag = false and treeNode.checked = checked, will not trigger callback function.</p>
<p class="highlight_red">Don't affect the parent and child nodes which 'nochecked' attribute is true.</p>
<p class="highlight_red">Don't affect the parent and child nodes which 'nocheck' attribute is true.</p>
<h4 class="topLine"><b>callbackFlag</b><span>Boolean</span></h4>
<p>callbackFlag = true means: call this method, will trigger 'beforeCheck' & 'onCheck' callback.</p>
<p>callbackFlag = false means: call this method, will not trigger callback.</p>
......
......@@ -15,7 +15,7 @@
<p>checked = true means: get the collection of nodes which be checked</p>
<p>checked = false means: get the collection of nodes which be unchecked</p>
<p class="highlight_red">If this parameter is omitted, it is same as 'checked = true'</p>
<p class="highlight_red">Don't get the nodes which 'nochecked' attribute is true.</p>
<p class="highlight_red">Don't get the nodes which 'nocheck' attribute is true.</p>
<h4 class="topLine"><b>Return </b><span>Array(JSON)</span></h4>
<p>return the collection of nodes which be checked or unchecked. (Array)</p>
</div>
......
......@@ -20,7 +20,7 @@
<p>disabled = true means: the node's checkbox / radio is disabled.</p>
<p>disabled = false means: the node's checkbox / radio is removed disabled.</p>
<p class="highlight_red">If this parameter is omitted, it is same as disabled = false </p>
<p class="highlight_red">Don't affect the node which 'nochecked' attribute is true.</p>
<p class="highlight_red">Don't affect the node which 'nocheck' attribute is true.</p>
<h4 class="topLine"><b>inheritParent</b><span>Boolean</span></h4>
<p>inheritParent = true means: all parent nodes's disabled status will be same as this node.</p>
<p>inheritParent = false means: all parent nodes's disabled status will be not affected.</p>
......
......@@ -20,7 +20,7 @@
<p>checkTypeFlag = true means: According to 'setting.check.chkboxType' attribute automatically check or uncheck the parent and child nodes.</p>
<p>checkTypeFlag = false means: only check or uncheck this node, don't affect its parent and child nodes.</p>
<p class="highlight_red">This parameter is valid when 'setting.check.enable = true' and 'setting.check.chkStyle = "checkbox"'</p>
<p class="highlight_red">Don't affect the parent and child nodes which 'nochecked' attribute is true.</p>
<p class="highlight_red">Don't affect the parent and child nodes which 'nocheck' attribute is true.</p>
<h4 class="topLine"><b>Return </b><span>none</span></h4>
<p>no return value</p>
</div>
......
此差异已折叠。
此差异已折叠。
/*
* JQuery zTree core v3.5.36
* JQuery zTree core v3.5.37
* http://treejs.cn/
*
* Copyright (c) 2010 Hunter.z
......@@ -8,7 +8,7 @@
* http://www.opensource.org/licenses/mit-license.php
*
* email: hunter.z@263.net
* Date: 2018-06-26
* Date: 2018-08-21
*/
(function ($) {
var settings = {}, roots = {}, caches = {},
......@@ -818,7 +818,7 @@
},
onClickNode: function (event, node) {
var setting = data.getSetting(event.data.treeId),
clickFlag = ( (setting.view.autoCancelSelected && (event.ctrlKey || event.metaKey)) && data.isSelectedNode(setting, node)) ? 0 : (setting.view.autoCancelSelected && (event.ctrlKey || event.metaKey) && setting.view.selectedMulti) ? 2 : 1;
clickFlag = ((setting.view.autoCancelSelected && (event.ctrlKey || event.metaKey)) && data.isSelectedNode(setting, node)) ? 0 : (setting.view.autoCancelSelected && (event.ctrlKey || event.metaKey) && setting.view.selectedMulti) ? 2 : 1;
if (tools.apply(setting.callback.beforeClick, [setting.treeId, node, clickFlag], true) == false) return true;
if (clickFlag === 0) {
view.cancelPreSelectedNode(setting, node);
......@@ -858,7 +858,7 @@
},
onSelectStart: function (e) {
var n = e.originalEvent.srcElement.nodeName.toLowerCase();
return (n === "input" || n === "textarea" );
return (n === "input" || n === "textarea");
}
},
//method of tools for zTree
......@@ -921,7 +921,7 @@
return ($(target).parent("li").get(0) || $(target).parentsUntil("li").parent().get(0));
},
isChildOrSelf: function (dom, parentId) {
return ( $(dom).closest("#" + parentId).length > 0 );
return ($(dom).closest("#" + parentId).length > 0);
},
uCanDo: function (setting, e) {
return true;
......@@ -1437,68 +1437,66 @@
}
return;
}
// code src: http://jsfiddle.net/08u6cxwj/
// CC-BY jocki84@googlemail.com, https://gist.github.com/jocki84/6ffafd003387179a988e
if (!Element.prototype.scrollIntoViewIfNeeded) {
Element.prototype.scrollIntoViewIfNeeded = function (centerIfNeeded) {
function withinBounds(value, min, max, extent) {
if (false === centerIfNeeded || max <= value + extent && value <= min + extent) {
return Math.min(max, Math.max(min, value));
} else {
return (min + max) / 2;
}
}
"use strict";
function makeArea(left, top, width, height) {
return {
"left": left, "top": top, "width": width, "height": height
, "right": left + width, "bottom": top + height
, "translate": function (x, y) {
return makeArea(x + left, y + top, width, height);
function makeRange(start, length) {
return {"start": start, "length": length, "end": start + length};
}
, "relativeFromTo": function (lhs, rhs) {
var newLeft = left, newTop = top;
lhs = lhs.offsetParent;
rhs = rhs.offsetParent;
if (lhs === rhs) {
return area;
}
for (; lhs; lhs = lhs.offsetParent) {
newLeft += lhs.offsetLeft + lhs.clientLeft;
newTop += lhs.offsetTop + lhs.clientTop;
function coverRange(inner, outer) {
if (
false === centerIfNeeded ||
(outer.start < inner.end && inner.start < outer.end)
) {
return Math.max(
inner.end - outer.length,
Math.min(outer.start, inner.start)
);
}
for (; rhs; rhs = rhs.offsetParent) {
newLeft -= rhs.offsetLeft + rhs.clientLeft;
newTop -= rhs.offsetTop + rhs.clientTop;
return (inner.start + inner.end - outer.length) / 2;
}
return makeArea(newLeft, newTop, width, height);
function makePoint(x, y) {
return {
"x": x,
"y": y,
"translate": function translate(dX, dY) {
return makePoint(x + dX, y + dY);
}
};
}
var parent, elem = this, area = makeArea(
this.offsetLeft, this.offsetTop,
this.offsetWidth, this.offsetHeight);
while (tools.isElement(parent = elem.parentNode)) {
var clientLeft = parent.offsetLeft + parent.clientLeft;
var clientTop = parent.offsetTop + parent.clientTop;
// Make area relative to parent's client area.
area = area.relativeFromTo(elem, parent).translate(-clientLeft, -clientTop);
function absolute(elem, pt) {
while (elem) {
pt = pt.translate(elem.offsetLeft, elem.offsetTop);
elem = elem.offsetParent;
}
return pt;
}
parent.scrollLeft = withinBounds(
parent.scrollLeft,
area.right - parent.clientWidth, area.left,
parent.clientWidth);
var target = absolute(this, makePoint(0, 0)),
extent = makePoint(this.offsetWidth, this.offsetHeight),
elem = this.parentNode,
origin;
parent.scrollTop = withinBounds(
parent.scrollTop,
area.bottom - parent.clientHeight, area.top,
parent.clientHeight);
while (elem instanceof HTMLElement) {
// Apply desired scroll amount.
origin = absolute(elem, makePoint(elem.clientLeft, elem.clientTop));
elem.scrollLeft = coverRange(
makeRange(target.x - origin.x, extent.x),
makeRange(elem.scrollLeft, elem.clientWidth)
);
elem.scrollTop = coverRange(
makeRange(target.y - origin.y, extent.y),
makeRange(elem.scrollTop, elem.clientHeight)
);
// Determine actual scroll amount by reading back scroll properties.
area = area.translate(clientLeft - parent.scrollLeft,
clientTop - parent.scrollTop);
elem = parent;
target = target.translate(-elem.scrollLeft, -elem.scrollTop);
elem = elem.parentNode;
}
};
}
......@@ -1869,12 +1867,12 @@
return data.isSelectedNode(setting, node);
},
reAsyncChildNodesPromise: function (parentNode, reloadType, isSilent) {
var promise = new Promise(function(resolve, reject) {
var promise = new Promise(function (resolve, reject) {
try {
zTreeTools.reAsyncChildNodes(parentNode, reloadType, isSilent, function() {
zTreeTools.reAsyncChildNodes(parentNode, reloadType, isSilent, function () {
resolve(parentNode);
});
} catch(e) {
} catch (e) {
reject(e);
}
});
......
此差异已折叠。
/*
* JQuery zTree excheck v3.5.36
* JQuery zTree excheck v3.5.37
* http://treejs.cn/
*
* Copyright (c) 2010 Hunter.z
......@@ -8,9 +8,9 @@
* http://www.opensource.org/licenses/mit-license.php
*
* email: hunter.z@263.net
* Date: 2018-06-26
* Date: 2018-08-21
*/
(function($){
(function ($) {
//default consts of excheck
var _consts = {
event: {
......@@ -55,8 +55,8 @@
}
},
callback: {
beforeCheck:null,
onCheck:null
beforeCheck: null,
onCheck: null
}
},
//default root of excheck
......@@ -65,9 +65,10 @@
r.radioCheckedList = [];
},
//default cache of excheck
_initCache = function(treeId) {},
_initCache = function (treeId) {
},
//default bind event of excheck
_bindEvent = function(setting) {
_bindEvent = function (setting) {
var o = setting.treeObj,
c = consts.event;
o.bind(c.CHECK, function (event, srcEvent, treeId, node) {
......@@ -75,13 +76,13 @@
tools.apply(setting.callback.onCheck, [event, treeId, node]);
});
},
_unbindEvent = function(setting) {
_unbindEvent = function (setting) {
var o = setting.treeObj,
c = consts.event;
o.unbind(c.CHECK);
},
//default event proxy of excheck
_eventProxy = function(e) {
_eventProxy = function (e) {
var target = e.target,
setting = data.getSetting(e.data.treeId),
tId = "", node = null,
......@@ -89,22 +90,22 @@
nodeEventCallback = null, treeEventCallback = null;
if (tools.eqs(e.type, "mouseover")) {
if (setting.check.enable && tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.CHECK) !== null) {
if (setting.check.enable && tools.eqs(target.tagName, "span") && target.getAttribute("treeNode" + consts.id.CHECK) !== null) {
tId = tools.getNodeMainDom(target).id;
nodeEventType = "mouseoverCheck";
}
} else if (tools.eqs(e.type, "mouseout")) {
if (setting.check.enable && tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.CHECK) !== null) {
if (setting.check.enable && tools.eqs(target.tagName, "span") && target.getAttribute("treeNode" + consts.id.CHECK) !== null) {
tId = tools.getNodeMainDom(target).id;
nodeEventType = "mouseoutCheck";
}
} else if (tools.eqs(e.type, "click")) {
if (setting.check.enable && tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.CHECK) !== null) {
if (setting.check.enable && tools.eqs(target.tagName, "span") && target.getAttribute("treeNode" + consts.id.CHECK) !== null) {
tId = tools.getNodeMainDom(target).id;
nodeEventType = "checkNode";
}
}
if (tId.length>0) {
if (tId.length > 0) {
node = data.getNodeCache(setting, tId);
switch (nodeEventType) {
case "checkNode" :
......@@ -129,7 +130,7 @@
return proxyResult
},
//default init node of excheck
_initNode = function(setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) {
_initNode = function (setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) {
if (!n) return;
var checked = data.nodeChecked(setting, n);
checked = data.nodeChecked(setting, n, checked);
......@@ -142,7 +143,9 @@
n.halfCheck = !!n.halfCheck;
n.check_Child_State = -1;
n.check_Focus = false;
n.getCheckStatus = function() {return data.getCheckStatus(setting, n);};
n.getCheckStatus = function () {
return data.getCheckStatus(setting, n);
};
if (setting.check.chkStyle == consts.radio.STYLE && setting.check.radioType == consts.radio.TYPE_ALL && checked) {
var r = data.getRoot(setting);
......@@ -150,15 +153,15 @@
}
},
//add dom for check
_beforeA = function(setting, node, html) {
_beforeA = function (setting, node, html) {
if (setting.check.enable) {
data.makeChkFlag(setting, node);
html.push("<span ID='", node.tId, consts.id.CHECK, "' class='", view.makeChkClass(setting, node), "' treeNode", consts.id.CHECK, (node.nocheck === true?" style='display:none;'":""),"></span>");
html.push("<span ID='", node.tId, consts.id.CHECK, "' class='", view.makeChkClass(setting, node), "' treeNode", consts.id.CHECK, (node.nocheck === true ? " style='display:none;'" : ""), "></span>");
}
},
//update zTreeObj, add method of check
_zTreeTools = function(setting, zTreeTools) {
zTreeTools.checkNode = function(node, checked, checkTypeFlag, callbackFlag) {
_zTreeTools = function (setting, zTreeTools) {
zTreeTools.checkNode = function (node, checked, checkTypeFlag, callbackFlag) {
var nodeChecked = data.nodeChecked(setting, node);
if (node.chkDisabled === true) return;
if (checked !== true && checked !== false) {
......@@ -183,22 +186,22 @@
}
}
zTreeTools.checkAllNodes = function(checked) {
zTreeTools.checkAllNodes = function (checked) {
view.repairAllChk(this.setting, !!checked);
}
zTreeTools.getCheckedNodes = function(checked) {
zTreeTools.getCheckedNodes = function (checked) {
var checked = (checked !== false);
var children = data.nodeChildren(setting, data.getRoot(this.setting));
return data.getTreeCheckedNodes(this.setting, children, checked);
}
zTreeTools.getChangeCheckedNodes = function() {
zTreeTools.getChangeCheckedNodes = function () {
var children = data.nodeChildren(setting, data.getRoot(this.setting));
return data.getTreeChangeCheckedNodes(this.setting, children);
}
zTreeTools.setChkDisabled = function(node, disabled, inheritParent, inheritChildren) {
zTreeTools.setChkDisabled = function (node, disabled, inheritParent, inheritChildren) {
disabled = !!disabled;
inheritParent = !!inheritParent;
inheritChildren = !!inheritChildren;
......@@ -207,7 +210,7 @@
}
var _updateNode = zTreeTools.updateNode;
zTreeTools.updateNode = function(node, checkTypeFlag) {
zTreeTools.updateNode = function (node, checkTypeFlag) {
if (_updateNode) _updateNode.apply(zTreeTools, arguments);
if (!node || !this.setting.check.enable) return;
var nObj = $$(node, this.setting);
......@@ -221,17 +224,18 @@
},
//method of operate data
_data = {
getRadioCheckedList: function(setting) {
getRadioCheckedList: function (setting) {
var checkedList = data.getRoot(setting).radioCheckedList;
for (var i=0, j=checkedList.length; i<j; i++) {
if(!data.getNodeCache(setting, checkedList[i].tId)) {
for (var i = 0, j = checkedList.length; i < j; i++) {
if (!data.getNodeCache(setting, checkedList[i].tId)) {
checkedList.splice(i, 1);
i--; j--;
i--;
j--;
}
}
return checkedList;
},
getCheckStatus: function(setting, node) {
getCheckStatus: function (setting, node) {
if (!setting.check.enable || node.nocheck || node.chkDisabled) return null;
var checked = data.nodeChecked(setting, node),
r = {
......@@ -240,7 +244,7 @@
};
return r;
},
getTreeCheckedNodes: function(setting, nodes, checked, results) {
getTreeCheckedNodes: function (setting, nodes, checked, results) {
if (!nodes) return [];
var onlyOne = (checked && setting.check.chkStyle == consts.radio.STYLE && setting.check.radioType == consts.radio.TYPE_ALL);
results = !results ? [] : results;
......@@ -250,18 +254,18 @@
var nodeChecked = data.nodeChecked(setting, node);
if (node.nocheck !== true && node.chkDisabled !== true && nodeChecked == checked) {
results.push(node);
if(onlyOne) {
if (onlyOne) {
break;
}
}
data.getTreeCheckedNodes(setting, children, checked, results);
if(onlyOne && results.length > 0) {
if (onlyOne && results.length > 0) {
break;
}
}
return results;
},
getTreeChangeCheckedNodes: function(setting, nodes, results) {
getTreeChangeCheckedNodes: function (setting, nodes, results) {
if (!nodes) return [];
results = !results ? [] : results;
for (var i = 0, l = nodes.length; i < l; i++) {
......@@ -275,7 +279,7 @@
}
return results;
},
makeChkFlag: function(setting, node) {
makeChkFlag: function (setting, node) {
if (!node) return;
var chkFlag = -1;
var children = data.nodeChildren(setting, node);
......@@ -292,11 +296,12 @@
} else if (nodeChecked) {
tmp = 2;
} else {
tmp = cNode.check_Child_State > 0 ? 2:0;
tmp = cNode.check_Child_State > 0 ? 2 : 0;
}
if (tmp == 2) {
chkFlag = 2; break;
} else if (tmp == 0){
chkFlag = 2;
break;
} else if (tmp == 0) {
chkFlag = 0;
}
} else if (setting.check.chkStyle == consts.checkbox.STYLE) {
......@@ -310,11 +315,14 @@
tmp = (cNode.check_Child_State > 0) ? 1 : 0;
}
if (tmp === 1) {
chkFlag = 1; break;
chkFlag = 1;
break;
} else if (tmp === 2 && chkFlag > -1 && i > 0 && tmp !== chkFlag) {
chkFlag = 1; break;
chkFlag = 1;
break;
} else if (chkFlag === 2 && tmp > -1 && tmp < 2) {
chkFlag = 1; break;
chkFlag = 1;
break;
} else if (tmp > -1) {
chkFlag = tmp;
}
......@@ -325,9 +333,7 @@
}
},
//method of event proxy
_event = {
},
_event = {},
//method of event handler
_handler = {
onCheckNode: function (event, node) {
......@@ -343,7 +349,7 @@
setting.treeObj.trigger(consts.event.CHECK, [event, setting.treeId, node]);
return true;
},
onMouseoverCheck: function(event, node) {
onMouseoverCheck: function (event, node) {
if (node.chkDisabled === true) return false;
var setting = data.getSetting(event.data.treeId),
checkObj = $$(node, consts.id.CHECK, setting);
......@@ -351,7 +357,7 @@
view.setChkClass(setting, checkObj, node);
return true;
},
onMouseoutCheck: function(event, node) {
onMouseoutCheck: function (event, node) {
if (node.chkDisabled === true) return false;
var setting = data.getSetting(event.data.treeId),
checkObj = $$(node, consts.id.CHECK, setting);
......@@ -361,12 +367,10 @@
}
},
//method of tools for zTree
_tools = {
},
_tools = {},
//method of operate ztree dom
_view = {
checkNodeRelation: function(setting, node) {
checkNodeRelation: function (setting, node) {
var pNode, i, l,
r = consts.radio;
var nodeChecked = data.nodeChecked(setting, node);
......@@ -374,7 +378,7 @@
var checkedList = data.getRadioCheckedList(setting);
if (nodeChecked) {
if (setting.check.radioType == r.TYPE_ALL) {
for (i = checkedList.length-1; i >= 0; i--) {
for (i = checkedList.length - 1; i >= 0; i--) {
pNode = checkedList[i];
var pNodeChecked = data.nodeChecked(setting, pNode);
if (pNodeChecked && pNode != node) {
......@@ -411,10 +415,10 @@
} else {
var children = data.nodeChildren(setting, node);
if (nodeChecked && (!children || children.length==0 || setting.check.chkboxType.Y.indexOf("s") > -1)) {
if (nodeChecked && (!children || children.length == 0 || setting.check.chkboxType.Y.indexOf("s") > -1)) {
view.setSonNodeCheckBox(setting, node, true);
}
if (!nodeChecked && (!children || children.length==0 || setting.check.chkboxType.N.indexOf("s") > -1)) {
if (!nodeChecked && (!children || children.length == 0 || setting.check.chkboxType.N.indexOf("s") > -1)) {
view.setSonNodeCheckBox(setting, node, false);
}
if (nodeChecked && setting.check.chkboxType.Y.indexOf("p") > -1) {
......@@ -425,7 +429,7 @@
}
}
},
makeChkClass: function(setting, node) {
makeChkClass: function (setting, node) {
var c = consts.checkbox, r = consts.radio,
fullStyle = "";
var nodeChecked = data.nodeChecked(setting, node);
......@@ -434,19 +438,19 @@
} else if (node.halfCheck) {
fullStyle = c.PART;
} else if (setting.check.chkStyle == r.STYLE) {
fullStyle = (node.check_Child_State < 1)? c.FULL:c.PART;
fullStyle = (node.check_Child_State < 1) ? c.FULL : c.PART;
} else {
fullStyle = nodeChecked ? ((node.check_Child_State === 2 || node.check_Child_State === -1) ? c.FULL:c.PART) : ((node.check_Child_State < 1)? c.FULL:c.PART);
fullStyle = nodeChecked ? ((node.check_Child_State === 2 || node.check_Child_State === -1) ? c.FULL : c.PART) : ((node.check_Child_State < 1) ? c.FULL : c.PART);
}
var chkName = setting.check.chkStyle + "_" + (nodeChecked ? c.TRUE : c.FALSE) + "_" + fullStyle;
chkName = (node.check_Focus && node.chkDisabled !== true) ? chkName + "_" + c.FOCUS : chkName;
return consts.className.BUTTON + " " + c.DEFAULT + " " + chkName;
},
repairAllChk: function(setting, checked) {
repairAllChk: function (setting, checked) {
if (setting.check.enable && setting.check.chkStyle === consts.checkbox.STYLE) {
var root = data.getRoot(setting);
var children = data.nodeChildren(setting, root);
for (var i = 0, l = children.length; i<l ; i++) {
for (var i = 0, l = children.length; i < l; i++) {
var node = children[i];
if (node.nocheck !== true && node.chkDisabled !== true) {
data.nodeChecked(setting, node, checked);
......@@ -455,7 +459,7 @@
}
}
},
repairChkClass: function(setting, node) {
repairChkClass: function (setting, node) {
if (!node) return;
data.makeChkFlag(setting, node);
if (node.nocheck !== true) {
......@@ -463,13 +467,13 @@
view.setChkClass(setting, checkObj, node);
}
},
repairParentChkClass: function(setting, node) {
repairParentChkClass: function (setting, node) {
if (!node || !node.parentTId) return;
var pNode = node.getParentNode();
view.repairChkClass(setting, pNode);
view.repairParentChkClass(setting, pNode);
},
repairParentChkClassWithSelf: function(setting, node) {
repairParentChkClassWithSelf: function (setting, node) {
if (!node) return;
var children = data.nodeChildren(setting, node);
if (children && children.length > 0) {
......@@ -478,7 +482,7 @@
view.repairParentChkClass(setting, node);
}
},
repairSonChkDisabled: function(setting, node, chkDisabled, inherit) {
repairSonChkDisabled: function (setting, node, chkDisabled, inherit) {
if (!node) return;
if (node.chkDisabled != chkDisabled) {
node.chkDisabled = chkDisabled;
......@@ -492,7 +496,7 @@
}
}
},
repairParentChkDisabled: function(setting, node, chkDisabled, inherit) {
repairParentChkDisabled: function (setting, node, chkDisabled, inherit) {
if (!node) return;
if (node.chkDisabled != chkDisabled && inherit) {
node.chkDisabled = chkDisabled;
......@@ -500,7 +504,7 @@
view.repairChkClass(setting, node);
view.repairParentChkDisabled(setting, node.getParentNode(), chkDisabled, inherit);
},
setChkClass: function(setting, obj, node) {
setChkClass: function (setting, obj, node) {
if (!obj) return;
if (node.nocheck === true) {
obj.hide();
......@@ -509,7 +513,7 @@
}
obj.attr('class', view.makeChkClass(setting, node));
},
setParentNodeCheckBox: function(setting, node, value, srcNode) {
setParentNodeCheckBox: function (setting, node, value, srcNode) {
var checkObj = $$(node, consts.id.CHECK, setting);
if (!srcNode) srcNode = node;
data.makeChkFlag(setting, node);
......@@ -539,7 +543,7 @@
}
}
},
setSonNodeCheckBox: function(setting, node, value, srcNode) {
setSonNodeCheckBox: function (setting, node, value, srcNode) {
if (!node) return;
var checkObj = $$(node, consts.id.CHECK, setting);
if (!srcNode) srcNode = node;
......@@ -590,7 +594,7 @@
event = zt._z.event,
$$ = tools.$;
data.nodeChecked = function(setting, node, newChecked) {
data.nodeChecked = function (setting, node, newChecked) {
if (!node) {
return false;
}
......@@ -616,13 +620,13 @@
data.addZTreeTools(_zTreeTools);
var _createNodes = view.createNodes;
view.createNodes = function(setting, level, nodes, parentNode, index) {
view.createNodes = function (setting, level, nodes, parentNode, index) {
if (_createNodes) _createNodes.apply(view, arguments);
if (!nodes) return;
view.repairParentChkClassWithSelf(setting, parentNode);
}
var _removeNode = view.removeNode;
view.removeNode = function(setting, node) {
view.removeNode = function (setting, node) {
var parentNode = node.getParentNode();
if (_removeNode) _removeNode.apply(view, arguments);
if (!node || !parentNode) return;
......@@ -631,7 +635,7 @@
}
var _appendNodes = view.appendNodes;
view.appendNodes = function(setting, level, nodes, parentNode, index, initFlag, openFlag) {
view.appendNodes = function (setting, level, nodes, parentNode, index, initFlag, openFlag) {
var html = "";
if (_appendNodes) {
html = _appendNodes.apply(view, arguments);
......
/*
* JQuery zTree excheck v3.5.36
* JQuery zTree excheck v3.5.37
* http://treejs.cn/
*
* Copyright (c) 2010 Hunter.z
......@@ -8,7 +8,7 @@
* http://www.opensource.org/licenses/mit-license.php
*
* email: hunter.z@263.net
* Date: 2018-06-26
* Date: 2018-08-21
*/
(function(n){var q,r,s,p={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"}},w={check:{enable:!1,autoCheckTrigger:!1,chkStyle:p.checkbox.STYLE,nocheckInherit:!1,chkDisabledInherit:!1,radioType:p.radio.TYPE_LEVEL,chkboxType:{Y:"ps",N:"ps"}},data:{key:{checked:"checked"}},callback:{beforeCheck:null,onCheck:null}};q=function(c,
a){if(a.chkDisabled===!0)return!1;var b=e.getSetting(c.data.treeId);if(i.apply(b.callback.beforeCheck,[b.treeId,a],!0)==!1)return!0;var d=e.nodeChecked(b,a);e.nodeChecked(b,a,!d);f.checkNodeRelation(b,a);d=m(a,h.id.CHECK,b);f.setChkClass(b,d,a);f.repairParentChkClassWithSelf(b,a);b.treeObj.trigger(h.event.CHECK,[c,b.treeId,a]);return!0};r=function(c,a){if(a.chkDisabled===!0)return!1;var b=e.getSetting(c.data.treeId),d=m(a,h.id.CHECK,b);a.check_Focus=!0;f.setChkClass(b,d,a);return!0};s=function(c,
......
此差异已折叠。
/*
* JQuery zTree exedit v3.5.36
* JQuery zTree exedit v3.5.37
* http://treejs.cn/
*
* Copyright (c) 2010 Hunter.z
......@@ -8,7 +8,7 @@
* http://www.opensource.org/licenses/mit-license.php
*
* email: hunter.z@263.net
* Date: 2018-06-26
* Date: 2018-08-21
*/
(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=[];
......
/*
* JQuery zTree exHideNodes v3.5.36
* JQuery zTree exHideNodes v3.5.37
* http://treejs.cn/
*
* Copyright (c) 2010 Hunter.z
......@@ -8,9 +8,9 @@
* http://www.opensource.org/licenses/mit-license.php
*
* email: hunter.z@263.net
* Date: 2018-06-26
* Date: 2018-08-21
*/
(function($){
(function ($) {
var _setting = {
data: {
key: {
......@@ -19,28 +19,29 @@
}
};
//default init node of exLib
var _initNode = function(setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) {
var _initNode = function (setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) {
var isHidden = data.isHidden(setting, n);
data.isHidden(setting, n, isHidden);
data.initHideForExCheck(setting, n);
},
//add dom for check
_beforeA = function(setting, node, html) {},
_beforeA = function (setting, node, html) {
},
//update zTreeObj, add method of exLib
_zTreeTools = function(setting, zTreeTools) {
zTreeTools.showNodes = function(nodes, options) {
_zTreeTools = function (setting, zTreeTools) {
zTreeTools.showNodes = function (nodes, options) {
view.showNodes(setting, nodes, options);
}
zTreeTools.showNode = function(node, options) {
zTreeTools.showNode = function (node, options) {
if (!node) {
return;
}
view.showNodes(setting, [node], options);
}
zTreeTools.hideNodes = function(nodes, options) {
zTreeTools.hideNodes = function (nodes, options) {
view.hideNodes(setting, nodes, options);
}
zTreeTools.hideNode = function(node, options) {
zTreeTools.hideNode = function (node, options) {
if (!node) {
return;
}
......@@ -49,7 +50,7 @@
var _checkNode = zTreeTools.checkNode;
if (_checkNode) {
zTreeTools.checkNode = function(node, checked, checkTypeFlag, callbackFlag) {
zTreeTools.checkNode = function (node, checked, checkTypeFlag, callbackFlag) {
if (!!node && !!data.isHidden(setting, node)) {
return;
}
......@@ -59,10 +60,10 @@
},
//method of operate data
_data = {
initHideForExCheck: function(setting, n) {
initHideForExCheck: function (setting, n) {
var isHidden = data.isHidden(setting, n);
if (isHidden && setting.check && setting.check.enable) {
if(typeof n._nocheck == "undefined") {
if (typeof n._nocheck == "undefined") {
n._nocheck = !!n.nocheck
n.nocheck = true;
}
......@@ -72,10 +73,10 @@
}
}
},
initShowForExCheck: function(setting, n) {
initShowForExCheck: function (setting, n) {
var isHidden = data.isHidden(setting, n);
if (!isHidden && setting.check && setting.check.enable) {
if(typeof n._nocheck != "undefined") {
if (typeof n._nocheck != "undefined") {
n.nocheck = n._nocheck;
delete n._nocheck;
}
......@@ -91,9 +92,9 @@
},
//method of operate ztree dom
_view = {
clearOldFirstNode: function(setting, node) {
clearOldFirstNode: function (setting, node) {
var n = node.getNextNode();
while(!!n){
while (!!n) {
if (n.isFirstNode) {
n.isFirstNode = false;
view.setNodeLineIcos(setting, n);
......@@ -105,9 +106,9 @@
n = n.getNextNode();
}
},
clearOldLastNode: function(setting, node, openFlag) {
clearOldLastNode: function (setting, node, openFlag) {
var n = node.getPreNode();
while(!!n){
while (!!n) {
if (n.isLastNode) {
n.isLastNode = false;
if (openFlag) {
......@@ -121,21 +122,21 @@
n = n.getPreNode();
}
},
makeDOMNodeMainBefore: function(html, setting, node) {
makeDOMNodeMainBefore: function (html, setting, node) {
var isHidden = data.isHidden(setting, node);
html.push("<li ", (isHidden ? "style='display:none;' " : ""), "id='", node.tId, "' class='", consts.className.LEVEL, node.level,"' tabindex='0' hidefocus='true' treenode>");
html.push("<li ", (isHidden ? "style='display:none;' " : ""), "id='", node.tId, "' class='", consts.className.LEVEL, node.level, "' tabindex='0' hidefocus='true' treenode>");
},
showNode: function(setting, node, options) {
showNode: function (setting, node, options) {
data.isHidden(setting, node, false);
data.initShowForExCheck(setting, node);
$$(node, setting).show();
},
showNodes: function(setting, nodes, options) {
showNodes: function (setting, nodes, options) {
if (!nodes || nodes.length == 0) {
return;
}
var pList = {}, i, j;
for (i=0, j=nodes.length; i<j; i++) {
for (i = 0, j = nodes.length; i < j; i++) {
var n = nodes[i];
if (!pList[n.parentTId]) {
var pn = n.getParentNode();
......@@ -149,7 +150,7 @@
view.setLastNodeForShow(setting, children);
}
},
hideNode: function(setting, node, options) {
hideNode: function (setting, node, options) {
data.isHidden(setting, node, true);
node.isFirstNode = false;
node.isLastNode = false;
......@@ -157,12 +158,12 @@
view.cancelPreSelectedNode(setting, node);
$$(node, setting).hide();
},
hideNodes: function(setting, nodes, options) {
hideNodes: function (setting, nodes, options) {
if (!nodes || nodes.length == 0) {
return;
}
var pList = {}, i, j;
for (i=0, j=nodes.length; i<j; i++) {
for (i = 0, j = nodes.length; i < j; i++) {
var n = nodes[i];
if ((n.isFirstNode || n.isLastNode) && !pList[n.parentTId]) {
var pn = n.getParentNode();
......@@ -176,7 +177,7 @@
view.setLastNodeForHide(setting, children);
}
},
setFirstNode: function(setting, parentNode) {
setFirstNode: function (setting, parentNode) {
var children = data.nodeChildren(setting, parentNode);
var isHidden = data.isHidden(setting, children[0], false);
if (children.length > 0 && !isHidden) {
......@@ -185,7 +186,7 @@
view.setFirstNodeForHide(setting, children);
}
},
setLastNode: function(setting, parentNode) {
setLastNode: function (setting, parentNode) {
var children = data.nodeChildren(setting, parentNode);
var isHidden = data.isHidden(setting, children[0]);
if (children.length > 0 && !isHidden) {
......@@ -194,9 +195,9 @@
view.setLastNodeForHide(setting, children);
}
},
setFirstNodeForHide: function(setting, nodes) {
var n,i,j;
for (i=0, j=nodes.length; i<j; i++) {
setFirstNodeForHide: function (setting, nodes) {
var n, i, j;
for (i = 0, j = nodes.length; i < j; i++) {
n = nodes[i];
if (n.isFirstNode) {
break;
......@@ -212,9 +213,9 @@
}
return n;
},
setFirstNodeForShow: function(setting, nodes) {
var n,i,j, first, old;
for(i=0, j=nodes.length; i<j; i++) {
setFirstNodeForShow: function (setting, nodes) {
var n, i, j, first, old;
for (i = 0, j = nodes.length; i < j; i++) {
n = nodes[i];
var isHidden = data.isHidden(setting, n);
if (!first && !isHidden && n.isFirstNode) {
......@@ -233,11 +234,11 @@
n = null;
}
}
return {"new":first, "old":old};
return {"new": first, "old": old};
},
setLastNodeForHide: function(setting, nodes) {
var n,i;
for (i=nodes.length-1; i>=0; i--) {
setLastNodeForHide: function (setting, nodes) {
var n, i;
for (i = nodes.length - 1; i >= 0; i--) {
n = nodes[i];
if (n.isLastNode) {
break;
......@@ -253,9 +254,9 @@
}
return n;
},
setLastNodeForShow: function(setting, nodes) {
var n,i,j, last, old;
for (i=nodes.length-1; i>=0; i--) {
setLastNodeForShow: function (setting, nodes) {
var n, i, j, last, old;
for (i = nodes.length - 1; i >= 0; i--) {
n = nodes[i];
var isHidden = data.isHidden(setting, n);
if (!last && !isHidden && n.isLastNode) {
......@@ -274,7 +275,7 @@
n = null;
}
}
return {"new":last, "old":old};
return {"new": last, "old": old};
}
},
......@@ -292,7 +293,7 @@
event = zt._z.event,
$$ = tools.$;
data.isHidden = function(setting, node, newIsHidden) {
data.isHidden = function (setting, node, newIsHidden) {
if (!node) {
return false;
}
......@@ -314,8 +315,8 @@
// Override method in core
var _dInitNode = data.initNode;
data.initNode = function(setting, level, node, parentNode, isFirstNode, isLastNode, openFlag) {
var tmpPNode = (parentNode) ? parentNode: data.getRoot(setting),
data.initNode = function (setting, level, node, parentNode, isFirstNode, isLastNode, openFlag) {
var tmpPNode = (parentNode) ? parentNode : data.getRoot(setting),
children = tmpPNode[setting.data.key.children];
data.tmpHideFirstNode = view.setFirstNodeForHide(setting, children);
data.tmpHideLastNode = view.setLastNodeForHide(setting, children);
......@@ -333,7 +334,7 @@
var _makeChkFlag = data.makeChkFlag;
if (!!_makeChkFlag) {
data.makeChkFlag = function(setting, node) {
data.makeChkFlag = function (setting, node) {
if (!!node && !!data.isHidden(setting, node)) {
return;
}
......@@ -343,7 +344,7 @@
var _getTreeCheckedNodes = data.getTreeCheckedNodes;
if (!!_getTreeCheckedNodes) {
data.getTreeCheckedNodes = function(setting, nodes, checked, results) {
data.getTreeCheckedNodes = function (setting, nodes, checked, results) {
if (!!nodes && nodes.length > 0) {
var p = nodes[0].getParentNode();
if (!!p && !!data.isHidden(setting, p)) {
......@@ -356,7 +357,7 @@
var _getTreeChangeCheckedNodes = data.getTreeChangeCheckedNodes;
if (!!_getTreeChangeCheckedNodes) {
data.getTreeChangeCheckedNodes = function(setting, nodes, results) {
data.getTreeChangeCheckedNodes = function (setting, nodes, results) {
if (!!nodes && nodes.length > 0) {
var p = nodes[0].getParentNode();
if (!!p && !!data.isHidden(setting, p)) {
......@@ -369,7 +370,7 @@
var _expandCollapseSonNode = view.expandCollapseSonNode;
if (!!_expandCollapseSonNode) {
view.expandCollapseSonNode = function(setting, node, expandFlag, animateFlag, callback) {
view.expandCollapseSonNode = function (setting, node, expandFlag, animateFlag, callback) {
if (!!node && !!data.isHidden(setting, node)) {
return;
}
......@@ -379,7 +380,7 @@
var _setSonNodeCheckBox = view.setSonNodeCheckBox;
if (!!_setSonNodeCheckBox) {
view.setSonNodeCheckBox = function(setting, node, value, srcNode) {
view.setSonNodeCheckBox = function (setting, node, value, srcNode) {
if (!!node && !!data.isHidden(setting, node)) {
return;
}
......@@ -389,7 +390,7 @@
var _repairParentChkClassWithSelf = view.repairParentChkClassWithSelf;
if (!!_repairParentChkClassWithSelf) {
view.repairParentChkClassWithSelf = function(setting, node) {
view.repairParentChkClassWithSelf = function (setting, node) {
if (!!node && !!data.isHidden(setting, node)) {
return;
}
......
/*
* JQuery zTree exHideNodes v3.5.36
* JQuery zTree exHideNodes v3.5.37
* http://treejs.cn/
*
* Copyright (c) 2010 Hunter.z
......@@ -8,7 +8,7 @@
* http://www.opensource.org/licenses/mit-license.php
*
* email: hunter.z@263.net
* Date: 2018-06-26
* Date: 2018-08-21
*/
(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,
......
......@@ -13,6 +13,10 @@
</font>
*2018.08.21* v3.5.37
* [修改] 替换 scrollIntoViewIfNeeded 方法 Thanks @jocki84
* [修改] 部分 API 文字错误
*2018.06.26* v3.5.36
* [增加] setting.async.headers & setting.async.xhrFields
......@@ -150,8 +154,8 @@
*2013.03.11* v3.5.12
* [修改] 由于 jquery 1.9 中移除 event.srcElement 导致的 js 报错的bug。
* [修改] 在异步加载模式下,使用 moveNode 方法,且 moveType != "inner" 时,也会导致 targetNode 自动加载子节点的 bug
* [修改] 对已经显示的节点(nochecked=true)使用 showNodes 或 showNode 方法后,导致勾选框出现的bug。
* [修改] 对已经隐藏的节点(nochecked=false)使用 hideNodes 或 hideNode 方法后,导致勾选框消失的bug。
* [修改] 对已经显示的节点(nocheck=true)使用 showNodes 或 showNode 方法后,导致勾选框出现的bug。
* [修改] 对已经隐藏的节点(nocheck=false)使用 hideNodes 或 hideNode 方法后,导致勾选框消失的bug。
* [修改] getNodesByParamFuzzy 支持 大小写模糊。
* [修改] className 结构,提取 _consts.className.BUTTON / LEVEL / ICO_LOADING / SWITCH,便于快速修改 css 冲突。
例如:与 WordPress 产生冲突后,直接修改 core 中的 "button" 和 "level" 即可。 Issue: https://github.com/zTree/zTree_v3/issues/2
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册