diff --git a/api/apiCss/jquery.ztree.core-3.5.js b/api/apiCss/jquery.ztree.core-3.5.js index 920b4b8e8b59748c38654e16fbc9b1039d8ec49f..ae71ed2de1f4c0b11d599af4d336c355a1b11055 100644 --- a/api/apiCss/jquery.ztree.core-3.5.js +++ b/api/apiCss/jquery.ztree.core-3.5.js @@ -8,7 +8,7 @@ * http://www.opensource.org/licenses/mit-license.php * * email: hunter.z@263.net - * Date: 2014-05-08 + * Date: 2015-02-15 */ (function(p){var G,H,I,J,K,L,r={},u={},v={},M={treeId:"",treeObj:null,view:{addDiyDom:null,autoCancelSelected:!0,dblClickExpand:!0,expandSpeed:"fast",fontCss:{},nameIsHTML:!1,selectedMulti:!0,showIcon:!0,showLine:!0,showTitle:!0,txtSelectedEnable:!1},data:{key:{children:"children",name:"name",title:"",url:"url"},simpleData:{enable:!1,idKey:"id",pIdKey:"pId",rootPId:null},keep:{parent:!1,leaf:!1}},async:{enable:!1,contentType:"application/x-www-form-urlencoded",type:"post",dataType:"text",url:"",autoParam:[], otherParam:[],dataFilter:null},callback:{beforeAsync:null,beforeClick:null,beforeDblClick:null,beforeRightClick:null,beforeMouseDown:null,beforeMouseUp:null,beforeExpand:null,beforeCollapse:null,beforeRemove:null,onAsyncError:null,onAsyncSuccess:null,onNodeCreated:null,onClick:null,onDblClick:null,onRightClick:null,onMouseDown:null,onMouseUp:null,onExpand:null,onCollapse:null,onRemove:null}},w=[function(b){var a=b.treeObj,c=e.event;a.bind(c.NODECREATED,function(a,c,g){j.apply(b.callback.onNodeCreated, diff --git a/js/jquery.ztree.all-3.5.js b/js/jquery.ztree.all-3.5.js index 5a695d60621e745144b62db83e63cffcb104d96a..f72b63fa9df7bab7462b48defb8b49dea28094b8 100644 --- a/js/jquery.ztree.all-3.5.js +++ b/js/jquery.ztree.all-3.5.js @@ -9,7 +9,7 @@ * http://www.opensource.org/licenses/mit-license.php * * email: hunter.z@263.net - * Date: 2014-05-08 + * Date: 2015-02-15 */ (function($){ var settings = {}, roots = {}, caches = {}, @@ -1694,7 +1694,7 @@ * http://www.opensource.org/licenses/mit-license.php * * email: hunter.z@263.net - * Date: 2014-05-08 + * Date: 2015-02-15 */ (function($){ //default consts of excheck @@ -2322,7 +2322,7 @@ * http://www.opensource.org/licenses/mit-license.php * * email: hunter.z@263.net - * Date: 2014-05-08 + * Date: 2015-02-15 */ (function($){ //default consts of exedit @@ -3151,11 +3151,9 @@ newName = forceName ? forceName:(isCancel ? node[nameKey]: inputObj.val()); if (tools.apply(setting.callback.beforeRename, [setting.treeId, node, newName, isCancel], true) === false) { return false; - } else { - node[nameKey] = newName; - setting.treeObj.trigger(consts.event.RENAME, [setting.treeId, node, isCancel]); } - var aObj = $$(node, consts.id.A, setting); + node[nameKey] = newName; + var aObj = $$(node, consts.id.A, setting); aObj.removeClass(consts.node.CURSELECTED_EDIT); inputObj.unbind(); view.setNodeName(setting, node); @@ -3163,6 +3161,7 @@ root.curEditNode = null; root.curEditInput = null; view.selectNode(setting, node, false); + setting.treeObj.trigger(consts.event.RENAME, [setting.treeId, node, isCancel]); } root.noSelection = true; return true; diff --git a/js/jquery.ztree.all-3.5.min.js b/js/jquery.ztree.all-3.5.min.js index fd304196a55ae8ea69d51b7de55e645d30dbd8b9..903601e6d4674438bca853f18b90738f80e33db6 100644 --- a/js/jquery.ztree.all-3.5.min.js +++ b/js/jquery.ztree.all-3.5.min.js @@ -9,7 +9,7 @@ * http://www.opensource.org/licenses/mit-license.php * * email: hunter.z@263.net - * Date: 2014-05-08 + * Date: 2015-02-15 */ (function(p){var G,H,I,J,K,L,r={},u={},v={},M={treeId:"",treeObj:null,view:{addDiyDom:null,autoCancelSelected:!0,dblClickExpand:!0,expandSpeed:"fast",fontCss:{},nameIsHTML:!1,selectedMulti:!0,showIcon:!0,showLine:!0,showTitle:!0,txtSelectedEnable:!1},data:{key:{children:"children",name:"name",title:"",url:"url"},simpleData:{enable:!1,idKey:"id",pIdKey:"pId",rootPId:null},keep:{parent:!1,leaf:!1}},async:{enable:!1,contentType:"application/x-www-form-urlencoded",type:"post",dataType:"text",url:"",autoParam:[], otherParam:[],dataFilter:null},callback:{beforeAsync:null,beforeClick:null,beforeDblClick:null,beforeRightClick:null,beforeMouseDown:null,beforeMouseUp:null,beforeExpand:null,beforeCollapse:null,beforeRemove:null,onAsyncError:null,onAsyncSuccess:null,onNodeCreated:null,onClick:null,onDblClick:null,onRightClick:null,onMouseDown:null,onMouseUp:null,onExpand:null,onCollapse:null,onRemove:null}},w=[function(b){var a=b.treeObj,c=e.event;a.bind(c.NODECREATED,function(a,c,g){j.apply(b.callback.onNodeCreated, @@ -79,7 +79,7 @@ a.getParentNode(),!0,!1,function(){try{k(a,d).focus().blur()}catch(b){}});else t * http://www.opensource.org/licenses/mit-license.php * * email: hunter.z@263.net - * Date: 2014-05-08 + * Date: 2015-02-15 */ (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=== @@ -114,7 +114,7 @@ d);return j}})(jQuery); * http://www.opensource.org/licenses/mit-license.php * * email: hunter.z@263.net - * Date: 2014-05-08 + * Date: 2015-02-15 */ (function(w){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"}},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(C.dragFlag==0&&Math.abs(N-b.clientX)0;)c.dragMaskList[0].remove(),c.dragMaskList.shift();if(a)for(var d=o("iframe",b),f=0,i=d.length;f",b);j.appendTo(o("body",b));c.dragMaskList.push(j)}}},view:{addEditBtn:function(b, a){if(!(a.editNameFlag||o(a,d.id.EDIT,b).length>0)&&g.apply(b.edit.showRenameBtn,[b.treeId,a],b.edit.showRenameBtn)){var c=o(a,d.id.A,b),r="";c.append(r);o(a,d.id.EDIT,b).bind("click",function(){if(!g.uCanDo(b)||g.apply(b.callback.beforeEditName,[b.treeId,a],!0)==!1)return!1;f.editNode(b,a);return!1}).show()}}, addRemoveBtn:function(b,a){if(!(a.editNameFlag||o(a,d.id.REMOVE,b).length>0)&&g.apply(b.edit.showRemoveBtn,[b.treeId,a],b.edit.showRemoveBtn)){var c=o(a,d.id.A,b),r="";c.append(r);o(a,d.id.REMOVE,b).bind("click",function(){if(!g.uCanDo(b)||g.apply(b.callback.beforeRemove,[b.treeId,a],!0)==!1)return!1;f.removeNode(b, -a);b.treeObj.trigger(d.event.REMOVE,[b.treeId,a]);return!1}).bind("mousedown",function(){return!0}).show()}},addHoverDom:function(b,a){if(m.getRoots().showHoverDom)a.isHover=!0,b.edit.enable&&(f.addEditBtn(b,a),f.addRemoveBtn(b,a)),g.apply(b.view.addHoverDom,[b.treeId,a])},cancelCurEditNode:function(b,a,c){var r=m.getRoot(b),k=b.data.key.name,i=r.curEditNode;if(i){var j=r.curEditInput,a=a?a:c?i[k]:j.val();if(g.apply(b.callback.beforeRename,[b.treeId,i,a,c],!0)===!1)return!1;else i[k]=a,b.treeObj.trigger(d.event.RENAME, -[b.treeId,i,c]);o(i,d.id.A,b).removeClass(d.node.CURSELECTED_EDIT);j.unbind();f.setNodeName(b,i);i.editNameFlag=!1;r.curEditNode=null;r.curEditInput=null;f.selectNode(b,i,!1)}return r.noSelection=!0},editNode:function(b,a){var c=m.getRoot(b);f.editNodeBlur=!1;if(m.isSelectedNode(b,a)&&c.curEditNode==a&&a.editNameFlag)setTimeout(function(){g.inputFocus(c.curEditInput)},0);else{var r=b.data.key.name;a.editNameFlag=!0;f.removeTreeDom(b,a);f.cancelCurEditNode(b);f.selectNode(b,a,!1);o(a,d.id.SPAN,b).html("");var k=o(a,d.id.INPUT,b);k.attr("value",a[r]);b.edit.editNameSelectAll?g.inputSelect(k):g.inputFocus(k);k.bind("blur",function(){f.editNodeBlur||f.cancelCurEditNode(b)}).bind("keydown",function(a){a.keyCode=="13"?(f.editNodeBlur=!0,f.cancelCurEditNode(b)):a.keyCode=="27"&&f.cancelCurEditNode(b,null,!0)}).bind("click",function(){return!1}).bind("dblclick",function(){return!1});o(a,d.id.A,b).addClass(d.node.CURSELECTED_EDIT);c.curEditInput=k;c.noSelection= !1;c.curEditNode=a}},moveNode:function(b,a,c,r,k,i){var j=m.getRoot(b),e=b.data.key.children;if(a!=c&&(!b.data.keep.leaf||!a||a.isParent||r!=d.move.TYPE_INNER)){var g=c.parentTId?c.getParentNode():j,t=a===null||a==j;t&&a===null&&(a=j);if(t)r=d.move.TYPE_INNER;j=a.parentTId?a.getParentNode():j;if(r!=d.move.TYPE_PREV&&r!=d.move.TYPE_NEXT)r=d.move.TYPE_INNER;if(r==d.move.TYPE_INNER)if(t)c.parentTId=null;else{if(!a.isParent)a.isParent=!0,a.open=!!a.open,f.setNodeLineIcos(b,a);c.parentTId=a.tId}var p; t?p=t=b.treeObj:(!i&&r==d.move.TYPE_INNER?f.expandCollapseNode(b,a,!0,!1):i||f.expandCollapseNode(b,a.getParentNode(),!0,!1),t=o(a,b),p=o(a,d.id.UL,b),t.get(0)&&!p.get(0)&&(p=[],f.makeUlHtml(b,a,p,""),t.append(p.join(""))),p=o(a,d.id.UL,b));var q=o(c,b);q.get(0)?t.get(0)||q.remove():q=f.appendNodes(b,c.level,[c],null,!1,!0).join("");p.get(0)&&r==d.move.TYPE_INNER?p.append(q):t.get(0)&&r==d.move.TYPE_PREV?t.before(q):t.get(0)&&r==d.move.TYPE_NEXT&&t.after(q);var l=-1,w=0,x=null,t=null,D=c.level;if(c.isFirstNode){if(l= diff --git a/js/jquery.ztree.core-3.5.js b/js/jquery.ztree.core-3.5.js index 4272b9db17cba6f02ae8106cc661f0e82002f11c..365c2360f55d17a8dca747ce6eb73357cca5a324 100644 --- a/js/jquery.ztree.core-3.5.js +++ b/js/jquery.ztree.core-3.5.js @@ -8,7 +8,7 @@ * http://www.opensource.org/licenses/mit-license.php * * email: hunter.z@263.net - * Date: 2014-05-08 + * Date: 2015-02-15 */ (function($){ var settings = {}, roots = {}, caches = {}, diff --git a/js/jquery.ztree.core-3.5.min.js b/js/jquery.ztree.core-3.5.min.js index 920b4b8e8b59748c38654e16fbc9b1039d8ec49f..ae71ed2de1f4c0b11d599af4d336c355a1b11055 100644 --- a/js/jquery.ztree.core-3.5.min.js +++ b/js/jquery.ztree.core-3.5.min.js @@ -8,7 +8,7 @@ * http://www.opensource.org/licenses/mit-license.php * * email: hunter.z@263.net - * Date: 2014-05-08 + * Date: 2015-02-15 */ (function(p){var G,H,I,J,K,L,r={},u={},v={},M={treeId:"",treeObj:null,view:{addDiyDom:null,autoCancelSelected:!0,dblClickExpand:!0,expandSpeed:"fast",fontCss:{},nameIsHTML:!1,selectedMulti:!0,showIcon:!0,showLine:!0,showTitle:!0,txtSelectedEnable:!1},data:{key:{children:"children",name:"name",title:"",url:"url"},simpleData:{enable:!1,idKey:"id",pIdKey:"pId",rootPId:null},keep:{parent:!1,leaf:!1}},async:{enable:!1,contentType:"application/x-www-form-urlencoded",type:"post",dataType:"text",url:"",autoParam:[], otherParam:[],dataFilter:null},callback:{beforeAsync:null,beforeClick:null,beforeDblClick:null,beforeRightClick:null,beforeMouseDown:null,beforeMouseUp:null,beforeExpand:null,beforeCollapse:null,beforeRemove:null,onAsyncError:null,onAsyncSuccess:null,onNodeCreated:null,onClick:null,onDblClick:null,onRightClick:null,onMouseDown:null,onMouseUp:null,onExpand:null,onCollapse:null,onRemove:null}},w=[function(b){var a=b.treeObj,c=e.event;a.bind(c.NODECREATED,function(a,c,g){j.apply(b.callback.onNodeCreated, diff --git a/js/jquery.ztree.excheck-3.5.js b/js/jquery.ztree.excheck-3.5.js index 454e6fa34a720f3b2226755bf4623eb74d9fa22f..a3d239d992245a79a7bc9e5d75ec306f78817bef 100644 --- a/js/jquery.ztree.excheck-3.5.js +++ b/js/jquery.ztree.excheck-3.5.js @@ -8,7 +8,7 @@ * http://www.opensource.org/licenses/mit-license.php * * email: hunter.z@263.net - * Date: 2014-05-08 + * Date: 2015-02-15 */ (function($){ //default consts of excheck diff --git a/js/jquery.ztree.excheck-3.5.min.js b/js/jquery.ztree.excheck-3.5.min.js index f25fdafe8347607cbeb4836d0a21371e3f3b9a2f..616c3ffdf182b8e8270a52eb4622b471f851e442 100644 --- a/js/jquery.ztree.excheck-3.5.min.js +++ b/js/jquery.ztree.excheck-3.5.min.js @@ -8,7 +8,7 @@ * http://www.opensource.org/licenses/mit-license.php * * email: hunter.z@263.net - * Date: 2014-05-08 + * Date: 2015-02-15 */ (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=== diff --git a/js/jquery.ztree.exedit-3.5.js b/js/jquery.ztree.exedit-3.5.js index f460a7a43867d56b39940f8a82bfce2e7242b0b7..6752133eeaec8abc661cc83f67948d30c0b74a69 100644 --- a/js/jquery.ztree.exedit-3.5.js +++ b/js/jquery.ztree.exedit-3.5.js @@ -8,7 +8,7 @@ * http://www.opensource.org/licenses/mit-license.php * * email: hunter.z@263.net - * Date: 2014-05-08 + * Date: 2015-02-15 */ (function($){ //default consts of exedit @@ -837,11 +837,9 @@ newName = forceName ? forceName:(isCancel ? node[nameKey]: inputObj.val()); if (tools.apply(setting.callback.beforeRename, [setting.treeId, node, newName, isCancel], true) === false) { return false; - } else { - node[nameKey] = newName; - setting.treeObj.trigger(consts.event.RENAME, [setting.treeId, node, isCancel]); } - var aObj = $$(node, consts.id.A, setting); + node[nameKey] = newName; + var aObj = $$(node, consts.id.A, setting); aObj.removeClass(consts.node.CURSELECTED_EDIT); inputObj.unbind(); view.setNodeName(setting, node); @@ -849,6 +847,7 @@ root.curEditNode = null; root.curEditInput = null; view.selectNode(setting, node, false); + setting.treeObj.trigger(consts.event.RENAME, [setting.treeId, node, isCancel]); } root.noSelection = true; return true; diff --git a/js/jquery.ztree.exedit-3.5.min.js b/js/jquery.ztree.exedit-3.5.min.js index 324de3ed8ee5c4c9078bc7ba524f49d5f0f3171d..0d9cecf7e677a7e4944d5c4d7be4f309674897c6 100644 --- a/js/jquery.ztree.exedit-3.5.min.js +++ b/js/jquery.ztree.exedit-3.5.min.js @@ -8,7 +8,7 @@ * http://www.opensource.org/licenses/mit-license.php * * email: hunter.z@263.net - * Date: 2014-05-08 + * Date: 2015-02-15 */ (function(w){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"}},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(C.dragFlag==0&&Math.abs(N-b.clientX)0;)c.dragMaskList[0].remove(),c.dragMaskList.shift();if(a)for(var d=o("iframe",b),f=0,i=d.length;f",b);j.appendTo(o("body",b));c.dragMaskList.push(j)}}},view:{addEditBtn:function(b, a){if(!(a.editNameFlag||o(a,d.id.EDIT,b).length>0)&&g.apply(b.edit.showRenameBtn,[b.treeId,a],b.edit.showRenameBtn)){var c=o(a,d.id.A,b),r="";c.append(r);o(a,d.id.EDIT,b).bind("click",function(){if(!g.uCanDo(b)||g.apply(b.callback.beforeEditName,[b.treeId,a],!0)==!1)return!1;f.editNode(b,a);return!1}).show()}}, addRemoveBtn:function(b,a){if(!(a.editNameFlag||o(a,d.id.REMOVE,b).length>0)&&g.apply(b.edit.showRemoveBtn,[b.treeId,a],b.edit.showRemoveBtn)){var c=o(a,d.id.A,b),r="";c.append(r);o(a,d.id.REMOVE,b).bind("click",function(){if(!g.uCanDo(b)||g.apply(b.callback.beforeRemove,[b.treeId,a],!0)==!1)return!1;f.removeNode(b, -a);b.treeObj.trigger(d.event.REMOVE,[b.treeId,a]);return!1}).bind("mousedown",function(){return!0}).show()}},addHoverDom:function(b,a){if(m.getRoots().showHoverDom)a.isHover=!0,b.edit.enable&&(f.addEditBtn(b,a),f.addRemoveBtn(b,a)),g.apply(b.view.addHoverDom,[b.treeId,a])},cancelCurEditNode:function(b,a,c){var r=m.getRoot(b),k=b.data.key.name,i=r.curEditNode;if(i){var j=r.curEditInput,a=a?a:c?i[k]:j.val();if(g.apply(b.callback.beforeRename,[b.treeId,i,a,c],!0)===!1)return!1;else i[k]=a,b.treeObj.trigger(d.event.RENAME, -[b.treeId,i,c]);o(i,d.id.A,b).removeClass(d.node.CURSELECTED_EDIT);j.unbind();f.setNodeName(b,i);i.editNameFlag=!1;r.curEditNode=null;r.curEditInput=null;f.selectNode(b,i,!1)}return r.noSelection=!0},editNode:function(b,a){var c=m.getRoot(b);f.editNodeBlur=!1;if(m.isSelectedNode(b,a)&&c.curEditNode==a&&a.editNameFlag)setTimeout(function(){g.inputFocus(c.curEditInput)},0);else{var r=b.data.key.name;a.editNameFlag=!0;f.removeTreeDom(b,a);f.cancelCurEditNode(b);f.selectNode(b,a,!1);o(a,d.id.SPAN,b).html("");var k=o(a,d.id.INPUT,b);k.attr("value",a[r]);b.edit.editNameSelectAll?g.inputSelect(k):g.inputFocus(k);k.bind("blur",function(){f.editNodeBlur||f.cancelCurEditNode(b)}).bind("keydown",function(a){a.keyCode=="13"?(f.editNodeBlur=!0,f.cancelCurEditNode(b)):a.keyCode=="27"&&f.cancelCurEditNode(b,null,!0)}).bind("click",function(){return!1}).bind("dblclick",function(){return!1});o(a,d.id.A,b).addClass(d.node.CURSELECTED_EDIT);c.curEditInput=k;c.noSelection= !1;c.curEditNode=a}},moveNode:function(b,a,c,r,k,i){var j=m.getRoot(b),e=b.data.key.children;if(a!=c&&(!b.data.keep.leaf||!a||a.isParent||r!=d.move.TYPE_INNER)){var g=c.parentTId?c.getParentNode():j,t=a===null||a==j;t&&a===null&&(a=j);if(t)r=d.move.TYPE_INNER;j=a.parentTId?a.getParentNode():j;if(r!=d.move.TYPE_PREV&&r!=d.move.TYPE_NEXT)r=d.move.TYPE_INNER;if(r==d.move.TYPE_INNER)if(t)c.parentTId=null;else{if(!a.isParent)a.isParent=!0,a.open=!!a.open,f.setNodeLineIcos(b,a);c.parentTId=a.tId}var p; t?p=t=b.treeObj:(!i&&r==d.move.TYPE_INNER?f.expandCollapseNode(b,a,!0,!1):i||f.expandCollapseNode(b,a.getParentNode(),!0,!1),t=o(a,b),p=o(a,d.id.UL,b),t.get(0)&&!p.get(0)&&(p=[],f.makeUlHtml(b,a,p,""),t.append(p.join(""))),p=o(a,d.id.UL,b));var q=o(c,b);q.get(0)?t.get(0)||q.remove():q=f.appendNodes(b,c.level,[c],null,!1,!0).join("");p.get(0)&&r==d.move.TYPE_INNER?p.append(q):t.get(0)&&r==d.move.TYPE_PREV?t.before(q):t.get(0)&&r==d.move.TYPE_NEXT&&t.after(q);var l=-1,w=0,x=null,t=null,D=c.level;if(c.isFirstNode){if(l= diff --git a/js/jquery.ztree.exhide-3.5.js b/js/jquery.ztree.exhide-3.5.js index 4a10d242ae3091ac7dfff0a6ac7f9771b3634271..376a3b4f35a9efedf6a6800726b583a09cc10b14 100644 --- a/js/jquery.ztree.exhide-3.5.js +++ b/js/jquery.ztree.exhide-3.5.js @@ -8,7 +8,7 @@ * http://www.opensource.org/licenses/mit-license.php * * email: hunter.z@263.net - * Date: 2014-05-08 + * Date: 2015-02-15 */ (function($){ //default init node of exLib diff --git a/js/jquery.ztree.exhide-3.5.min.js b/js/jquery.ztree.exhide-3.5.min.js index 8ca7ebc79d998ca0338c27da952495b60a7640e0..96c858e3094e286c75e82506e5774201a25d6f7b 100644 --- a/js/jquery.ztree.exhide-3.5.min.js +++ b/js/jquery.ztree.exhide-3.5.min.js @@ -8,7 +8,7 @@ * http://www.opensource.org/licenses/mit-license.php * * email: hunter.z@263.net - * Date: 2014-05-08 + * Date: 2015-02-15 */ (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("
  • ")},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 -*2014.12.13* v3.5.17 +*2015.02.15* v3.5.17 * 【修改】excheck 扩展中 removeClass 与 jQueryUI 1.9 冲突的问题,目前放弃 removeClass 方法 * 【修改】优化 exhide 扩展包初始化效率,避免数据多时 ie8 假死的 bug(感谢:https://github.com/sarxos) * 【修改】若干 Demo & API 的小错误 * 【修改】异步加载 低版本 IE 缓存严重的问题 + * 【修改】在 onRename 回调中使用 updateNode 方法无效的问题 *2014.03.09* v3.5.16 * 【增加】onDragMove 回调,便于控制 zTree 节点与其他 DOM 的拖拽操作。(感谢 yumi301)