Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
GitCode
1024程序员开源挑战赛(10.23-11.14)
提交
2c77ffee
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看板
提交
2c77ffee
编写于
3月 01, 2016
作者:
Z
ztree
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
【修改】增加 <a> 的 padding 后, 导致 setting.edit.drag.inner 无效
上级
26489d00
变更
15
展开全部
隐藏空白更改
内联
并排
Showing
15 changed file
with
181 addition
and
160 deletion
+181
-160
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
+2
-2
js/jquery.ztree.all.js
js/jquery.ztree.all.js
+59
-49
js/jquery.ztree.all.min.js
js/jquery.ztree.all.min.js
+26
-26
js/jquery.ztree.core.js
js/jquery.ztree.core.js
+2
-2
js/jquery.ztree.core.min.js
js/jquery.ztree.core.min.js
+2
-2
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
+55
-45
js/jquery.ztree.exedit.min.js
js/jquery.ztree.exedit.min.js
+22
-22
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
+2
-1
未找到文件。
README.md
浏览文件 @
2c77ffee
jQuery Tree Plugin ---- zTree
jQuery Tree Plugin ---- zTree
============
============
last verson : 3.5.2
1
last verson : 3.5.2
2
**Donate to zTree**
: http://www.ztree.me/v3/donate.php
**Donate to zTree**
: http://www.ztree.me/v3/donate.php
...
...
api/API_cn.html
浏览文件 @
2c77ffee
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
<div
class=
"ieSuggest"
>
浏览本网站建议您使用 Chrome、FireFox、Opera、IE9 等浏览器(只要不是 IE6 7 8 就行), 速度会更快,画面会更炫!
</div>
<div
class=
"ieSuggest"
>
浏览本网站建议您使用 Chrome、FireFox、Opera、IE9 等浏览器(只要不是 IE6 7 8 就行), 速度会更快,画面会更炫!
</div>
<div
class=
"google_plus"
><g:plusone></g:plusone></div>
<div
class=
"google_plus"
><g:plusone></g:plusone></div>
<div
class=
"header-text"
>
<div
class=
"header-text"
>
<h1><em>
zTree v3.5.2
1
API 文档
</em></h1><p></p>
<h1><em>
zTree v3.5.2
2
API 文档
</em></h1><p></p>
<p>
all.js = core + excheck + exedit ( 不包括 exhide ); 发现错误请及时通知,谢谢。
</p>
<p>
all.js = core + excheck + exedit ( 不包括 exhide ); 发现错误请及时通知,谢谢。
</p>
</div>
</div>
<ul
class=
"shortcuts language"
style=
"top:0;"
>
<ul
class=
"shortcuts language"
style=
"top:0;"
>
...
...
api/API_en.html
浏览文件 @
2c77ffee
...
@@ -34,7 +34,7 @@
...
@@ -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=
"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=
"google_plus"
><g:plusone></g:plusone></div>
<div
class=
"header-text"
>
<div
class=
"header-text"
>
<h1><em>
zTree v3.5.2
1
API Document
</em></h1><p></p>
<h1><em>
zTree v3.5.2
2
API Document
</em></h1><p></p>
<p>
all.js = core + excheck + exedit ( without exhide ); if you found some mistakes please contact me.
</p>
<p>
all.js = core + excheck + exedit ( without exhide ); if you found some mistakes please contact me.
</p>
</div>
</div>
<ul
class=
"shortcuts language"
style=
"top:0;"
>
<ul
class=
"shortcuts language"
style=
"top:0;"
>
...
...
api/apiCss/jquery.ztree.core.js
浏览文件 @
2c77ffee
/*
/*
* JQuery zTree core v3.5.2
1
* JQuery zTree core v3.5.2
2
* http://zTree.me/
* http://zTree.me/
*
*
* Copyright (c) 2010 Hunter.z
* Copyright (c) 2010 Hunter.z
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
* http://www.opensource.org/licenses/mit-license.php
* http://www.opensource.org/licenses/mit-license.php
*
*
* email: hunter.z@263.net
* email: hunter.z@263.net
* Date: 2016-0
2-17
* Date: 2016-0
3-01
*/
*/
(
function
(
q
){
var
H
,
I
,
J
,
K
,
L
,
M
,
u
,
r
=
{},
v
=
{},
w
=
{},
N
=
{
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
"
,
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
"
,
(
function
(
q
){
var
H
,
I
,
J
,
K
,
L
,
M
,
u
,
r
=
{},
v
=
{},
w
=
{},
N
=
{
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
"
,
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
"
,
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
}},
x
=
[
function
(
b
){
var
a
=
b
.
treeObj
,
c
=
f
.
event
;
a
.
bind
(
c
.
NODECREATED
,
function
(
a
,
c
,
g
){
j
.
apply
(
b
.
callback
.
onNodeCreated
,
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
}},
x
=
[
function
(
b
){
var
a
=
b
.
treeObj
,
c
=
f
.
event
;
a
.
bind
(
c
.
NODECREATED
,
function
(
a
,
c
,
g
){
j
.
apply
(
b
.
callback
.
onNodeCreated
,
...
...
js/jquery.ztree.all.js
浏览文件 @
2c77ffee
/*
/*
* JQuery zTree core v3.5.2
1
* JQuery zTree core v3.5.2
2
* http://zTree.me/
* http://zTree.me/
*
*
* Copyright (c) 2010 Hunter.z
* Copyright (c) 2010 Hunter.z
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
* http://www.opensource.org/licenses/mit-license.php
* http://www.opensource.org/licenses/mit-license.php
*
*
* email: hunter.z@263.net
* email: hunter.z@263.net
* Date: 2016-0
2-17
* Date: 2016-0
3-01
*/
*/
(
function
(
$
){
(
function
(
$
){
var
settings
=
{},
roots
=
{},
caches
=
{},
var
settings
=
{},
roots
=
{},
caches
=
{},
...
@@ -1814,7 +1814,7 @@
...
@@ -1814,7 +1814,7 @@
consts
=
zt
.
consts
;
consts
=
zt
.
consts
;
})(
jQuery
);
})(
jQuery
);
/*
/*
* JQuery zTree excheck v3.5.2
1
* JQuery zTree excheck v3.5.2
2
* http://zTree.me/
* http://zTree.me/
*
*
* Copyright (c) 2010 Hunter.z
* Copyright (c) 2010 Hunter.z
...
@@ -1823,7 +1823,7 @@
...
@@ -1823,7 +1823,7 @@
* http://www.opensource.org/licenses/mit-license.php
* http://www.opensource.org/licenses/mit-license.php
*
*
* email: hunter.z@263.net
* email: hunter.z@263.net
* Date: 2016-0
2-17
* Date: 2016-0
3-01
*/
*/
(
function
(
$
){
(
function
(
$
){
//default consts of excheck
//default consts of excheck
...
@@ -2442,7 +2442,7 @@
...
@@ -2442,7 +2442,7 @@
}
}
})(
jQuery
);
})(
jQuery
);
/*
/*
* JQuery zTree exedit v3.5.2
1
* JQuery zTree exedit v3.5.2
2
* http://zTree.me/
* http://zTree.me/
*
*
* Copyright (c) 2010 Hunter.z
* Copyright (c) 2010 Hunter.z
...
@@ -2451,7 +2451,7 @@
...
@@ -2451,7 +2451,7 @@
* http://www.opensource.org/licenses/mit-license.php
* http://www.opensource.org/licenses/mit-license.php
*
*
* email: hunter.z@263.net
* email: hunter.z@263.net
* Date: 2016-0
2-17
* Date: 2016-0
3-01
*/
*/
(
function
(
$
){
(
function
(
$
){
//default consts of exedit
//default consts of exedit
...
@@ -2951,14 +2951,15 @@
...
@@ -2951,14 +2951,15 @@
var
dY
=
0
;
var
dY
=
0
;
if
(
tmpTarget
&&
tmpTarget
.
attr
(
"
id
"
)
!=
targetSetting
.
treeId
)
{
if
(
tmpTarget
&&
tmpTarget
.
attr
(
"
id
"
)
!=
targetSetting
.
treeId
)
{
var
tmpTargetNode
=
tmpTargetNodeId
==
null
?
null
:
data
.
getNodeCache
(
targetSetting
,
tmpTargetNodeId
),
var
tmpTargetNode
=
tmpTargetNodeId
==
null
?
null
:
data
.
getNodeCache
(
targetSetting
,
tmpTargetNodeId
),
isCopy
=
((
event
.
ctrlKey
||
event
.
metaKey
)
&&
setting
.
edit
.
drag
.
isMove
&&
setting
.
edit
.
drag
.
isCopy
)
||
(
!
setting
.
edit
.
drag
.
isMove
&&
setting
.
edit
.
drag
.
isCopy
),
isCopy
=
((
event
.
ctrlKey
||
event
.
metaKey
)
&&
setting
.
edit
.
drag
.
isMove
&&
setting
.
edit
.
drag
.
isCopy
)
||
(
!
setting
.
edit
.
drag
.
isMove
&&
setting
.
edit
.
drag
.
isCopy
),
isPrev
=
!!
(
preNode
&&
tmpTargetNodeId
===
preNode
.
tId
),
isPrev
=
!!
(
preNode
&&
tmpTargetNodeId
===
preNode
.
tId
),
isNext
=
!!
(
nextNode
&&
tmpTargetNodeId
===
nextNode
.
tId
),
isNext
=
!!
(
nextNode
&&
tmpTargetNodeId
===
nextNode
.
tId
),
isInner
=
(
tmpNode
.
parentTId
&&
tmpNode
.
parentTId
==
tmpTargetNodeId
),
isInner
=
(
tmpNode
.
parentTId
&&
tmpNode
.
parentTId
==
tmpTargetNodeId
),
canPrev
=
(
isCopy
||
!
isNext
)
&&
tools
.
apply
(
targetSetting
.
edit
.
drag
.
prev
,
[
targetSetting
.
treeId
,
nodes
,
tmpTargetNode
],
!!
targetSetting
.
edit
.
drag
.
prev
),
canPrev
=
(
isCopy
||
!
isNext
)
&&
tools
.
apply
(
targetSetting
.
edit
.
drag
.
prev
,
[
targetSetting
.
treeId
,
nodes
,
tmpTargetNode
],
!!
targetSetting
.
edit
.
drag
.
prev
),
canNext
=
(
isCopy
||
!
isPrev
)
&&
tools
.
apply
(
targetSetting
.
edit
.
drag
.
next
,
[
targetSetting
.
treeId
,
nodes
,
tmpTargetNode
],
!!
targetSetting
.
edit
.
drag
.
next
),
canNext
=
(
isCopy
||
!
isPrev
)
&&
tools
.
apply
(
targetSetting
.
edit
.
drag
.
next
,
[
targetSetting
.
treeId
,
nodes
,
tmpTargetNode
],
!!
targetSetting
.
edit
.
drag
.
next
),
canInner
=
(
isCopy
||
!
isInner
)
&&
!
(
targetSetting
.
data
.
keep
.
leaf
&&
!
tmpTargetNode
.
isParent
)
&&
tools
.
apply
(
targetSetting
.
edit
.
drag
.
inner
,
[
targetSetting
.
treeId
,
nodes
,
tmpTargetNode
],
!!
targetSetting
.
edit
.
drag
.
inner
);
canInner
=
(
isCopy
||
!
isInner
)
&&
!
(
targetSetting
.
data
.
keep
.
leaf
&&
!
tmpTargetNode
.
isParent
)
&&
tools
.
apply
(
targetSetting
.
edit
.
drag
.
inner
,
[
targetSetting
.
treeId
,
nodes
,
tmpTargetNode
],
!!
targetSetting
.
edit
.
drag
.
inner
);
if
(
!
canPrev
&&
!
canNext
&&
!
canInner
)
{
function
clearMove
()
{
tmpTarget
=
null
;
tmpTarget
=
null
;
tmpTargetNodeId
=
""
;
tmpTargetNodeId
=
""
;
moveType
=
consts
.
move
.
TYPE_INNER
;
moveType
=
consts
.
move
.
TYPE_INNER
;
...
@@ -2969,15 +2970,19 @@
...
@@ -2969,15 +2970,19 @@
clearTimeout
(
window
.
zTreeMoveTimer
);
clearTimeout
(
window
.
zTreeMoveTimer
);
window
.
zTreeMoveTargetNodeTId
=
null
window
.
zTreeMoveTargetNodeTId
=
null
}
}
}
if
(
!
canPrev
&&
!
canNext
&&
!
canInner
)
{
clearMove
();
}
else
{
}
else
{
var
tmpTargetA
=
$
(
"
#
"
+
tmpTargetNodeId
+
consts
.
id
.
A
,
tmpTarget
),
var
tmpTargetA
=
$
(
"
#
"
+
tmpTargetNodeId
+
consts
.
id
.
A
,
tmpTarget
),
tmpNextA
=
tmpTargetNode
.
isLastNode
?
null
:
$
(
"
#
"
+
tmpTargetNode
.
getNextNode
().
tId
+
consts
.
id
.
A
,
tmpTarget
.
next
()),
tmpNextA
=
tmpTargetNode
.
isLastNode
?
null
:
$
(
"
#
"
+
tmpTargetNode
.
getNextNode
().
tId
+
consts
.
id
.
A
,
tmpTarget
.
next
()),
tmpTop
=
tmpTargetA
.
offset
().
top
,
tmpTop
=
tmpTargetA
.
offset
().
top
,
tmpLeft
=
tmpTargetA
.
offset
().
left
,
tmpLeft
=
tmpTargetA
.
offset
().
left
,
prevPercent
=
canPrev
?
(
canInner
?
0.25
:
(
canNext
?
0.5
:
1
)
)
:
-
1
,
prevPercent
=
canPrev
?
(
canInner
?
0.25
:
(
canNext
?
0.5
:
1
)
)
:
-
1
,
nextPercent
=
canNext
?
(
canInner
?
0.75
:
(
canPrev
?
0.5
:
0
)
)
:
-
1
,
nextPercent
=
canNext
?
(
canInner
?
0.75
:
(
canPrev
?
0.5
:
0
)
)
:
-
1
,
dY_percent
=
(
event
.
clientY
+
docScrollTop
-
tmpTop
)
/
tmpTargetA
.
height
();
dY_percent
=
(
event
.
clientY
+
docScrollTop
-
tmpTop
)
/
tmpTargetA
.
height
();
if
((
prevPercent
==
1
||
dY_percent
<=
prevPercent
&&
dY_percent
>=-
.
2
)
&&
canPrev
)
{
if
((
prevPercent
==
1
||
dY_percent
<=
prevPercent
&&
dY_percent
>=-
.
2
)
&&
canPrev
)
{
dX
=
1
-
tmpArrow
.
width
();
dX
=
1
-
tmpArrow
.
width
();
dY
=
tmpTop
-
tmpArrow
.
height
()
/
2
;
dY
=
tmpTop
-
tmpArrow
.
height
()
/
2
;
moveType
=
consts
.
move
.
TYPE_PREV
;
moveType
=
consts
.
move
.
TYPE_PREV
;
...
@@ -2985,41 +2990,46 @@
...
@@ -2985,41 +2990,46 @@
dX
=
1
-
tmpArrow
.
width
();
dX
=
1
-
tmpArrow
.
width
();
dY
=
(
tmpNextA
==
null
||
(
tmpTargetNode
.
isParent
&&
tmpTargetNode
.
open
))
?
(
tmpTop
+
tmpTargetA
.
height
()
-
tmpArrow
.
height
()
/
2
)
:
(
tmpNextA
.
offset
().
top
-
tmpArrow
.
height
()
/
2
);
dY
=
(
tmpNextA
==
null
||
(
tmpTargetNode
.
isParent
&&
tmpTargetNode
.
open
))
?
(
tmpTop
+
tmpTargetA
.
height
()
-
tmpArrow
.
height
()
/
2
)
:
(
tmpNextA
.
offset
().
top
-
tmpArrow
.
height
()
/
2
);
moveType
=
consts
.
move
.
TYPE_NEXT
;
moveType
=
consts
.
move
.
TYPE_NEXT
;
}
else
{
}
else
if
(
canInner
)
{
dX
=
5
-
tmpArrow
.
width
();
dX
=
5
-
tmpArrow
.
width
();
dY
=
tmpTop
;
dY
=
tmpTop
;
moveType
=
consts
.
move
.
TYPE_INNER
;
moveType
=
consts
.
move
.
TYPE_INNER
;
}
else
{
clearMove
();
}
}
tmpArrow
.
css
({
"
display
"
:
"
block
"
,
"
top
"
:
dY
+
"
px
"
,
"
left
"
:
(
tmpLeft
+
dX
)
+
"
px
"
});
tmpTargetA
.
addClass
(
consts
.
node
.
TMPTARGET_NODE
+
"
_
"
+
moveType
);
if
(
preTmpTargetNodeId
!=
tmpTargetNodeId
||
preTmpMoveType
!=
moveType
)
{
if
(
tmpTarget
)
{
startTime
=
(
new
Date
()).
getTime
();
tmpArrow
.
css
({
}
"
display
"
:
"
block
"
,
if
(
tmpTargetNode
&&
tmpTargetNode
.
isParent
&&
moveType
==
consts
.
move
.
TYPE_INNER
)
{
"
top
"
:
dY
+
"
px
"
,
var
startTimer
=
true
;
"
left
"
:
(
tmpLeft
+
dX
)
+
"
px
"
if
(
window
.
zTreeMoveTimer
&&
window
.
zTreeMoveTargetNodeTId
!==
tmpTargetNode
.
tId
)
{
});
clearTimeout
(
window
.
zTreeMoveTimer
);
tmpTargetA
.
addClass
(
consts
.
node
.
TMPTARGET_NODE
+
"
_
"
+
moveType
);
window
.
zTreeMoveTargetNodeTId
=
null
;
}
else
if
(
window
.
zTreeMoveTimer
&&
window
.
zTreeMoveTargetNodeTId
===
tmpTargetNode
.
tId
)
{
if
(
preTmpTargetNodeId
!=
tmpTargetNodeId
||
preTmpMoveType
!=
moveType
)
{
startTime
r
=
false
;
startTime
=
(
new
Date
()).
getTime
()
;
}
}
if
(
startTimer
)
{
if
(
tmpTargetNode
&&
tmpTargetNode
.
isParent
&&
moveType
==
consts
.
move
.
TYPE_INNER
)
{
window
.
zTreeMoveTimer
=
setTimeout
(
function
()
{
var
startTimer
=
true
;
if
(
moveType
!=
consts
.
move
.
TYPE_INNER
)
return
;
if
(
window
.
zTreeMoveTimer
&&
window
.
zTreeMoveTargetNodeTId
!==
tmpTargetNode
.
tId
)
{
if
(
tmpTargetNode
&&
tmpTargetNode
.
isParent
&&
!
tmpTargetNode
.
open
&&
(
new
Date
()).
getTime
()
-
startTime
>
targetSetting
.
edit
.
drag
.
autoOpenTime
clearTimeout
(
window
.
zTreeMoveTimer
);
&&
tools
.
apply
(
targetSetting
.
callback
.
beforeDragOpen
,
[
targetSetting
.
treeId
,
tmpTargetNode
],
true
))
{
window
.
zTreeMoveTargetNodeTId
=
null
;
view
.
switchNode
(
targetSetting
,
tmpTargetNode
);
}
else
if
(
window
.
zTreeMoveTimer
&&
window
.
zTreeMoveTargetNodeTId
===
tmpTargetNode
.
tId
)
{
if
(
targetSetting
.
edit
.
drag
.
autoExpandTrigger
)
{
startTimer
=
false
;
targetSetting
.
treeObj
.
trigger
(
consts
.
event
.
EXPAND
,
[
targetSetting
.
treeId
,
tmpTargetNode
]);
}
if
(
startTimer
)
{
window
.
zTreeMoveTimer
=
setTimeout
(
function
()
{
if
(
moveType
!=
consts
.
move
.
TYPE_INNER
)
return
;
if
(
tmpTargetNode
&&
tmpTargetNode
.
isParent
&&
!
tmpTargetNode
.
open
&&
(
new
Date
()).
getTime
()
-
startTime
>
targetSetting
.
edit
.
drag
.
autoOpenTime
&&
tools
.
apply
(
targetSetting
.
callback
.
beforeDragOpen
,
[
targetSetting
.
treeId
,
tmpTargetNode
],
true
))
{
view
.
switchNode
(
targetSetting
,
tmpTargetNode
);
if
(
targetSetting
.
edit
.
drag
.
autoExpandTrigger
)
{
targetSetting
.
treeObj
.
trigger
(
consts
.
event
.
EXPAND
,
[
targetSetting
.
treeId
,
tmpTargetNode
]);
}
}
}
}
}
,
targetSetting
.
edit
.
drag
.
autoOpenTime
+
50
);
},
targetSetting
.
edit
.
drag
.
autoOpenTime
+
50
)
;
window
.
zTreeMoveTargetNodeTId
=
tmpTargetNode
.
tId
;
window
.
zTreeMoveTargetNodeTId
=
tmpTargetNode
.
tId
;
}
}
}
}
}
}
}
...
...
js/jquery.ztree.all.min.js
浏览文件 @
2c77ffee
此差异已折叠。
点击以展开。
js/jquery.ztree.core.js
浏览文件 @
2c77ffee
/*
/*
* JQuery zTree core v3.5.2
1
* JQuery zTree core v3.5.2
2
* http://zTree.me/
* http://zTree.me/
*
*
* Copyright (c) 2010 Hunter.z
* Copyright (c) 2010 Hunter.z
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
* http://www.opensource.org/licenses/mit-license.php
* http://www.opensource.org/licenses/mit-license.php
*
*
* email: hunter.z@263.net
* email: hunter.z@263.net
* Date: 2016-0
2-17
* Date: 2016-0
3-01
*/
*/
(
function
(
$
){
(
function
(
$
){
var
settings
=
{},
roots
=
{},
caches
=
{},
var
settings
=
{},
roots
=
{},
caches
=
{},
...
...
js/jquery.ztree.core.min.js
浏览文件 @
2c77ffee
/*
/*
* JQuery zTree core v3.5.2
1
* JQuery zTree core v3.5.2
2
* http://zTree.me/
* http://zTree.me/
*
*
* Copyright (c) 2010 Hunter.z
* Copyright (c) 2010 Hunter.z
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
* http://www.opensource.org/licenses/mit-license.php
* http://www.opensource.org/licenses/mit-license.php
*
*
* email: hunter.z@263.net
* email: hunter.z@263.net
* Date: 2016-0
2-17
* Date: 2016-0
3-01
*/
*/
(
function
(
q
){
var
H
,
I
,
J
,
K
,
L
,
M
,
u
,
r
=
{},
v
=
{},
w
=
{},
N
=
{
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
"
,
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
"
,
(
function
(
q
){
var
H
,
I
,
J
,
K
,
L
,
M
,
u
,
r
=
{},
v
=
{},
w
=
{},
N
=
{
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
"
,
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
"
,
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
}},
x
=
[
function
(
b
){
var
a
=
b
.
treeObj
,
c
=
f
.
event
;
a
.
bind
(
c
.
NODECREATED
,
function
(
a
,
c
,
g
){
j
.
apply
(
b
.
callback
.
onNodeCreated
,
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
}},
x
=
[
function
(
b
){
var
a
=
b
.
treeObj
,
c
=
f
.
event
;
a
.
bind
(
c
.
NODECREATED
,
function
(
a
,
c
,
g
){
j
.
apply
(
b
.
callback
.
onNodeCreated
,
...
...
js/jquery.ztree.excheck.js
浏览文件 @
2c77ffee
/*
/*
* JQuery zTree excheck v3.5.2
1
* JQuery zTree excheck v3.5.2
2
* http://zTree.me/
* http://zTree.me/
*
*
* Copyright (c) 2010 Hunter.z
* Copyright (c) 2010 Hunter.z
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
* http://www.opensource.org/licenses/mit-license.php
* http://www.opensource.org/licenses/mit-license.php
*
*
* email: hunter.z@263.net
* email: hunter.z@263.net
* Date: 2016-0
2-17
* Date: 2016-0
3-01
*/
*/
(
function
(
$
){
(
function
(
$
){
//default consts of excheck
//default consts of excheck
...
...
js/jquery.ztree.excheck.min.js
浏览文件 @
2c77ffee
/*
/*
* JQuery zTree excheck v3.5.2
1
* JQuery zTree excheck v3.5.2
2
* http://zTree.me/
* http://zTree.me/
*
*
* Copyright (c) 2010 Hunter.z
* Copyright (c) 2010 Hunter.z
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
* http://www.opensource.org/licenses/mit-license.php
* http://www.opensource.org/licenses/mit-license.php
*
*
* email: hunter.z@263.net
* email: hunter.z@263.net
* Date: 2016-0
2-17
* Date: 2016-0
3-01
*/
*/
(
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
,
(
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
===
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
浏览文件 @
2c77ffee
/*
/*
* JQuery zTree exedit v3.5.2
1
* JQuery zTree exedit v3.5.2
2
* http://zTree.me/
* http://zTree.me/
*
*
* Copyright (c) 2010 Hunter.z
* Copyright (c) 2010 Hunter.z
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
* http://www.opensource.org/licenses/mit-license.php
* http://www.opensource.org/licenses/mit-license.php
*
*
* email: hunter.z@263.net
* email: hunter.z@263.net
* Date: 2016-0
2-17
* Date: 2016-0
3-01
*/
*/
(
function
(
$
){
(
function
(
$
){
//default consts of exedit
//default consts of exedit
...
@@ -508,14 +508,15 @@
...
@@ -508,14 +508,15 @@
var
dY
=
0
;
var
dY
=
0
;
if
(
tmpTarget
&&
tmpTarget
.
attr
(
"
id
"
)
!=
targetSetting
.
treeId
)
{
if
(
tmpTarget
&&
tmpTarget
.
attr
(
"
id
"
)
!=
targetSetting
.
treeId
)
{
var
tmpTargetNode
=
tmpTargetNodeId
==
null
?
null
:
data
.
getNodeCache
(
targetSetting
,
tmpTargetNodeId
),
var
tmpTargetNode
=
tmpTargetNodeId
==
null
?
null
:
data
.
getNodeCache
(
targetSetting
,
tmpTargetNodeId
),
isCopy
=
((
event
.
ctrlKey
||
event
.
metaKey
)
&&
setting
.
edit
.
drag
.
isMove
&&
setting
.
edit
.
drag
.
isCopy
)
||
(
!
setting
.
edit
.
drag
.
isMove
&&
setting
.
edit
.
drag
.
isCopy
),
isCopy
=
((
event
.
ctrlKey
||
event
.
metaKey
)
&&
setting
.
edit
.
drag
.
isMove
&&
setting
.
edit
.
drag
.
isCopy
)
||
(
!
setting
.
edit
.
drag
.
isMove
&&
setting
.
edit
.
drag
.
isCopy
),
isPrev
=
!!
(
preNode
&&
tmpTargetNodeId
===
preNode
.
tId
),
isPrev
=
!!
(
preNode
&&
tmpTargetNodeId
===
preNode
.
tId
),
isNext
=
!!
(
nextNode
&&
tmpTargetNodeId
===
nextNode
.
tId
),
isNext
=
!!
(
nextNode
&&
tmpTargetNodeId
===
nextNode
.
tId
),
isInner
=
(
tmpNode
.
parentTId
&&
tmpNode
.
parentTId
==
tmpTargetNodeId
),
isInner
=
(
tmpNode
.
parentTId
&&
tmpNode
.
parentTId
==
tmpTargetNodeId
),
canPrev
=
(
isCopy
||
!
isNext
)
&&
tools
.
apply
(
targetSetting
.
edit
.
drag
.
prev
,
[
targetSetting
.
treeId
,
nodes
,
tmpTargetNode
],
!!
targetSetting
.
edit
.
drag
.
prev
),
canPrev
=
(
isCopy
||
!
isNext
)
&&
tools
.
apply
(
targetSetting
.
edit
.
drag
.
prev
,
[
targetSetting
.
treeId
,
nodes
,
tmpTargetNode
],
!!
targetSetting
.
edit
.
drag
.
prev
),
canNext
=
(
isCopy
||
!
isPrev
)
&&
tools
.
apply
(
targetSetting
.
edit
.
drag
.
next
,
[
targetSetting
.
treeId
,
nodes
,
tmpTargetNode
],
!!
targetSetting
.
edit
.
drag
.
next
),
canNext
=
(
isCopy
||
!
isPrev
)
&&
tools
.
apply
(
targetSetting
.
edit
.
drag
.
next
,
[
targetSetting
.
treeId
,
nodes
,
tmpTargetNode
],
!!
targetSetting
.
edit
.
drag
.
next
),
canInner
=
(
isCopy
||
!
isInner
)
&&
!
(
targetSetting
.
data
.
keep
.
leaf
&&
!
tmpTargetNode
.
isParent
)
&&
tools
.
apply
(
targetSetting
.
edit
.
drag
.
inner
,
[
targetSetting
.
treeId
,
nodes
,
tmpTargetNode
],
!!
targetSetting
.
edit
.
drag
.
inner
);
canInner
=
(
isCopy
||
!
isInner
)
&&
!
(
targetSetting
.
data
.
keep
.
leaf
&&
!
tmpTargetNode
.
isParent
)
&&
tools
.
apply
(
targetSetting
.
edit
.
drag
.
inner
,
[
targetSetting
.
treeId
,
nodes
,
tmpTargetNode
],
!!
targetSetting
.
edit
.
drag
.
inner
);
if
(
!
canPrev
&&
!
canNext
&&
!
canInner
)
{
function
clearMove
()
{
tmpTarget
=
null
;
tmpTarget
=
null
;
tmpTargetNodeId
=
""
;
tmpTargetNodeId
=
""
;
moveType
=
consts
.
move
.
TYPE_INNER
;
moveType
=
consts
.
move
.
TYPE_INNER
;
...
@@ -526,15 +527,19 @@
...
@@ -526,15 +527,19 @@
clearTimeout
(
window
.
zTreeMoveTimer
);
clearTimeout
(
window
.
zTreeMoveTimer
);
window
.
zTreeMoveTargetNodeTId
=
null
window
.
zTreeMoveTargetNodeTId
=
null
}
}
}
if
(
!
canPrev
&&
!
canNext
&&
!
canInner
)
{
clearMove
();
}
else
{
}
else
{
var
tmpTargetA
=
$
(
"
#
"
+
tmpTargetNodeId
+
consts
.
id
.
A
,
tmpTarget
),
var
tmpTargetA
=
$
(
"
#
"
+
tmpTargetNodeId
+
consts
.
id
.
A
,
tmpTarget
),
tmpNextA
=
tmpTargetNode
.
isLastNode
?
null
:
$
(
"
#
"
+
tmpTargetNode
.
getNextNode
().
tId
+
consts
.
id
.
A
,
tmpTarget
.
next
()),
tmpNextA
=
tmpTargetNode
.
isLastNode
?
null
:
$
(
"
#
"
+
tmpTargetNode
.
getNextNode
().
tId
+
consts
.
id
.
A
,
tmpTarget
.
next
()),
tmpTop
=
tmpTargetA
.
offset
().
top
,
tmpTop
=
tmpTargetA
.
offset
().
top
,
tmpLeft
=
tmpTargetA
.
offset
().
left
,
tmpLeft
=
tmpTargetA
.
offset
().
left
,
prevPercent
=
canPrev
?
(
canInner
?
0.25
:
(
canNext
?
0.5
:
1
)
)
:
-
1
,
prevPercent
=
canPrev
?
(
canInner
?
0.25
:
(
canNext
?
0.5
:
1
)
)
:
-
1
,
nextPercent
=
canNext
?
(
canInner
?
0.75
:
(
canPrev
?
0.5
:
0
)
)
:
-
1
,
nextPercent
=
canNext
?
(
canInner
?
0.75
:
(
canPrev
?
0.5
:
0
)
)
:
-
1
,
dY_percent
=
(
event
.
clientY
+
docScrollTop
-
tmpTop
)
/
tmpTargetA
.
height
();
dY_percent
=
(
event
.
clientY
+
docScrollTop
-
tmpTop
)
/
tmpTargetA
.
height
();
if
((
prevPercent
==
1
||
dY_percent
<=
prevPercent
&&
dY_percent
>=-
.
2
)
&&
canPrev
)
{
if
((
prevPercent
==
1
||
dY_percent
<=
prevPercent
&&
dY_percent
>=-
.
2
)
&&
canPrev
)
{
dX
=
1
-
tmpArrow
.
width
();
dX
=
1
-
tmpArrow
.
width
();
dY
=
tmpTop
-
tmpArrow
.
height
()
/
2
;
dY
=
tmpTop
-
tmpArrow
.
height
()
/
2
;
moveType
=
consts
.
move
.
TYPE_PREV
;
moveType
=
consts
.
move
.
TYPE_PREV
;
...
@@ -542,41 +547,46 @@
...
@@ -542,41 +547,46 @@
dX
=
1
-
tmpArrow
.
width
();
dX
=
1
-
tmpArrow
.
width
();
dY
=
(
tmpNextA
==
null
||
(
tmpTargetNode
.
isParent
&&
tmpTargetNode
.
open
))
?
(
tmpTop
+
tmpTargetA
.
height
()
-
tmpArrow
.
height
()
/
2
)
:
(
tmpNextA
.
offset
().
top
-
tmpArrow
.
height
()
/
2
);
dY
=
(
tmpNextA
==
null
||
(
tmpTargetNode
.
isParent
&&
tmpTargetNode
.
open
))
?
(
tmpTop
+
tmpTargetA
.
height
()
-
tmpArrow
.
height
()
/
2
)
:
(
tmpNextA
.
offset
().
top
-
tmpArrow
.
height
()
/
2
);
moveType
=
consts
.
move
.
TYPE_NEXT
;
moveType
=
consts
.
move
.
TYPE_NEXT
;
}
else
{
}
else
if
(
canInner
)
{
dX
=
5
-
tmpArrow
.
width
();
dX
=
5
-
tmpArrow
.
width
();
dY
=
tmpTop
;
dY
=
tmpTop
;
moveType
=
consts
.
move
.
TYPE_INNER
;
moveType
=
consts
.
move
.
TYPE_INNER
;
}
else
{
clearMove
();
}
}
tmpArrow
.
css
({
"
display
"
:
"
block
"
,
"
top
"
:
dY
+
"
px
"
,
"
left
"
:
(
tmpLeft
+
dX
)
+
"
px
"
});
tmpTargetA
.
addClass
(
consts
.
node
.
TMPTARGET_NODE
+
"
_
"
+
moveType
);
if
(
preTmpTargetNodeId
!=
tmpTargetNodeId
||
preTmpMoveType
!=
moveType
)
{
if
(
tmpTarget
)
{
startTime
=
(
new
Date
()).
getTime
();
tmpArrow
.
css
({
}
"
display
"
:
"
block
"
,
if
(
tmpTargetNode
&&
tmpTargetNode
.
isParent
&&
moveType
==
consts
.
move
.
TYPE_INNER
)
{
"
top
"
:
dY
+
"
px
"
,
var
startTimer
=
true
;
"
left
"
:
(
tmpLeft
+
dX
)
+
"
px
"
if
(
window
.
zTreeMoveTimer
&&
window
.
zTreeMoveTargetNodeTId
!==
tmpTargetNode
.
tId
)
{
});
clearTimeout
(
window
.
zTreeMoveTimer
);
tmpTargetA
.
addClass
(
consts
.
node
.
TMPTARGET_NODE
+
"
_
"
+
moveType
);
window
.
zTreeMoveTargetNodeTId
=
null
;
}
else
if
(
window
.
zTreeMoveTimer
&&
window
.
zTreeMoveTargetNodeTId
===
tmpTargetNode
.
tId
)
{
if
(
preTmpTargetNodeId
!=
tmpTargetNodeId
||
preTmpMoveType
!=
moveType
)
{
startTime
r
=
false
;
startTime
=
(
new
Date
()).
getTime
()
;
}
}
if
(
startTimer
)
{
if
(
tmpTargetNode
&&
tmpTargetNode
.
isParent
&&
moveType
==
consts
.
move
.
TYPE_INNER
)
{
window
.
zTreeMoveTimer
=
setTimeout
(
function
()
{
var
startTimer
=
true
;
if
(
moveType
!=
consts
.
move
.
TYPE_INNER
)
return
;
if
(
window
.
zTreeMoveTimer
&&
window
.
zTreeMoveTargetNodeTId
!==
tmpTargetNode
.
tId
)
{
if
(
tmpTargetNode
&&
tmpTargetNode
.
isParent
&&
!
tmpTargetNode
.
open
&&
(
new
Date
()).
getTime
()
-
startTime
>
targetSetting
.
edit
.
drag
.
autoOpenTime
clearTimeout
(
window
.
zTreeMoveTimer
);
&&
tools
.
apply
(
targetSetting
.
callback
.
beforeDragOpen
,
[
targetSetting
.
treeId
,
tmpTargetNode
],
true
))
{
window
.
zTreeMoveTargetNodeTId
=
null
;
view
.
switchNode
(
targetSetting
,
tmpTargetNode
);
}
else
if
(
window
.
zTreeMoveTimer
&&
window
.
zTreeMoveTargetNodeTId
===
tmpTargetNode
.
tId
)
{
if
(
targetSetting
.
edit
.
drag
.
autoExpandTrigger
)
{
startTimer
=
false
;
targetSetting
.
treeObj
.
trigger
(
consts
.
event
.
EXPAND
,
[
targetSetting
.
treeId
,
tmpTargetNode
]);
}
if
(
startTimer
)
{
window
.
zTreeMoveTimer
=
setTimeout
(
function
()
{
if
(
moveType
!=
consts
.
move
.
TYPE_INNER
)
return
;
if
(
tmpTargetNode
&&
tmpTargetNode
.
isParent
&&
!
tmpTargetNode
.
open
&&
(
new
Date
()).
getTime
()
-
startTime
>
targetSetting
.
edit
.
drag
.
autoOpenTime
&&
tools
.
apply
(
targetSetting
.
callback
.
beforeDragOpen
,
[
targetSetting
.
treeId
,
tmpTargetNode
],
true
))
{
view
.
switchNode
(
targetSetting
,
tmpTargetNode
);
if
(
targetSetting
.
edit
.
drag
.
autoExpandTrigger
)
{
targetSetting
.
treeObj
.
trigger
(
consts
.
event
.
EXPAND
,
[
targetSetting
.
treeId
,
tmpTargetNode
]);
}
}
}
}
}
,
targetSetting
.
edit
.
drag
.
autoOpenTime
+
50
);
},
targetSetting
.
edit
.
drag
.
autoOpenTime
+
50
)
;
window
.
zTreeMoveTargetNodeTId
=
tmpTargetNode
.
tId
;
window
.
zTreeMoveTargetNodeTId
=
tmpTargetNode
.
tId
;
}
}
}
}
}
}
}
...
...
js/jquery.ztree.exedit.min.js
浏览文件 @
2c77ffee
此差异已折叠。
点击以展开。
js/jquery.ztree.exhide.js
浏览文件 @
2c77ffee
/*
/*
* JQuery zTree exHideNodes v3.5.2
1
* JQuery zTree exHideNodes v3.5.2
2
* http://zTree.me/
* http://zTree.me/
*
*
* Copyright (c) 2010 Hunter.z
* Copyright (c) 2010 Hunter.z
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
* http://www.opensource.org/licenses/mit-license.php
* http://www.opensource.org/licenses/mit-license.php
*
*
* email: hunter.z@263.net
* email: hunter.z@263.net
* Date: 2016-0
2-17
* Date: 2016-0
3-01
*/
*/
(
function
(
$
){
(
function
(
$
){
//default init node of exLib
//default init node of exLib
...
...
js/jquery.ztree.exhide.min.js
浏览文件 @
2c77ffee
/*
/*
* JQuery zTree exHideNodes v3.5.2
1
* JQuery zTree exHideNodes v3.5.2
2
* http://zTree.me/
* http://zTree.me/
*
*
* Copyright (c) 2010 Hunter.z
* Copyright (c) 2010 Hunter.z
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
* http://www.opensource.org/licenses/mit-license.php
* http://www.opensource.org/licenses/mit-license.php
*
*
* email: hunter.z@263.net
* email: hunter.z@263.net
* Date: 2016-0
2-17
* Date: 2016-0
3-01
*/
*/
(
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
,
(
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
=
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
浏览文件 @
2c77ffee
...
@@ -14,8 +14,9 @@
...
@@ -14,8 +14,9 @@
</font>
</font>
*2016.03.01* v3.5.2
1
*2016.03.01* v3.5.2
2
* 【修改】metro Demo 的样式错误
* 【修改】metro Demo 的样式错误
* 【修改】增加 <a> 的 padding 后, 导致 setting.edit.drag.inner 无效
*2016.02.17* v3.5.21
*2016.02.17* v3.5.21
* 【修改】zTree js 文件名 (为了便于发布到 https://cdnjs.com/)
* 【修改】zTree js 文件名 (为了便于发布到 https://cdnjs.com/)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录