Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
GitCode
1024程序员开源挑战赛(10.23-11.14)
提交
e9f1dfb3
1
1024程序员开源挑战赛(10.23-11.14)
项目概览
GitCode
/
1024程序员开源挑战赛(10.23-11.14)
通知
180867
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看板
提交
e9f1dfb3
编写于
11月 14, 2017
作者:
Z
ztree
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fixed issue: scrollIntoViewIfNeeded will throw error , because IE7 has not Element
上级
9916b22e
变更
15
展开全部
隐藏空白更改
内联
并排
Showing
15 changed file
with
244 addition
and
217 deletion
+244
-217
README.md
README.md
+1
-1
api/API_cn.html
api/API_cn.html
+1
-1
api/API_en.html
api/API_en.html
+1
-1
api/apiCss/jquery.ztree.core.js
api/apiCss/jquery.ztree.core.js
+61
-60
js/jquery.ztree.all.js
js/jquery.ztree.all.js
+20
-10
js/jquery.ztree.all.min.js
js/jquery.ztree.all.min.js
+66
-65
js/jquery.ztree.core.js
js/jquery.ztree.core.js
+15
-5
js/jquery.ztree.core.min.js
js/jquery.ztree.core.min.js
+61
-60
js/jquery.ztree.excheck.js
js/jquery.ztree.excheck.js
+2
-2
js/jquery.ztree.excheck.min.js
js/jquery.ztree.excheck.min.js
+2
-2
js/jquery.ztree.exedit.js
js/jquery.ztree.exedit.js
+3
-3
js/jquery.ztree.exedit.min.js
js/jquery.ztree.exedit.min.js
+3
-3
js/jquery.ztree.exhide.js
js/jquery.ztree.exhide.js
+2
-2
js/jquery.ztree.exhide.min.js
js/jquery.ztree.exhide.min.js
+2
-2
log v3.x.txt
log v3.x.txt
+4
-0
未找到文件。
README.md
浏览文件 @
e9f1dfb3
jQuery Tree Plugin ---- zTree
============
last verson : 3.5.
29
last verson : 3.5.
30
**Donate to zTree**
: http://www.treejs.cn/v3/donate.php
...
...
api/API_cn.html
浏览文件 @
e9f1dfb3
...
...
@@ -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.
29
API 文档
</em></h1><p></p>
<h1><em>
zTree v3.5.
30
API 文档
</em></h1><p></p>
<p>
all.js = core + excheck + exedit ( 不包括 exhide ); 发现错误请及时通知,谢谢。
</p>
</div>
<ul
class=
"shortcuts language"
style=
"top:0;"
>
...
...
api/API_en.html
浏览文件 @
e9f1dfb3
...
...
@@ -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.
29
API Document
</em></h1><p></p>
<h1><em>
zTree v3.5.
30
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;"
>
...
...
api/apiCss/jquery.ztree.core.js
浏览文件 @
e9f1dfb3
此差异已折叠。
点击以展开。
js/jquery.ztree.all.js
浏览文件 @
e9f1dfb3
/*
* JQuery zTree core v3.5.
29
* JQuery zTree core v3.5.
30
* 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: 2017-
06-19
* Date: 2017-
11-11
*/
(
function
(
$
)
{
var
settings
=
{},
roots
=
{},
caches
=
{},
...
...
@@ -1374,10 +1374,20 @@
$$
(
node
,
consts
.
id
.
UL
,
setting
).
empty
();
}
},
scrollIntoView
:
function
(
dom
)
{
scrollIntoView
:
function
(
setting
,
dom
)
{
if
(
!
dom
)
{
return
;
}
// support IE 7
if
(
typeof
Element
===
'
undefined
'
)
{
var
contRect
=
setting
.
treeObj
.
get
(
0
).
getBoundingClientRect
(),
findMeRect
=
dom
.
getBoundingClientRect
();
if
(
findMeRect
.
top
<
contRect
.
top
||
findMeRect
.
bottom
>
contRect
.
bottom
||
findMeRect
.
right
>
contRect
.
right
||
findMeRect
.
left
<
contRect
.
left
)
{
dom
.
scrollIntoView
();
}
return
;
}
// code src: http://jsfiddle.net/08u6cxwj/
if
(
!
Element
.
prototype
.
scrollIntoViewIfNeeded
)
{
Element
.
prototype
.
scrollIntoViewIfNeeded
=
function
(
centerIfNeeded
)
{
...
...
@@ -1762,7 +1772,7 @@
function
showNodeFocus
()
{
var
a
=
$$
(
node
,
setting
).
get
(
0
);
if
(
a
&&
focus
!==
false
)
{
view
.
scrollIntoView
(
a
);
view
.
scrollIntoView
(
setting
,
a
);
}
}
},
...
...
@@ -1887,7 +1897,7 @@
return
;
}
var
a
=
$$
(
node
,
setting
).
get
(
0
);
view
.
scrollIntoView
(
a
);
view
.
scrollIntoView
(
setting
,
a
);
}
},
transformTozTreeNodes
:
function
(
simpleNodes
)
{
...
...
@@ -1925,7 +1935,7 @@
consts
=
zt
.
consts
;
})(
jQuery
);
/*
* JQuery zTree excheck v3.5.
29
* JQuery zTree excheck v3.5.
30
* http://treejs.cn/
*
* Copyright (c) 2010 Hunter.z
...
...
@@ -1934,7 +1944,7 @@
* http://www.opensource.org/licenses/mit-license.php
*
* email: hunter.z@263.net
* Date: 2017-
06-19
* Date: 2017-
11-11
*/
(
function
(
$
){
//default consts of excheck
...
...
@@ -2553,7 +2563,7 @@
}
})(
jQuery
);
/*
* JQuery zTree exedit v3.5.
29
* JQuery zTree exedit v3.5.
30
* http://treejs.cn/
*
* Copyright (c) 2010 Hunter.z
...
...
@@ -2562,7 +2572,7 @@
* http://www.opensource.org/licenses/mit-license.php
*
* email: hunter.z@263.net
* Date: 2017-
06-19
* Date: 2017-
11-11
*/
(
function
(
$
){
//default consts of exedit
...
...
@@ -3246,7 +3256,7 @@
view
.
selectNodes
(
targetSetting
,
newNodes
);
var
a
=
$$
(
newNodes
[
0
],
setting
).
get
(
0
);
view
.
scrollIntoView
(
a
);
view
.
scrollIntoView
(
setting
,
a
);
setting
.
treeObj
.
trigger
(
consts
.
event
.
DROP
,
[
event
,
targetSetting
.
treeId
,
newNodes
,
dragTargetNode
,
moveType
,
isCopy
]);
}
...
...
js/jquery.ztree.all.min.js
浏览文件 @
e9f1dfb3
此差异已折叠。
点击以展开。
js/jquery.ztree.core.js
浏览文件 @
e9f1dfb3
/*
* JQuery zTree core v3.5.
29
* JQuery zTree core v3.5.
30
* 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: 2017-
06-19
* Date: 2017-
11-11
*/
(
function
(
$
)
{
var
settings
=
{},
roots
=
{},
caches
=
{},
...
...
@@ -1373,10 +1373,20 @@
$$
(
node
,
consts
.
id
.
UL
,
setting
).
empty
();
}
},
scrollIntoView
:
function
(
dom
)
{
scrollIntoView
:
function
(
setting
,
dom
)
{
if
(
!
dom
)
{
return
;
}
// support IE 7
if
(
typeof
Element
===
'
undefined
'
)
{
var
contRect
=
setting
.
treeObj
.
get
(
0
).
getBoundingClientRect
(),
findMeRect
=
dom
.
getBoundingClientRect
();
if
(
findMeRect
.
top
<
contRect
.
top
||
findMeRect
.
bottom
>
contRect
.
bottom
||
findMeRect
.
right
>
contRect
.
right
||
findMeRect
.
left
<
contRect
.
left
)
{
dom
.
scrollIntoView
();
}
return
;
}
// code src: http://jsfiddle.net/08u6cxwj/
if
(
!
Element
.
prototype
.
scrollIntoViewIfNeeded
)
{
Element
.
prototype
.
scrollIntoViewIfNeeded
=
function
(
centerIfNeeded
)
{
...
...
@@ -1761,7 +1771,7 @@
function
showNodeFocus
()
{
var
a
=
$$
(
node
,
setting
).
get
(
0
);
if
(
a
&&
focus
!==
false
)
{
view
.
scrollIntoView
(
a
);
view
.
scrollIntoView
(
setting
,
a
);
}
}
},
...
...
@@ -1886,7 +1896,7 @@
return
;
}
var
a
=
$$
(
node
,
setting
).
get
(
0
);
view
.
scrollIntoView
(
a
);
view
.
scrollIntoView
(
setting
,
a
);
}
},
transformTozTreeNodes
:
function
(
simpleNodes
)
{
...
...
js/jquery.ztree.core.min.js
浏览文件 @
e9f1dfb3
此差异已折叠。
点击以展开。
js/jquery.ztree.excheck.js
浏览文件 @
e9f1dfb3
/*
* JQuery zTree excheck v3.5.
29
* JQuery zTree excheck v3.5.
30
* 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: 2017-
06-19
* Date: 2017-
11-11
*/
(
function
(
$
){
//default consts of excheck
...
...
js/jquery.ztree.excheck.min.js
浏览文件 @
e9f1dfb3
/*
* JQuery zTree excheck v3.5.
29
* JQuery zTree excheck v3.5.
30
* 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: 2017-
06-19
* Date: 2017-
11-11
*/
(
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
=
g
.
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
=
g
.
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
===
...
...
js/jquery.ztree.exedit.js
浏览文件 @
e9f1dfb3
/*
* JQuery zTree exedit v3.5.
29
* JQuery zTree exedit v3.5.
30
* 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: 2017-
06-19
* Date: 2017-
11-11
*/
(
function
(
$
){
//default consts of exedit
...
...
@@ -692,7 +692,7 @@
view
.
selectNodes
(
targetSetting
,
newNodes
);
var
a
=
$$
(
newNodes
[
0
],
setting
).
get
(
0
);
view
.
scrollIntoView
(
a
);
view
.
scrollIntoView
(
setting
,
a
);
setting
.
treeObj
.
trigger
(
consts
.
event
.
DROP
,
[
event
,
targetSetting
.
treeId
,
newNodes
,
dragTargetNode
,
moveType
,
isCopy
]);
}
...
...
js/jquery.ztree.exedit.min.js
浏览文件 @
e9f1dfb3
/*
* JQuery zTree exedit v3.5.
29
* JQuery zTree exedit v3.5.
30
* 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: 2017-
06-19
* Date: 2017-
11-11
*/
(
function
(
v
){
var
J
=
{
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
(
B
.
dragFlag
==
0
&&
Math
.
abs
(
O
-
b
.
clientX
)
<
e
.
edit
.
drag
.
minMoveSize
&&
Math
.
abs
(
P
-
b
.
clientY
)
<
e
.
edit
.
drag
.
minMoveSize
)
return
!
0
;
var
a
,
c
,
n
,
k
,
i
;
i
=
e
.
data
.
key
.
children
;
M
.
css
(
"
cursor
"
,
"
pointer
"
);
if
(
B
.
dragFlag
==
0
){
if
(
g
.
apply
(
e
.
callback
.
beforeDrag
,[
e
.
treeId
,
l
],
!
0
)
==!
1
)
return
r
(
b
),
!
0
;
for
(
a
=
0
,
c
=
l
.
length
;
a
<
c
;
a
++
){
if
(
a
==
0
)
B
.
dragNodeShowBefore
=
...
...
@@ -25,7 +25,7 @@ H=n?i?0.25:k?0.5:1:-1,N=k?i?0.75:n?0.5:0:-1,y=(b.clientY+y-p)/F.height(),(H==1||
h
.
edit
.
drag
.
autoOpenTime
+
50
),
window
.
zTreeMoveTargetNodeTId
=
z
.
tId
}}
else
if
(
w
=
d
.
move
.
TYPE_INNER
,
s
&&
g
.
apply
(
h
.
edit
.
drag
.
inner
,[
h
.
treeId
,
l
,
null
],
!!
h
.
edit
.
drag
.
inner
)?
s
.
addClass
(
d
.
node
.
TMPTARGET_TREE
):
s
=
null
,
A
.
css
({
display
:
"
none
"
}),
window
.
zTreeMoveTimer
)
clearTimeout
(
window
.
zTreeMoveTimer
),
window
.
zTreeMoveTargetNodeTId
=
null
;
T
=
u
;
U
=
w
;
e
.
treeObj
.
trigger
(
d
.
event
.
DRAGMOVE
,[
b
,
e
.
treeId
,
l
])}
return
!
1
}
function
r
(
b
){
if
(
window
.
zTreeMoveTimer
)
clearTimeout
(
window
.
zTreeMoveTimer
),
window
.
zTreeMoveTargetNodeTId
=
null
;
U
=
T
=
null
;
G
.
unbind
(
"
mousemove
"
,
c
);
G
.
unbind
(
"
mouseup
"
,
r
);
G
.
unbind
(
"
selectstart
"
,
k
);
M
.
css
(
"
cursor
"
,
""
);
s
&&
(
s
.
removeClass
(
d
.
node
.
TMPTARGET_TREE
),
u
&&
v
(
"
#
"
+
u
+
d
.
id
.
A
,
s
).
removeClass
(
d
.
node
.
TMPTARGET_NODE
+
"
_
"
+
d
.
move
.
TYPE_PREV
).
removeClass
(
d
.
node
.
TMPTARGET_NODE
+
"
_
"
+
J
.
move
.
TYPE_NEXT
).
removeClass
(
d
.
node
.
TMPTARGET_NODE
+
"
_
"
+
J
.
move
.
TYPE_INNER
));
g
.
showIfameMask
(
e
,
!
1
);
t
.
showHoverDom
=!
0
;
if
(
B
.
dragFlag
!=
0
){
B
.
dragFlag
=
0
;
var
a
,
i
,
j
;
for
(
a
=
0
,
i
=
l
.
length
;
a
<
i
;
a
++
)
j
=
l
[
a
],
j
.
isParent
&&
B
.
dragNodeShowBefore
[
j
.
tId
]
&&!
j
.
open
&&
(
f
.
expandCollapseNode
(
e
,
j
,
!
j
.
open
),
delete
B
.
dragNodeShowBefore
[
j
.
tId
]);
D
&&
D
.
remove
();
A
&&
A
.
remove
();
var
p
=
(
b
.
ctrlKey
||
b
.
metaKey
)
&&
e
.
edit
.
drag
.
isMove
&&
e
.
edit
.
drag
.
isCopy
||!
e
.
edit
.
drag
.
isMove
&&
e
.
edit
.
drag
.
isCopy
;
!
p
&&
s
&&
u
&&
l
[
0
].
parentTId
&&
u
==
l
[
0
].
parentTId
&&
w
==
d
.
move
.
TYPE_INNER
&&
(
s
=
null
);
if
(
s
){
var
q
=
u
==
null
?
null
:
m
.
getNodeCache
(
h
,
u
);
if
(
g
.
apply
(
e
.
callback
.
beforeDrop
,[
h
.
treeId
,
l
,
q
,
w
,
p
],
!
0
)
==!
1
)
f
.
selectNodes
(
x
,
l
);
else
{
var
C
=
p
?
g
.
clone
(
l
):
l
;
a
=
function
(){
if
(
K
){
if
(
!
p
)
for
(
var
a
=
0
,
c
=
l
.
length
;
a
<
c
;
a
++
)
f
.
removeNode
(
e
,
l
[
a
]);
w
==
d
.
move
.
TYPE_INNER
?
f
.
addNodes
(
h
,
q
,
-
1
,
C
):
f
.
addNodes
(
h
,
q
.
getParentNode
(),
w
==
d
.
move
.
TYPE_PREV
?
q
.
getIndex
():
q
.
getIndex
()
+
1
,
C
)}
else
if
(
p
&&
w
==
d
.
move
.
TYPE_INNER
)
f
.
addNodes
(
h
,
q
,
-
1
,
C
);
else
if
(
p
)
f
.
addNodes
(
h
,
q
.
getParentNode
(),
w
==
d
.
move
.
TYPE_PREV
?
q
.
getIndex
():
q
.
getIndex
()
+
1
,
C
);
else
if
(
w
!=
d
.
move
.
TYPE_NEXT
)
for
(
a
=
0
,
c
=
C
.
length
;
a
<
c
;
a
++
)
f
.
moveNode
(
h
,
q
,
C
[
a
],
w
,
!
1
);
else
for
(
a
=-
1
,
c
=
C
.
length
-
1
;
a
<
c
;
c
--
)
f
.
moveNode
(
h
,
q
,
C
[
c
],
w
,
!
1
);
f
.
selectNodes
(
h
,
C
);
a
=
o
(
C
[
0
],
e
).
get
(
0
);
f
.
scrollIntoView
(
a
);
e
.
treeObj
.
trigger
(
d
.
event
.
DROP
,[
b
,
h
.
treeId
,
C
,
q
,
w
,
p
])};
f
.
addNodes
(
h
,
q
,
-
1
,
C
):
f
.
addNodes
(
h
,
q
.
getParentNode
(),
w
==
d
.
move
.
TYPE_PREV
?
q
.
getIndex
():
q
.
getIndex
()
+
1
,
C
)}
else
if
(
p
&&
w
==
d
.
move
.
TYPE_INNER
)
f
.
addNodes
(
h
,
q
,
-
1
,
C
);
else
if
(
p
)
f
.
addNodes
(
h
,
q
.
getParentNode
(),
w
==
d
.
move
.
TYPE_PREV
?
q
.
getIndex
():
q
.
getIndex
()
+
1
,
C
);
else
if
(
w
!=
d
.
move
.
TYPE_NEXT
)
for
(
a
=
0
,
c
=
C
.
length
;
a
<
c
;
a
++
)
f
.
moveNode
(
h
,
q
,
C
[
a
],
w
,
!
1
);
else
for
(
a
=-
1
,
c
=
C
.
length
-
1
;
a
<
c
;
c
--
)
f
.
moveNode
(
h
,
q
,
C
[
c
],
w
,
!
1
);
f
.
selectNodes
(
h
,
C
);
a
=
o
(
C
[
0
],
e
).
get
(
0
);
f
.
scrollIntoView
(
e
,
a
);
e
.
treeObj
.
trigger
(
d
.
event
.
DROP
,[
b
,
h
.
treeId
,
C
,
q
,
w
,
p
])};
w
==
d
.
move
.
TYPE_INNER
&&
g
.
canAsync
(
h
,
q
)?
f
.
asyncNode
(
h
,
q
,
!
1
,
a
):
a
()}}
else
f
.
selectNodes
(
x
,
l
),
e
.
treeObj
.
trigger
(
d
.
event
.
DROP
,[
b
,
e
.
treeId
,
l
,
null
,
null
,
null
])}}
function
k
(){
return
!
1
}
var
i
,
j
,
e
=
m
.
getSetting
(
b
.
data
.
treeId
),
B
=
m
.
getRoot
(
e
),
t
=
m
.
getRoots
();
if
(
b
.
button
==
2
||!
e
.
edit
.
enable
||!
e
.
edit
.
drag
.
isCopy
&&!
e
.
edit
.
drag
.
isMove
)
return
!
0
;
var
p
=
b
.
target
,
q
=
m
.
getRoot
(
e
).
curSelectedList
,
l
=
[];
if
(
m
.
isSelectedNode
(
e
,
a
))
for
(
i
=
0
,
j
=
q
.
length
;
i
<
j
;
i
++
){
if
(
q
[
i
].
editNameFlag
&&
g
.
eqs
(
p
.
tagName
,
"
input
"
)
&&
p
.
getAttribute
(
"
treeNode
"
+
d
.
id
.
INPUT
)
!==
null
)
return
!
0
;
l
.
push
(
q
[
i
]);
if
(
l
[
0
].
parentTId
!==
q
[
i
].
parentTId
){
l
=
[
a
];
break
}}
else
l
=
[
a
];
f
.
editNodeBlur
=!
0
;
f
.
cancelCurEditNode
(
e
);
var
G
=
v
(
e
.
treeObj
.
get
(
0
).
ownerDocument
),
M
=
v
(
e
.
treeObj
.
get
(
0
).
ownerDocument
.
body
),
D
,
A
,
s
,
K
=!
1
,
h
=
e
,
x
=
e
,
I
,
R
,
T
=
null
,
U
=
null
,
u
=
null
,
w
=
d
.
move
.
TYPE_INNER
,
O
=
b
.
clientX
,
P
=
b
.
clientY
,
L
=
(
new
Date
).
getTime
();
g
.
uCanDo
(
e
)
&&
G
.
bind
(
"
mousemove
"
,
c
);
G
.
bind
(
"
mouseup
"
,
r
);
G
.
bind
(
"
selectstart
"
,
k
);
b
.
preventDefault
&&
b
.
preventDefault
();
return
!
0
}};
v
.
extend
(
!
0
,
v
.
fn
.
zTree
.
consts
,
J
);
v
.
extend
(
!
0
,
v
.
fn
.
zTree
.
_z
,{
tools
:{
getAbs
:
function
(
b
){
b
=
b
.
getBoundingClientRect
();
return
[
b
.
left
+
(
document
.
body
.
scrollLeft
+
document
.
documentElement
.
scrollLeft
),
b
.
top
+
(
document
.
body
.
scrollTop
+
document
.
documentElement
.
scrollTop
)]},
inputFocus
:
function
(
b
){
b
.
get
(
0
)
&&
(
b
.
focus
(),
g
.
setCursorPosition
(
b
.
get
(
0
),
b
.
val
().
length
))},
inputSelect
:
function
(
b
){
b
.
get
(
0
)
&&
(
b
.
focus
(),
b
.
select
())},
setCursorPosition
:
function
(
b
,
a
){
if
(
b
.
setSelectionRange
)
b
.
focus
(),
b
.
setSelectionRange
(
a
,
a
);
else
if
(
b
.
createTextRange
){
var
c
=
b
.
createTextRange
();
...
...
js/jquery.ztree.exhide.js
浏览文件 @
e9f1dfb3
/*
* JQuery zTree exHideNodes v3.5.
29
* JQuery zTree exHideNodes v3.5.
30
* 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: 2017-
06-19
* Date: 2017-
11-11
*/
(
function
(
$
){
//default init node of exLib
...
...
js/jquery.ztree.exhide.min.js
浏览文件 @
e9f1dfb3
/*
* JQuery zTree exHideNodes v3.5.
29
* JQuery zTree exHideNodes v3.5.
30
* 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: 2017-
06-19
* Date: 2017-
11-11
*/
(
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
(
"
<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
=
...
...
log v3.x.txt
浏览文件 @
e9f1dfb3
...
...
@@ -13,6 +13,10 @@
</font>
*2017.11.11* v3.5.30
* [修改] scrollIntoViewIfNeeded 方法对 IE7 的兼容
*2017.06.23* v3.5.29
* [修改] 拖拽操作后 body.css("cursor", "auto"); 修改为 body.css("cursor", "");(感谢 Jim)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录