提交 3f548e5a 编写于 作者: Z ztree

fixed issue: if don't use 'exedit' package, the removeNode() method will can't...

fixed issue: if don't use 'exedit' package, the removeNode() method will can't trigger the 'beforeRemove' and 'onRemove' callback.
上级 652b0d92
jQuery Tree Plugin ---- zTree
============
last verson : 3.5.16-beta.8
last verson : 3.5.16
**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.15 API 文档</em></h1><p></p>
<h1><em>zTree v3.5.16 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.15 API Document</em></h1><p></p>
<h1><em>zTree v3.5.16 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;">
......
此差异已折叠。
/*
* JQuery zTree core v3.5.16-beta.8
* JQuery zTree core v3.5.16
* 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: 2014-01-07
* Date: 2014-03-09
*/
(function($){
var settings = {}, roots = {}, caches = {},
......@@ -27,7 +27,8 @@
EXPAND: "ztree_expand",
COLLAPSE: "ztree_collapse",
ASYNC_SUCCESS: "ztree_async_success",
ASYNC_ERROR: "ztree_async_error"
ASYNC_ERROR: "ztree_async_error",
REMOVE: "ztree_remove"
},
id: {
A: "_a",
......@@ -175,6 +176,10 @@
o.bind(c.ASYNC_ERROR, function (event, treeId, node, XMLHttpRequest, textStatus, errorThrown) {
tools.apply(setting.callback.onAsyncError, [event, treeId, node, XMLHttpRequest, textStatus, errorThrown]);
});
o.bind(c.REMOVE, function (event, treeId, treeNode) {
tools.apply(setting.callback.onRemove, [event, treeId, treeNode]);
});
},
_unbindEvent = function(setting) {
var o = setting.treeObj,
......@@ -184,7 +189,8 @@
.unbind(c.EXPAND)
.unbind(c.COLLAPSE)
.unbind(c.ASYNC_SUCCESS)
.unbind(c.ASYNC_ERROR);
.unbind(c.ASYNC_ERROR)
.unbind(c.REMOVE);
},
//default event proxy of core
_eventProxy = function(event) {
......@@ -1678,7 +1684,7 @@
consts = zt.consts;
})(jQuery);
/*
* JQuery zTree excheck v3.5.16-beta.8
* JQuery zTree excheck v3.5.16
* http://zTree.me/
*
* Copyright (c) 2010 Hunter.z
......@@ -1687,7 +1693,7 @@
* http://www.opensource.org/licenses/mit-license.php
*
* email: hunter.z@263.net
* Date: 2014-01-07
* Date: 2014-03-09
*/
(function($){
//default consts of excheck
......@@ -2307,7 +2313,7 @@
}
})(jQuery);
/*
* JQuery zTree exedit v3.5.16-beta.8
* JQuery zTree exedit v3.5.16
* http://zTree.me/
*
* Copyright (c) 2010 Hunter.z
......@@ -2316,7 +2322,7 @@
* http://www.opensource.org/licenses/mit-license.php
*
* email: hunter.z@263.net
* Date: 2014-01-07
* Date: 2014-03-09
*/
(function($){
//default consts of exedit
......@@ -2324,7 +2330,6 @@
event: {
DRAG: "ztree_drag",
DROP: "ztree_drop",
REMOVE: "ztree_remove",
RENAME: "ztree_rename",
DRAGMOVE:"ztree_dragmove"
},
......@@ -2404,10 +2409,6 @@
tools.apply(setting.callback.onRename, [event, treeId, treeNode, isCancel]);
});
o.bind(c.REMOVE, function (event, treeId, treeNode) {
tools.apply(setting.callback.onRemove, [event, treeId, treeNode]);
});
o.bind(c.DRAG, function (event, srcEvent, treeId, treeNodes) {
tools.apply(setting.callback.onDrag, [srcEvent, treeId, treeNodes]);
});
......@@ -2424,7 +2425,6 @@
var o = setting.treeObj;
var c = consts.event;
o.unbind(c.RENAME);
o.unbind(c.REMOVE);
o.unbind(c.DRAG);
o.unbind(c.DRAGMOVE);
o.unbind(c.DROP);
......
此差异已折叠。
/*
* JQuery zTree core v3.5.16-beta.8
* JQuery zTree core v3.5.16
* 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: 2014-01-07
* Date: 2014-03-09
*/
(function($){
var settings = {}, roots = {}, caches = {},
......@@ -26,7 +26,8 @@
EXPAND: "ztree_expand",
COLLAPSE: "ztree_collapse",
ASYNC_SUCCESS: "ztree_async_success",
ASYNC_ERROR: "ztree_async_error"
ASYNC_ERROR: "ztree_async_error",
REMOVE: "ztree_remove"
},
id: {
A: "_a",
......@@ -174,6 +175,10 @@
o.bind(c.ASYNC_ERROR, function (event, treeId, node, XMLHttpRequest, textStatus, errorThrown) {
tools.apply(setting.callback.onAsyncError, [event, treeId, node, XMLHttpRequest, textStatus, errorThrown]);
});
o.bind(c.REMOVE, function (event, treeId, treeNode) {
tools.apply(setting.callback.onRemove, [event, treeId, treeNode]);
});
},
_unbindEvent = function(setting) {
var o = setting.treeObj,
......@@ -183,7 +188,8 @@
.unbind(c.EXPAND)
.unbind(c.COLLAPSE)
.unbind(c.ASYNC_SUCCESS)
.unbind(c.ASYNC_ERROR);
.unbind(c.ASYNC_ERROR)
.unbind(c.REMOVE);
},
//default event proxy of core
_eventProxy = function(event) {
......
此差异已折叠。
/*
* JQuery zTree excheck v3.5.16-beta.8
* JQuery zTree excheck v3.5.16
* 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: 2014-01-07
* Date: 2014-03-09
*/
(function($){
//default consts of excheck
......
/*
* JQuery zTree excheck v3.5.16-beta.8
* JQuery zTree excheck v3.5.16
* 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: 2014-01-07
* Date: 2014-03-09
*/
(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=f.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=f.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.16-beta.8
* JQuery zTree exedit v3.5.16
* 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: 2014-01-07
* Date: 2014-03-09
*/
(function($){
//default consts of exedit
......@@ -16,7 +16,6 @@
event: {
DRAG: "ztree_drag",
DROP: "ztree_drop",
REMOVE: "ztree_remove",
RENAME: "ztree_rename",
DRAGMOVE:"ztree_dragmove"
},
......@@ -96,10 +95,6 @@
tools.apply(setting.callback.onRename, [event, treeId, treeNode, isCancel]);
});
o.bind(c.REMOVE, function (event, treeId, treeNode) {
tools.apply(setting.callback.onRemove, [event, treeId, treeNode]);
});
o.bind(c.DRAG, function (event, srcEvent, treeId, treeNodes) {
tools.apply(setting.callback.onDrag, [srcEvent, treeId, treeNodes]);
});
......@@ -116,7 +111,6 @@
var o = setting.treeObj;
var c = consts.event;
o.unbind(c.RENAME);
o.unbind(c.REMOVE);
o.unbind(c.DRAG);
o.unbind(c.DRAGMOVE);
o.unbind(c.DROP);
......
此差异已折叠。
/*
* JQuery zTree exHideNodes v3.5.16-beta.8
* JQuery zTree exHideNodes v3.5.16
* 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: 2014-01-07
* Date: 2014-03-09
*/
(function($){
//default init node of exLib
......
/*
* JQuery zTree exHideNodes v3.5.16-beta.8
* JQuery zTree exHideNodes v3.5.16
* 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: 2014-01-07
* Date: 2014-03-09
*/
(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){for(var b=a.getPreNode();b;){if(b.isLastNode){b.isLastNode=!1;d.setNodeLineIcos(c,b);break}if(b.isFirstNode)break;b=b.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=
......
......@@ -5,16 +5,15 @@
具体修改内容可参考:
* [http://www.ztree.me/v3/api.php zTree v3.0 API 文档]
* [http://www.ztree.me/v3/api.php zTree v3.x API 文档]
* [http://www.ztree.me/v3/demo.php#_101 zTree v3.0 Demo 演示]
* [http://www.ztree.me/v3/demo.php#_101 zTree v3.x Demo 演示]
* [http://www.ztree.me/v3/faq.php#_101 zTree v3.0 常见问题]
* [http://www.ztree.me/v3/faq.php#_101 zTree v3.x 常见问题]
</font>
*2014.01.07* v3.5.16-beta.8
*2014.03.09* v3.5.16
* 【增加】onDragMove 回调,便于控制 zTree 节点与其他 DOM 的拖拽操作。(感谢 yumi301)
* 【增加】针对 Mac 系统 Cmd 键的支持, Cmd 键 + 左键 也可以多选节点
......@@ -22,6 +21,7 @@
* 【修改】onCheck 回调的 event,恢复为 zTree 自身的 event 事件,同时利用 srcEvent 传递原始 event 对象。(感谢 yumi301)
* 【修改】拖拽多个节点时,超出 maxShowNodeNum 设置个数的节点会失去 被选择状态的 bug
* 【修改】excheck & exedit 扩展包的 zTree 方法中 setting 数据错误导致 checkNode、updateNode 等方法操作 radio 失效的 bug
* 【修改】不加载 exedit 扩展包时,使用 removeNode 方法无法触发 beforeRemove 和 onRemove 回调的 bug
*2013.10.19* v3.5.15
* 【增加】setting.view.txtSelectedEnable 属性,满足部分项目中客户对于可以选择节点文本信息的强烈欲望。
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册