Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
GitCode
1024程序员开源挑战赛(10.23-11.14)
提交
4f32f69f
1
1024程序员开源挑战赛(10.23-11.14)
项目概览
GitCode
/
1024程序员开源挑战赛(10.23-11.14)
通知
180868
Star
1064
Fork
1042
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
86
列表
看板
标记
里程碑
合并请求
8
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
1
1024程序员开源挑战赛(10.23-11.14)
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
86
Issue
86
列表
看板
标记
里程碑
合并请求
8
合并请求
8
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
4f32f69f
编写于
6月 06, 2016
作者:
Z
ztree
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fixed bug: If your data's id = 'length', transformTozTreeFormat() method will throw an exception
上级
d57b614b
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
6 addition
and
5 deletion
+6
-5
api/apiCss/jquery.ztree.core.js
api/apiCss/jquery.ztree.core.js
+1
-1
js/jquery.ztree.all.js
js/jquery.ztree.all.js
+1
-1
js/jquery.ztree.all.min.js
js/jquery.ztree.all.min.js
+1
-1
js/jquery.ztree.core.js
js/jquery.ztree.core.js
+1
-1
js/jquery.ztree.core.min.js
js/jquery.ztree.core.min.js
+1
-1
log v3.x.txt
log v3.x.txt
+1
-0
未找到文件。
api/apiCss/jquery.ztree.core.js
浏览文件 @
4f32f69f
...
...
@@ -28,7 +28,7 @@ g=[],d=d.toLowerCase(),f=0,i=a.length;f<i;f++)typeof a[f][c]=="string"&&a[f][c].
b
.
data
.
key
.
children
,
d
=
a
.
parentTId
?
a
.
getParentNode
():
h
.
getRoot
(
b
),
e
=
0
,
g
=
d
[
c
].
length
;
e
<
g
;
e
++
)
if
(
d
[
c
][
e
]
===
a
)
return
e
==
0
?
null
:
d
[
c
][
e
-
1
];
return
null
},
getRoot
:
function
(
b
){
return
b
?
w
[
b
.
treeId
]:
null
},
getRoots
:
function
(){
return
w
},
getSetting
:
function
(
b
){
return
s
[
b
]},
getSettings
:
function
(){
return
s
},
getZTreeTools
:
function
(
b
){
return
(
b
=
this
.
getRoot
(
this
.
getSetting
(
b
)))?
b
.
treeTools
:
null
},
initCache
:
function
(
b
){
for
(
var
a
=
0
,
c
=
A
.
length
;
a
<
c
;
a
++
)
A
[
a
].
apply
(
this
,
arguments
)},
initNode
:
function
(
b
,
a
,
c
,
d
,
e
,
g
){
for
(
var
f
=
0
,
h
=
B
.
length
;
f
<
h
;
f
++
)
B
[
f
].
apply
(
this
,
arguments
)},
initRoot
:
function
(
b
){
for
(
var
a
=
0
,
c
=
C
.
length
;
a
<
c
;
a
++
)
C
[
a
].
apply
(
this
,
arguments
)},
isSelectedNode
:
function
(
b
,
a
){
for
(
var
c
=
h
.
getRoot
(
b
),
d
=
0
,
e
=
c
.
curSelectedList
.
length
;
d
<
e
;
d
++
)
if
(
a
===
c
.
curSelectedList
[
d
])
return
!
0
;
return
!
1
},
removeNodeCache
:
function
(
b
,
a
){
var
c
=
b
.
data
.
key
.
children
;
if
(
a
[
c
])
for
(
var
d
=
0
,
e
=
a
[
c
].
length
;
d
<
e
;
d
++
)
h
.
removeNodeCache
(
b
,
a
[
c
][
d
]);
h
.
getCache
(
b
).
nodes
[
h
.
getNodeCacheId
(
a
.
tId
)]
=
null
},
removeSelectedNode
:
function
(
b
,
a
){
for
(
var
c
=
h
.
getRoot
(
b
),
d
=
0
,
e
=
c
.
curSelectedList
.
length
;
d
<
e
;
d
++
)
if
(
a
===
c
.
curSelectedList
[
d
]
||!
h
.
getNodeCache
(
b
,
c
.
curSelectedList
[
d
].
tId
))
c
.
curSelectedList
.
splice
(
d
,
1
),
b
.
treeObj
.
trigger
(
f
.
event
.
UNSELECTED
,[
b
.
treeId
,
a
]),
d
--
,
e
--
},
setCache
:
function
(
b
,
a
){
x
[
b
.
treeId
]
=
a
},
setRoot
:
function
(
b
,
a
){
w
[
b
.
treeId
]
=
a
},
setZTreeTools
:
function
(
b
,
a
){
for
(
var
c
=
0
,
d
=
H
.
length
;
c
<
d
;
c
++
)
H
[
c
].
apply
(
this
,
arguments
)},
transformToArrayFormat
:
function
(
b
,
a
){
if
(
!
a
)
return
[];
var
c
=
b
.
data
.
key
.
children
,
d
=
[];
if
(
j
.
isArray
(
a
))
for
(
var
e
=
0
,
g
=
a
.
length
;
e
<
g
;
e
++
)
d
.
push
(
a
[
e
]),
a
[
e
][
c
]
&&
(
d
=
d
.
concat
(
h
.
transformToArrayFormat
(
b
,
a
[
e
][
c
])));
else
d
.
push
(
a
),
a
[
c
]
&&
(
d
=
d
.
concat
(
h
.
transformToArrayFormat
(
b
,
a
[
c
])));
return
d
},
transformTozTreeFormat
:
function
(
b
,
a
){
var
c
,
d
,
e
=
b
.
data
.
simpleData
.
idKey
,
g
=
b
.
data
.
simpleData
.
pIdKey
,
f
=
b
.
data
.
key
.
children
;
if
(
!
e
||
e
==
""
||!
a
)
return
[];
if
(
j
.
isArray
(
a
)){
var
h
=
[],
i
=
[]
;
for
(
c
=
0
,
d
=
a
.
length
;
c
<
d
;
c
++
)
i
[
a
[
c
][
e
]]
=
a
[
c
];
for
(
c
=
0
,
d
=
a
.
length
;
c
<
d
;
c
++
)
i
[
a
[
c
][
g
]]
&&
a
[
c
][
e
]
!=
a
[
c
][
g
]?(
i
[
a
[
c
][
g
]][
f
]
||
(
i
[
a
[
c
][
g
]][
f
]
=
[]),
i
[
a
[
c
][
g
]][
f
].
push
(
a
[
c
])):
h
.
push
(
a
[
c
]);
return
h
}
else
return
[
a
]}},
a
[
e
][
c
]
&&
(
d
=
d
.
concat
(
h
.
transformToArrayFormat
(
b
,
a
[
e
][
c
])));
else
d
.
push
(
a
),
a
[
c
]
&&
(
d
=
d
.
concat
(
h
.
transformToArrayFormat
(
b
,
a
[
c
])));
return
d
},
transformTozTreeFormat
:
function
(
b
,
a
){
var
c
,
d
,
e
=
b
.
data
.
simpleData
.
idKey
,
g
=
b
.
data
.
simpleData
.
pIdKey
,
f
=
b
.
data
.
key
.
children
;
if
(
!
e
||
e
==
""
||!
a
)
return
[];
if
(
j
.
isArray
(
a
)){
var
h
=
[],
i
=
{}
;
for
(
c
=
0
,
d
=
a
.
length
;
c
<
d
;
c
++
)
i
[
a
[
c
][
e
]]
=
a
[
c
];
for
(
c
=
0
,
d
=
a
.
length
;
c
<
d
;
c
++
)
i
[
a
[
c
][
g
]]
&&
a
[
c
][
e
]
!=
a
[
c
][
g
]?(
i
[
a
[
c
][
g
]][
f
]
||
(
i
[
a
[
c
][
g
]][
f
]
=
[]),
i
[
a
[
c
][
g
]][
f
].
push
(
a
[
c
])):
h
.
push
(
a
[
c
]);
return
h
}
else
return
[
a
]}},
l
=
{
bindEvent
:
function
(
b
){
for
(
var
a
=
0
,
c
=
y
.
length
;
a
<
c
;
a
++
)
y
[
a
].
apply
(
this
,
arguments
)},
unbindEvent
:
function
(
b
){
for
(
var
a
=
0
,
c
=
z
.
length
;
a
<
c
;
a
++
)
z
[
a
].
apply
(
this
,
arguments
)},
bindTree
:
function
(
b
){
var
a
=
{
treeId
:
b
.
treeId
},
c
=
b
.
treeObj
;
b
.
view
.
txtSelectedEnable
||
c
.
bind
(
"
selectstart
"
,
v
).
css
({
"
-moz-user-select
"
:
"
-moz-none
"
});
c
.
bind
(
"
click
"
,
a
,
l
.
proxy
);
c
.
bind
(
"
dblclick
"
,
a
,
l
.
proxy
);
c
.
bind
(
"
mouseover
"
,
a
,
l
.
proxy
);
c
.
bind
(
"
mouseout
"
,
a
,
l
.
proxy
);
c
.
bind
(
"
mousedown
"
,
a
,
l
.
proxy
);
c
.
bind
(
"
mouseup
"
,
a
,
l
.
proxy
);
c
.
bind
(
"
contextmenu
"
,
a
,
l
.
proxy
)},
unbindTree
:
function
(
b
){
b
.
treeObj
.
unbind
(
"
selectstart
"
,
v
).
unbind
(
"
click
"
,
l
.
proxy
).
unbind
(
"
dblclick
"
,
l
.
proxy
).
unbind
(
"
mouseover
"
,
l
.
proxy
).
unbind
(
"
mouseout
"
,
l
.
proxy
).
unbind
(
"
mousedown
"
,
l
.
proxy
).
unbind
(
"
mouseup
"
,
l
.
proxy
).
unbind
(
"
contextmenu
"
,
l
.
proxy
)},
doProxy
:
function
(
b
){
for
(
var
a
=
[],
c
=
0
,
d
=
u
.
length
;
c
<
d
;
c
++
){
var
e
=
u
[
c
].
apply
(
this
,
arguments
);
a
.
push
(
e
);
if
(
e
.
stop
)
break
}
return
a
},
proxy
:
function
(
b
){
var
a
=
h
.
getSetting
(
b
.
data
.
treeId
);
if
(
!
j
.
uCanDo
(
a
,
b
))
return
!
0
;
for
(
var
a
=
l
.
doProxy
(
b
),
c
=!
0
,
d
=
0
,
e
=
a
.
length
;
d
<
e
;
d
++
){
var
g
=
a
[
d
];
g
.
nodeEventCallback
&&
(
c
=
g
.
nodeEventCallback
.
apply
(
g
,[
b
,
g
.
node
])
&&
c
);
g
.
treeEventCallback
&&
(
c
=
g
.
treeEventCallback
.
apply
(
g
,[
b
,
g
.
node
])
&&
c
)}
return
c
}};
I
=
function
(
b
,
a
){
var
c
=
h
.
getSetting
(
b
.
data
.
treeId
);
if
(
a
.
open
){
if
(
j
.
apply
(
c
.
callback
.
beforeCollapse
,[
c
.
treeId
,
a
],
!
0
)
==!
1
)
return
!
0
}
else
if
(
j
.
apply
(
c
.
callback
.
beforeExpand
,[
c
.
treeId
,
a
],
!
0
)
==!
1
)
return
!
0
;
h
.
getRoot
(
c
).
expandTriggerFlag
=!
0
;
i
.
switchNode
(
c
,
a
);
return
!
0
};
J
=
function
(
b
,
a
){
var
c
=
h
.
getSetting
(
b
.
data
.
treeId
),
d
=
c
.
view
.
autoCancelSelected
&&
...
...
js/jquery.ztree.all.js
浏览文件 @
4f32f69f
...
...
@@ -651,7 +651,7 @@
if
(
tools
.
isArray
(
sNodes
))
{
var
r
=
[];
var
tmpMap
=
[]
;
var
tmpMap
=
{}
;
for
(
i
=
0
,
l
=
sNodes
.
length
;
i
<
l
;
i
++
)
{
tmpMap
[
sNodes
[
i
][
key
]]
=
sNodes
[
i
];
}
...
...
js/jquery.ztree.all.min.js
浏览文件 @
4f32f69f
...
...
@@ -29,7 +29,7 @@ g=[],d=d.toLowerCase(),f=0,i=a.length;f<i;f++)typeof a[f][c]=="string"&&a[f][c].
b
.
data
.
key
.
children
,
d
=
a
.
parentTId
?
a
.
getParentNode
():
h
.
getRoot
(
b
),
e
=
0
,
g
=
d
[
c
].
length
;
e
<
g
;
e
++
)
if
(
d
[
c
][
e
]
===
a
)
return
e
==
0
?
null
:
d
[
c
][
e
-
1
];
return
null
},
getRoot
:
function
(
b
){
return
b
?
w
[
b
.
treeId
]:
null
},
getRoots
:
function
(){
return
w
},
getSetting
:
function
(
b
){
return
s
[
b
]},
getSettings
:
function
(){
return
s
},
getZTreeTools
:
function
(
b
){
return
(
b
=
this
.
getRoot
(
this
.
getSetting
(
b
)))?
b
.
treeTools
:
null
},
initCache
:
function
(
b
){
for
(
var
a
=
0
,
c
=
A
.
length
;
a
<
c
;
a
++
)
A
[
a
].
apply
(
this
,
arguments
)},
initNode
:
function
(
b
,
a
,
c
,
d
,
e
,
g
){
for
(
var
f
=
0
,
h
=
B
.
length
;
f
<
h
;
f
++
)
B
[
f
].
apply
(
this
,
arguments
)},
initRoot
:
function
(
b
){
for
(
var
a
=
0
,
c
=
C
.
length
;
a
<
c
;
a
++
)
C
[
a
].
apply
(
this
,
arguments
)},
isSelectedNode
:
function
(
b
,
a
){
for
(
var
c
=
h
.
getRoot
(
b
),
d
=
0
,
e
=
c
.
curSelectedList
.
length
;
d
<
e
;
d
++
)
if
(
a
===
c
.
curSelectedList
[
d
])
return
!
0
;
return
!
1
},
removeNodeCache
:
function
(
b
,
a
){
var
c
=
b
.
data
.
key
.
children
;
if
(
a
[
c
])
for
(
var
d
=
0
,
e
=
a
[
c
].
length
;
d
<
e
;
d
++
)
h
.
removeNodeCache
(
b
,
a
[
c
][
d
]);
h
.
getCache
(
b
).
nodes
[
h
.
getNodeCacheId
(
a
.
tId
)]
=
null
},
removeSelectedNode
:
function
(
b
,
a
){
for
(
var
c
=
h
.
getRoot
(
b
),
d
=
0
,
e
=
c
.
curSelectedList
.
length
;
d
<
e
;
d
++
)
if
(
a
===
c
.
curSelectedList
[
d
]
||!
h
.
getNodeCache
(
b
,
c
.
curSelectedList
[
d
].
tId
))
c
.
curSelectedList
.
splice
(
d
,
1
),
b
.
treeObj
.
trigger
(
f
.
event
.
UNSELECTED
,[
b
.
treeId
,
a
]),
d
--
,
e
--
},
setCache
:
function
(
b
,
a
){
x
[
b
.
treeId
]
=
a
},
setRoot
:
function
(
b
,
a
){
w
[
b
.
treeId
]
=
a
},
setZTreeTools
:
function
(
b
,
a
){
for
(
var
c
=
0
,
d
=
H
.
length
;
c
<
d
;
c
++
)
H
[
c
].
apply
(
this
,
arguments
)},
transformToArrayFormat
:
function
(
b
,
a
){
if
(
!
a
)
return
[];
var
c
=
b
.
data
.
key
.
children
,
d
=
[];
if
(
j
.
isArray
(
a
))
for
(
var
e
=
0
,
g
=
a
.
length
;
e
<
g
;
e
++
)
d
.
push
(
a
[
e
]),
a
[
e
][
c
]
&&
(
d
=
d
.
concat
(
h
.
transformToArrayFormat
(
b
,
a
[
e
][
c
])));
else
d
.
push
(
a
),
a
[
c
]
&&
(
d
=
d
.
concat
(
h
.
transformToArrayFormat
(
b
,
a
[
c
])));
return
d
},
transformTozTreeFormat
:
function
(
b
,
a
){
var
c
,
d
,
e
=
b
.
data
.
simpleData
.
idKey
,
g
=
b
.
data
.
simpleData
.
pIdKey
,
f
=
b
.
data
.
key
.
children
;
if
(
!
e
||
e
==
""
||!
a
)
return
[];
if
(
j
.
isArray
(
a
)){
var
h
=
[],
i
=
[]
;
for
(
c
=
0
,
d
=
a
.
length
;
c
<
d
;
c
++
)
i
[
a
[
c
][
e
]]
=
a
[
c
];
for
(
c
=
0
,
d
=
a
.
length
;
c
<
d
;
c
++
)
i
[
a
[
c
][
g
]]
&&
a
[
c
][
e
]
!=
a
[
c
][
g
]?(
i
[
a
[
c
][
g
]][
f
]
||
(
i
[
a
[
c
][
g
]][
f
]
=
[]),
i
[
a
[
c
][
g
]][
f
].
push
(
a
[
c
])):
h
.
push
(
a
[
c
]);
return
h
}
else
return
[
a
]}},
a
[
e
][
c
]
&&
(
d
=
d
.
concat
(
h
.
transformToArrayFormat
(
b
,
a
[
e
][
c
])));
else
d
.
push
(
a
),
a
[
c
]
&&
(
d
=
d
.
concat
(
h
.
transformToArrayFormat
(
b
,
a
[
c
])));
return
d
},
transformTozTreeFormat
:
function
(
b
,
a
){
var
c
,
d
,
e
=
b
.
data
.
simpleData
.
idKey
,
g
=
b
.
data
.
simpleData
.
pIdKey
,
f
=
b
.
data
.
key
.
children
;
if
(
!
e
||
e
==
""
||!
a
)
return
[];
if
(
j
.
isArray
(
a
)){
var
h
=
[],
i
=
{}
;
for
(
c
=
0
,
d
=
a
.
length
;
c
<
d
;
c
++
)
i
[
a
[
c
][
e
]]
=
a
[
c
];
for
(
c
=
0
,
d
=
a
.
length
;
c
<
d
;
c
++
)
i
[
a
[
c
][
g
]]
&&
a
[
c
][
e
]
!=
a
[
c
][
g
]?(
i
[
a
[
c
][
g
]][
f
]
||
(
i
[
a
[
c
][
g
]][
f
]
=
[]),
i
[
a
[
c
][
g
]][
f
].
push
(
a
[
c
])):
h
.
push
(
a
[
c
]);
return
h
}
else
return
[
a
]}},
l
=
{
bindEvent
:
function
(
b
){
for
(
var
a
=
0
,
c
=
y
.
length
;
a
<
c
;
a
++
)
y
[
a
].
apply
(
this
,
arguments
)},
unbindEvent
:
function
(
b
){
for
(
var
a
=
0
,
c
=
z
.
length
;
a
<
c
;
a
++
)
z
[
a
].
apply
(
this
,
arguments
)},
bindTree
:
function
(
b
){
var
a
=
{
treeId
:
b
.
treeId
},
c
=
b
.
treeObj
;
b
.
view
.
txtSelectedEnable
||
c
.
bind
(
"
selectstart
"
,
v
).
css
({
"
-moz-user-select
"
:
"
-moz-none
"
});
c
.
bind
(
"
click
"
,
a
,
l
.
proxy
);
c
.
bind
(
"
dblclick
"
,
a
,
l
.
proxy
);
c
.
bind
(
"
mouseover
"
,
a
,
l
.
proxy
);
c
.
bind
(
"
mouseout
"
,
a
,
l
.
proxy
);
c
.
bind
(
"
mousedown
"
,
a
,
l
.
proxy
);
c
.
bind
(
"
mouseup
"
,
a
,
l
.
proxy
);
c
.
bind
(
"
contextmenu
"
,
a
,
l
.
proxy
)},
unbindTree
:
function
(
b
){
b
.
treeObj
.
unbind
(
"
selectstart
"
,
v
).
unbind
(
"
click
"
,
l
.
proxy
).
unbind
(
"
dblclick
"
,
l
.
proxy
).
unbind
(
"
mouseover
"
,
l
.
proxy
).
unbind
(
"
mouseout
"
,
l
.
proxy
).
unbind
(
"
mousedown
"
,
l
.
proxy
).
unbind
(
"
mouseup
"
,
l
.
proxy
).
unbind
(
"
contextmenu
"
,
l
.
proxy
)},
doProxy
:
function
(
b
){
for
(
var
a
=
[],
c
=
0
,
d
=
u
.
length
;
c
<
d
;
c
++
){
var
e
=
u
[
c
].
apply
(
this
,
arguments
);
a
.
push
(
e
);
if
(
e
.
stop
)
break
}
return
a
},
proxy
:
function
(
b
){
var
a
=
h
.
getSetting
(
b
.
data
.
treeId
);
if
(
!
j
.
uCanDo
(
a
,
b
))
return
!
0
;
for
(
var
a
=
l
.
doProxy
(
b
),
c
=!
0
,
d
=
0
,
e
=
a
.
length
;
d
<
e
;
d
++
){
var
g
=
a
[
d
];
g
.
nodeEventCallback
&&
(
c
=
g
.
nodeEventCallback
.
apply
(
g
,[
b
,
g
.
node
])
&&
c
);
g
.
treeEventCallback
&&
(
c
=
g
.
treeEventCallback
.
apply
(
g
,[
b
,
g
.
node
])
&&
c
)}
return
c
}};
I
=
function
(
b
,
a
){
var
c
=
h
.
getSetting
(
b
.
data
.
treeId
);
if
(
a
.
open
){
if
(
j
.
apply
(
c
.
callback
.
beforeCollapse
,[
c
.
treeId
,
a
],
!
0
)
==!
1
)
return
!
0
}
else
if
(
j
.
apply
(
c
.
callback
.
beforeExpand
,[
c
.
treeId
,
a
],
!
0
)
==!
1
)
return
!
0
;
h
.
getRoot
(
c
).
expandTriggerFlag
=!
0
;
i
.
switchNode
(
c
,
a
);
return
!
0
};
J
=
function
(
b
,
a
){
var
c
=
h
.
getSetting
(
b
.
data
.
treeId
),
d
=
c
.
view
.
autoCancelSelected
&&
...
...
js/jquery.ztree.core.js
浏览文件 @
4f32f69f
...
...
@@ -650,7 +650,7 @@
if
(
tools
.
isArray
(
sNodes
))
{
var
r
=
[];
var
tmpMap
=
[]
;
var
tmpMap
=
{}
;
for
(
i
=
0
,
l
=
sNodes
.
length
;
i
<
l
;
i
++
)
{
tmpMap
[
sNodes
[
i
][
key
]]
=
sNodes
[
i
];
}
...
...
js/jquery.ztree.core.min.js
浏览文件 @
4f32f69f
...
...
@@ -28,7 +28,7 @@ g=[],d=d.toLowerCase(),f=0,i=a.length;f<i;f++)typeof a[f][c]=="string"&&a[f][c].
b
.
data
.
key
.
children
,
d
=
a
.
parentTId
?
a
.
getParentNode
():
h
.
getRoot
(
b
),
e
=
0
,
g
=
d
[
c
].
length
;
e
<
g
;
e
++
)
if
(
d
[
c
][
e
]
===
a
)
return
e
==
0
?
null
:
d
[
c
][
e
-
1
];
return
null
},
getRoot
:
function
(
b
){
return
b
?
w
[
b
.
treeId
]:
null
},
getRoots
:
function
(){
return
w
},
getSetting
:
function
(
b
){
return
s
[
b
]},
getSettings
:
function
(){
return
s
},
getZTreeTools
:
function
(
b
){
return
(
b
=
this
.
getRoot
(
this
.
getSetting
(
b
)))?
b
.
treeTools
:
null
},
initCache
:
function
(
b
){
for
(
var
a
=
0
,
c
=
A
.
length
;
a
<
c
;
a
++
)
A
[
a
].
apply
(
this
,
arguments
)},
initNode
:
function
(
b
,
a
,
c
,
d
,
e
,
g
){
for
(
var
f
=
0
,
h
=
B
.
length
;
f
<
h
;
f
++
)
B
[
f
].
apply
(
this
,
arguments
)},
initRoot
:
function
(
b
){
for
(
var
a
=
0
,
c
=
C
.
length
;
a
<
c
;
a
++
)
C
[
a
].
apply
(
this
,
arguments
)},
isSelectedNode
:
function
(
b
,
a
){
for
(
var
c
=
h
.
getRoot
(
b
),
d
=
0
,
e
=
c
.
curSelectedList
.
length
;
d
<
e
;
d
++
)
if
(
a
===
c
.
curSelectedList
[
d
])
return
!
0
;
return
!
1
},
removeNodeCache
:
function
(
b
,
a
){
var
c
=
b
.
data
.
key
.
children
;
if
(
a
[
c
])
for
(
var
d
=
0
,
e
=
a
[
c
].
length
;
d
<
e
;
d
++
)
h
.
removeNodeCache
(
b
,
a
[
c
][
d
]);
h
.
getCache
(
b
).
nodes
[
h
.
getNodeCacheId
(
a
.
tId
)]
=
null
},
removeSelectedNode
:
function
(
b
,
a
){
for
(
var
c
=
h
.
getRoot
(
b
),
d
=
0
,
e
=
c
.
curSelectedList
.
length
;
d
<
e
;
d
++
)
if
(
a
===
c
.
curSelectedList
[
d
]
||!
h
.
getNodeCache
(
b
,
c
.
curSelectedList
[
d
].
tId
))
c
.
curSelectedList
.
splice
(
d
,
1
),
b
.
treeObj
.
trigger
(
f
.
event
.
UNSELECTED
,[
b
.
treeId
,
a
]),
d
--
,
e
--
},
setCache
:
function
(
b
,
a
){
x
[
b
.
treeId
]
=
a
},
setRoot
:
function
(
b
,
a
){
w
[
b
.
treeId
]
=
a
},
setZTreeTools
:
function
(
b
,
a
){
for
(
var
c
=
0
,
d
=
H
.
length
;
c
<
d
;
c
++
)
H
[
c
].
apply
(
this
,
arguments
)},
transformToArrayFormat
:
function
(
b
,
a
){
if
(
!
a
)
return
[];
var
c
=
b
.
data
.
key
.
children
,
d
=
[];
if
(
j
.
isArray
(
a
))
for
(
var
e
=
0
,
g
=
a
.
length
;
e
<
g
;
e
++
)
d
.
push
(
a
[
e
]),
a
[
e
][
c
]
&&
(
d
=
d
.
concat
(
h
.
transformToArrayFormat
(
b
,
a
[
e
][
c
])));
else
d
.
push
(
a
),
a
[
c
]
&&
(
d
=
d
.
concat
(
h
.
transformToArrayFormat
(
b
,
a
[
c
])));
return
d
},
transformTozTreeFormat
:
function
(
b
,
a
){
var
c
,
d
,
e
=
b
.
data
.
simpleData
.
idKey
,
g
=
b
.
data
.
simpleData
.
pIdKey
,
f
=
b
.
data
.
key
.
children
;
if
(
!
e
||
e
==
""
||!
a
)
return
[];
if
(
j
.
isArray
(
a
)){
var
h
=
[],
i
=
[]
;
for
(
c
=
0
,
d
=
a
.
length
;
c
<
d
;
c
++
)
i
[
a
[
c
][
e
]]
=
a
[
c
];
for
(
c
=
0
,
d
=
a
.
length
;
c
<
d
;
c
++
)
i
[
a
[
c
][
g
]]
&&
a
[
c
][
e
]
!=
a
[
c
][
g
]?(
i
[
a
[
c
][
g
]][
f
]
||
(
i
[
a
[
c
][
g
]][
f
]
=
[]),
i
[
a
[
c
][
g
]][
f
].
push
(
a
[
c
])):
h
.
push
(
a
[
c
]);
return
h
}
else
return
[
a
]}},
a
[
e
][
c
]
&&
(
d
=
d
.
concat
(
h
.
transformToArrayFormat
(
b
,
a
[
e
][
c
])));
else
d
.
push
(
a
),
a
[
c
]
&&
(
d
=
d
.
concat
(
h
.
transformToArrayFormat
(
b
,
a
[
c
])));
return
d
},
transformTozTreeFormat
:
function
(
b
,
a
){
var
c
,
d
,
e
=
b
.
data
.
simpleData
.
idKey
,
g
=
b
.
data
.
simpleData
.
pIdKey
,
f
=
b
.
data
.
key
.
children
;
if
(
!
e
||
e
==
""
||!
a
)
return
[];
if
(
j
.
isArray
(
a
)){
var
h
=
[],
i
=
{}
;
for
(
c
=
0
,
d
=
a
.
length
;
c
<
d
;
c
++
)
i
[
a
[
c
][
e
]]
=
a
[
c
];
for
(
c
=
0
,
d
=
a
.
length
;
c
<
d
;
c
++
)
i
[
a
[
c
][
g
]]
&&
a
[
c
][
e
]
!=
a
[
c
][
g
]?(
i
[
a
[
c
][
g
]][
f
]
||
(
i
[
a
[
c
][
g
]][
f
]
=
[]),
i
[
a
[
c
][
g
]][
f
].
push
(
a
[
c
])):
h
.
push
(
a
[
c
]);
return
h
}
else
return
[
a
]}},
l
=
{
bindEvent
:
function
(
b
){
for
(
var
a
=
0
,
c
=
y
.
length
;
a
<
c
;
a
++
)
y
[
a
].
apply
(
this
,
arguments
)},
unbindEvent
:
function
(
b
){
for
(
var
a
=
0
,
c
=
z
.
length
;
a
<
c
;
a
++
)
z
[
a
].
apply
(
this
,
arguments
)},
bindTree
:
function
(
b
){
var
a
=
{
treeId
:
b
.
treeId
},
c
=
b
.
treeObj
;
b
.
view
.
txtSelectedEnable
||
c
.
bind
(
"
selectstart
"
,
v
).
css
({
"
-moz-user-select
"
:
"
-moz-none
"
});
c
.
bind
(
"
click
"
,
a
,
l
.
proxy
);
c
.
bind
(
"
dblclick
"
,
a
,
l
.
proxy
);
c
.
bind
(
"
mouseover
"
,
a
,
l
.
proxy
);
c
.
bind
(
"
mouseout
"
,
a
,
l
.
proxy
);
c
.
bind
(
"
mousedown
"
,
a
,
l
.
proxy
);
c
.
bind
(
"
mouseup
"
,
a
,
l
.
proxy
);
c
.
bind
(
"
contextmenu
"
,
a
,
l
.
proxy
)},
unbindTree
:
function
(
b
){
b
.
treeObj
.
unbind
(
"
selectstart
"
,
v
).
unbind
(
"
click
"
,
l
.
proxy
).
unbind
(
"
dblclick
"
,
l
.
proxy
).
unbind
(
"
mouseover
"
,
l
.
proxy
).
unbind
(
"
mouseout
"
,
l
.
proxy
).
unbind
(
"
mousedown
"
,
l
.
proxy
).
unbind
(
"
mouseup
"
,
l
.
proxy
).
unbind
(
"
contextmenu
"
,
l
.
proxy
)},
doProxy
:
function
(
b
){
for
(
var
a
=
[],
c
=
0
,
d
=
u
.
length
;
c
<
d
;
c
++
){
var
e
=
u
[
c
].
apply
(
this
,
arguments
);
a
.
push
(
e
);
if
(
e
.
stop
)
break
}
return
a
},
proxy
:
function
(
b
){
var
a
=
h
.
getSetting
(
b
.
data
.
treeId
);
if
(
!
j
.
uCanDo
(
a
,
b
))
return
!
0
;
for
(
var
a
=
l
.
doProxy
(
b
),
c
=!
0
,
d
=
0
,
e
=
a
.
length
;
d
<
e
;
d
++
){
var
g
=
a
[
d
];
g
.
nodeEventCallback
&&
(
c
=
g
.
nodeEventCallback
.
apply
(
g
,[
b
,
g
.
node
])
&&
c
);
g
.
treeEventCallback
&&
(
c
=
g
.
treeEventCallback
.
apply
(
g
,[
b
,
g
.
node
])
&&
c
)}
return
c
}};
I
=
function
(
b
,
a
){
var
c
=
h
.
getSetting
(
b
.
data
.
treeId
);
if
(
a
.
open
){
if
(
j
.
apply
(
c
.
callback
.
beforeCollapse
,[
c
.
treeId
,
a
],
!
0
)
==!
1
)
return
!
0
}
else
if
(
j
.
apply
(
c
.
callback
.
beforeExpand
,[
c
.
treeId
,
a
],
!
0
)
==!
1
)
return
!
0
;
h
.
getRoot
(
c
).
expandTriggerFlag
=!
0
;
i
.
switchNode
(
c
,
a
);
return
!
0
};
J
=
function
(
b
,
a
){
var
c
=
h
.
getSetting
(
b
.
data
.
treeId
),
d
=
c
.
view
.
autoCancelSelected
&&
...
...
log v3.x.txt
浏览文件 @
4f32f69f
...
...
@@ -16,6 +16,7 @@
*2016.06.06* v3.5.24
* [修改] selectNode 方法中 某些情况下,isSilent 参数无效
* [修改] 数据中 id = 'length'时, 导致 transformTozTreeFormat() 方法异常
*2016.04.08* v3.5.23
* [修改] expandCollapseNode 方法被 gulp 压缩后,在 IE8 上会导致溢出
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录