提交 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 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,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.
先完成此消息的编辑!
想要评论请 注册