You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
11 KiB
Plaintext
1 line
11 KiB
Plaintext
11 months ago
|
(function(f){var z={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"}},m={check:{enable:false,autoCheckTrigger:false,chkStyle:z.checkbox.STYLE,nocheckInherit:false,chkDisabledInherit:false,radioType:z.radio.TYPE_LEVEL,chkboxType:{Y:"ps",N:"ps"}},data:{key:{checked:"checked"}},callback:{beforeCheck:null,onCheck:null}},v=function(A){var B=y.getRoot(A);B.radioCheckedList=[]},d=function(A){},n=function(A){var B=A.treeObj,C=q.event;B.bind(C.CHECK,function(F,E,G,D){t.apply(A.callback.onCheck,[!!E?E:F,G,D])})},x=function(A){var B=A.treeObj,C=q.event;B.unbind(C.CHECK)},o=function(G){var H=G.target,J=y.getSetting(G.data.treeId),E="",B=null,C="",F="",A=null,D=null;if(t.eqs(G.type,"mouseover")){if(J.check.enable&&t.eqs(H.tagName,"span")&&H.getAttribute("treeNode"+q.id.CHECK)!==null){E=H.parentNode.id;C="mouseoverCheck"}}else{if(t.eqs(G.type,"mouseout")){if(J.check.enable&&t.eqs(H.tagName,"span")&&H.getAttribute("treeNode"+q.id.CHECK)!==null){E=H.parentNode.id;C="mouseoutCheck"}}else{if(t.eqs(G.type,"click")){if(J.check.enable&&t.eqs(H.tagName,"span")&&H.getAttribute("treeNode"+q.id.CHECK)!==null){E=H.parentNode.id;C="checkNode"}}}}if(E.length>0){B=y.getNodeCache(J,E);switch(C){case"checkNode":A=l.onCheckNode;break;case"mouseoverCheck":A=l.onMouseoverCheck;break;case"mouseoutCheck":A=l.onMouseoutCheck;break}}var I={stop:false,node:B,nodeEventType:C,nodeEventCallback:A,treeEventType:F,treeEventCallback:D};return I},u=function(D,H,G,A,F,C,E){if(!G){return}var B=D.data.key.checked;if(typeof G[B]=="string"){G[B]=t.eqs(G[B],"true")}G[B]=!!G[B];G.checkedOld=G[B];if(typeof G.nocheck=="string"){G.nocheck=t.eqs(G.nocheck,"true")}G.nocheck=!!G.nocheck||(D.check.nocheckInherit&&A&&!!A.nocheck);if(typeof G.chkDisabled=="string"){G.chkDisabled=t.eqs(G.chkDisabled,"true")}G.chkDisabled=!!G.chkDisabled||(D.check.chkDisabledInherit&&A&&!!A.chkDisabled);if(typeof G.halfCheck=="string"){G.halfCheck=t.eqs(G.halfCheck,"true")}G.halfCheck=!!G.halfCheck;G.check_Child_State=-1;G.check_Focus=false;G.getCheckStatus=function(){return y.getCheckStatus(D,G)}},a=function(C,E,B){var A=C.data.key.checked;if(C.check.enable){y.makeChkFlag(C,E);if(C.check.chkStyle==q.radio.STYLE&&C.check.radioType==q.radio.TYPE_ALL&&E[A]){var D=y.getRoot(C);D.radioCheckedList.push(E)}B.push("<span ID='",E.tId,q.id.CHECK,"' class='",j.makeChkClass(C,E),"' treeNode",q.id.CHECK,(E.nocheck===true?" style='display:none;'":""),"></span>")}},k=function(C,B){B.checkNode=function(H,G,I,F){var D=this.setting.data.key.checked;if(H.chkDisabled===true){return}if(G!==true&&G!==false){G=!H[D]}F=!!F;if(H[D]===G&&!I){return}else{if(F&&t.apply(this.setting.callback.beforeCheck,[this.setting.treeId,H],true)==false){return}}if(t.uCanDo(this.setting)&&this.setting.check.enable&&H.nocheck!==true){H[D]=G;var E=f("#"+H.tId+q.id.CHECK);if(I||this.setting.check.chkStyle===q.radio.STYLE){j.checkNodeRelation(this.setting,H)}j.setChkClass(this.setting,E,H);j.repairParentChkClassWithSelf(this.setting,H);if(F){C.treeObj.trigger(q.event.CHECK,[null,C.treeId,H])}}};B.checkAllNodes=function(D){j.repairAllChk(this.setting,!!D)};B.getCheckedNodes=function(E){var D=this.setting.data.key.children;E=(E!==false);return y.getTreeCheckedNodes(this.setting,y.getRoot(C)[D],E)};B.getChangeCheckedNodes=function(){var D=this.setting.data.key.children;return y.getTreeChangeCheckedNodes(this.setting,y.getRoot(C)[D])};B.setChkDisabled=function(E,D,F,G){D=!!D;F=!!F;G=!!G;j.repairSonChkDisabled(this.setting,E,D,G);j.repairParentChkDisabled(this.setting,E.getParentNode(),D,F)};var A=B.updateNode;B.updateNode=function(F,G){if(A){A.apply(B,arguments)}if(!F||!this.setting.check.enable){return}var D=f("#"+F.tId);if(D.get(0)&&t.uCanDo(this.setting)){var E=f("#"+F.tId+q.id.CHECK);if(G==true||this.setting.check.chkStyle===q.radio.STYLE){j.checkNodeRelation(this.setting,F)}j.setChkClass(this.setting,E,F);j.repairParentChkClassWithSelf(this.setting,F)}}},p={getRadioC
|