提交 c07c7126 编写于 作者: Z ztree

fixed issue: fuzzySearch.js Thanks @yigger

上级 bf972931
jQuery Tree Plugin ---- zTree
============
last verson : 3.5.39
last verson : 3.5.40
**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.39 API 文档</em></h1><p></p>
<h1><em>zTree v3.5.40 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.39 API Document</em></h1><p></p>
<h1><em>zTree v3.5.40 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.39
* JQuery zTree core v3.5.40
* 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: 2019-01-017
* Date: 2019-01-18
*/
(function(r){var J,K,L,M,N,O,v,t={},w={},x={},P={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:{isParent:"isParent",children:"children",name:"name",title:"",url:"url",icon:"icon"},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",headers:{},xhrFields:{},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}},y=[function(a){var b=a.treeObj,c=g.event;b.bind(c.NODECREATED,
......
......@@ -14,7 +14,7 @@
function fuzzySearch(zTreeId, searchField, isHighLight, isExpand){
var zTreeObj = $.fn.zTree.getZTreeObj(zTreeId);//get the ztree object by ztree id
if(!zTreeObj){
alter("fail to get ztree object");
alert("fail to get ztree object");
}
var nameKey = zTreeObj.setting.data.key.name; //get the key of the node name
isHighLight = isHighLight===false?false:true;//default true, only use false to disable highlight
......
/*
* JQuery zTree core v3.5.39
* JQuery zTree core v3.5.40
* http://treejs.cn/
*
* Copyright (c) 2010 Hunter.z
......@@ -9,7 +9,7 @@
* http://www.opensource.org/licenses/mit-license.php
*
* email: hunter.z@263.net
* Date: 2019-01-017
* Date: 2019-01-18
*/
(function ($) {
var settings = {}, roots = {}, caches = {},
......@@ -1986,7 +1986,7 @@
consts = zt.consts;
})(jQuery);
/*
* JQuery zTree excheck v3.5.39
* JQuery zTree excheck v3.5.40
* http://treejs.cn/
*
* Copyright (c) 2010 Hunter.z
......@@ -1995,7 +1995,7 @@
* http://www.opensource.org/licenses/mit-license.php
*
* email: hunter.z@263.net
* Date: 2019-01-017
* Date: 2019-01-18
*/
(function ($) {
//default consts of excheck
......@@ -2637,7 +2637,7 @@
}
})(jQuery);
/*
* JQuery zTree exedit v3.5.39
* JQuery zTree exedit v3.5.40
* http://treejs.cn/
*
* Copyright (c) 2010 Hunter.z
......@@ -2646,7 +2646,7 @@
* http://www.opensource.org/licenses/mit-license.php
*
* email: hunter.z@263.net
* Date: 2019-01-017
* Date: 2019-01-18
*/
(function ($) {
//default consts of exedit
......
/*
* JQuery zTree core v3.5.39
* JQuery zTree core v3.5.40
* http://treejs.cn/
*
* Copyright (c) 2010 Hunter.z
......@@ -9,7 +9,7 @@
* http://www.opensource.org/licenses/mit-license.php
*
* email: hunter.z@263.net
* Date: 2019-01-017
* Date: 2019-01-18
*/
(function(r){var J,K,L,M,N,O,v,t={},w={},x={},P={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:{isParent:"isParent",children:"children",name:"name",title:"",url:"url",icon:"icon"},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",headers:{},xhrFields:{},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}},y=[function(a){var b=a.treeObj,c=g.event;b.bind(c.NODECREATED,
......@@ -76,7 +76,7 @@ b,c){function e(){if(!c){var b=l(a,d).get(0);j.scrollIntoView(d,b)}}if(a&&h.uCan
a),j.setNodeLineIcos(d,a),j.setNodeFontCss(d,a))}};a.treeTools=f;e.setZTreeTools(d,f);(c=e.nodeChildren(d,a))&&c.length>0?j.createNodes(d,0,c,null,-1):d.async.enable&&d.async.url&&d.async.url!==""&&j.asyncNode(d);return f}};var Q=r.fn.zTree,l=h.$,g=Q.consts})(jQuery);
/*
* JQuery zTree excheck v3.5.39
* JQuery zTree excheck v3.5.40
* http://treejs.cn/
*
* Copyright (c) 2010 Hunter.z
......@@ -85,7 +85,7 @@ a),j.setNodeLineIcos(d,a),j.setNodeFontCss(d,a))}};a.treeTools=f;e.setZTreeTools
* http://www.opensource.org/licenses/mit-license.php
*
* email: hunter.z@263.net
* Date: 2019-01-017
* Date: 2019-01-18
*/
(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);if(i.apply(b.callback.beforeCheck,[b.treeId,a],!0)==!1)return!0;var d=f.nodeChecked(b,a);f.nodeChecked(b,a,!d);e.checkNodeRelation(b,a);d=n(a,h.id.CHECK,b);e.setChkClass(b,d,a);e.repairParentChkClassWithSelf(b,a);b.treeObj.trigger(h.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,h.id.CHECK,b);a.check_Focus=!0;e.setChkClass(b,d,a);return!0};r=function(c,
......@@ -111,7 +111,7 @@ i.uCanDo(this.setting)){var g=n(c,h.id.CHECK,this.setting);(f==!0||this.setting.
var u=e.appendNodes;e.appendNodes=function(c,a,b,d,h,g,i){var m="";u&&(m=u.apply(e,arguments));d&&f.makeChkFlag(c,d);return m}})(jQuery);
/*
* JQuery zTree exedit v3.5.39
* JQuery zTree exedit v3.5.40
* http://treejs.cn/
*
* Copyright (c) 2010 Hunter.z
......@@ -120,7 +120,7 @@ var u=e.appendNodes;e.appendNodes=function(c,a,b,d,h,g,i){var m="";u&&(m=u.apply
* http://www.opensource.org/licenses/mit-license.php
*
* email: hunter.z@263.net
* Date: 2019-01-017
* Date: 2019-01-18
*/
(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 core v3.5.39
* JQuery zTree core v3.5.40
* 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: 2019-01-017
* Date: 2019-01-18
*/
(function ($) {
var settings = {}, roots = {}, caches = {},
......
/*
* JQuery zTree core v3.5.39
* JQuery zTree core v3.5.40
* 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: 2019-01-017
* Date: 2019-01-18
*/
(function(r){var J,K,L,M,N,O,v,t={},w={},x={},P={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:{isParent:"isParent",children:"children",name:"name",title:"",url:"url",icon:"icon"},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",headers:{},xhrFields:{},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}},y=[function(a){var b=a.treeObj,c=g.event;b.bind(c.NODECREATED,
......
/*
* JQuery zTree excheck v3.5.39
* JQuery zTree excheck v3.5.40
* 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: 2019-01-017
* Date: 2019-01-18
*/
(function ($) {
//default consts of excheck
......
/*
* JQuery zTree excheck v3.5.39
* JQuery zTree excheck v3.5.40
* 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: 2019-01-017
* Date: 2019-01-18
*/
(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);if(i.apply(b.callback.beforeCheck,[b.treeId,a],!0)==!1)return!0;var d=f.nodeChecked(b,a);f.nodeChecked(b,a,!d);e.checkNodeRelation(b,a);d=n(a,h.id.CHECK,b);e.setChkClass(b,d,a);e.repairParentChkClassWithSelf(b,a);b.treeObj.trigger(h.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,h.id.CHECK,b);a.check_Focus=!0;e.setChkClass(b,d,a);return!0};r=function(c,
......
/*
* JQuery zTree exedit v3.5.39
* JQuery zTree exedit v3.5.40
* 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: 2019-01-017
* Date: 2019-01-18
*/
(function ($) {
//default consts of exedit
......
/*
* JQuery zTree exedit v3.5.39
* JQuery zTree exedit v3.5.40
* 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: 2019-01-017
* Date: 2019-01-18
*/
(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.39
* JQuery zTree exHideNodes v3.5.40
* 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: 2019-01-017
* Date: 2019-01-18
*/
(function ($) {
var _setting = {
......
/*
* JQuery zTree exHideNodes v3.5.39
* JQuery zTree exHideNodes v3.5.40
* 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: 2019-01-017
* Date: 2019-01-18
*/
(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='",
m.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,8 +13,11 @@
</font>
*2019.01.18* v3.5.40
* [修改] fuzzySearch.js Thanks @yigger
*2019.01.17* v3.5.39
* [修改] data.nodeChecked & data.isHidden & data.nodeIsParent 的 返回值规范为 boolean Thanks @xinhochen & @田biubiu
* [修改] data.nodeChecked & data.isHidden & data.nodeIsParent 的 返回值规范为 boolean Thanks @xinhochen & @田biubiu & @FelixFly
*2019.01.08* v3.5.38
* [修改] data.nodeChecked & data.isHidden 的 返回值规范为 boolean Thanks @xinhochen
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册