Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
GitCode
1024程序员开源挑战赛(10.23-11.14)
提交
0626d78f
1
1024程序员开源挑战赛(10.23-11.14)
项目概览
GitCode
/
1024程序员开源挑战赛(10.23-11.14)
通知
180871
Star
1064
Fork
1041
代码
文件
提交
分支
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看板
提交
0626d78f
编写于
1月 05, 2014
作者:
Z
ztree
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fixed issue: chkStyle="radio" and radioType="all", updateNode will change the checked.
上级
e140c94a
变更
13
展开全部
隐藏空白更改
内联
并排
Showing
13 changed file
with
144 addition
and
136 deletion
+144
-136
README.md
README.md
+1
-1
api/apiCss/jquery.ztree.core-3.5.js
api/apiCss/jquery.ztree.core-3.5.js
+2
-2
js/jquery.ztree.all-3.5.js
js/jquery.ztree.all-3.5.js
+18
-14
js/jquery.ztree.all-3.5.min.js
js/jquery.ztree.all-3.5.min.js
+50
-50
js/jquery.ztree.core-3.5.js
js/jquery.ztree.core-3.5.js
+2
-2
js/jquery.ztree.core-3.5.min.js
js/jquery.ztree.core-3.5.min.js
+2
-2
js/jquery.ztree.excheck-3.5.js
js/jquery.ztree.excheck-3.5.js
+9
-7
js/jquery.ztree.excheck-3.5.min.js
js/jquery.ztree.excheck-3.5.min.js
+8
-8
js/jquery.ztree.exedit-3.5.js
js/jquery.ztree.exedit-3.5.js
+7
-5
js/jquery.ztree.exedit-3.5.min.js
js/jquery.ztree.exedit-3.5.min.js
+40
-40
js/jquery.ztree.exhide-3.5.js
js/jquery.ztree.exhide-3.5.js
+2
-2
js/jquery.ztree.exhide-3.5.min.js
js/jquery.ztree.exhide-3.5.min.js
+2
-2
log v3.x.txt
log v3.x.txt
+1
-1
未找到文件。
README.md
浏览文件 @
0626d78f
jQuery Tree Plugin ---- zTree
============
last verson : 3.5.16-beta.
5
last verson : 3.5.16-beta.
7
**Donate to zTree**
: http://www.ztree.me/v3/donate.php
...
...
api/apiCss/jquery.ztree.core-3.5.js
浏览文件 @
0626d78f
/*
* JQuery zTree core v3.5.16-beta.
5
* JQuery zTree core v3.5.16-beta.
7
* http://zTree.me/
*
* Copyright (c) 2010 Hunter.z
...
...
@@ -8,7 +8,7 @@
* http://www.opensource.org/licenses/mit-license.php
*
* email: hunter.z@263.net
* Date: 201
3-12-29
* Date: 201
4-01-05
*/
(
function
(
p
){
var
G
,
H
,
I
,
J
,
K
,
L
,
r
=
{},
u
=
{},
v
=
{},
M
=
{
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
"
},
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
}},
w
=
[
function
(
b
){
var
a
=
b
.
treeObj
,
c
=
e
.
event
;
a
.
bind
(
c
.
NODECREATED
,
function
(
a
,
c
,
g
){
j
.
apply
(
b
.
callback
.
onNodeCreated
,
...
...
js/jquery.ztree.all-3.5.js
浏览文件 @
0626d78f
/*
* JQuery zTree core v3.5.16-beta.
5
* JQuery zTree core v3.5.16-beta.
7
* http://zTree.me/
*
* Copyright (c) 2010 Hunter.z
...
...
@@ -9,7 +9,7 @@
* http://www.opensource.org/licenses/mit-license.php
*
* email: hunter.z@263.net
* Date: 201
3-12-29
* Date: 201
4-01-05
*/
(
function
(
$
){
var
settings
=
{},
roots
=
{},
caches
=
{},
...
...
@@ -1678,7 +1678,7 @@
consts
=
zt
.
consts
;
})(
jQuery
);
/*
* JQuery zTree excheck v3.5.16-beta.
5
* JQuery zTree excheck v3.5.16-beta.
7
* http://zTree.me/
*
* Copyright (c) 2010 Hunter.z
...
...
@@ -1687,7 +1687,7 @@
* http://www.opensource.org/licenses/mit-license.php
*
* email: hunter.z@263.net
* Date: 201
3-12-29
* Date: 201
4-01-05
*/
(
function
(
$
){
//default consts of excheck
...
...
@@ -2056,12 +2056,14 @@
if
(
setting
.
check
.
radioType
==
r
.
TYPE_ALL
)
{
for
(
i
=
checkedList
.
length
-
1
;
i
>=
0
;
i
--
)
{
pNode
=
checkedList
[
i
];
pNode
[
checkedKey
]
=
false
;
checkedList
.
splice
(
i
,
1
);
if
(
pNode
[
checkedKey
]
&&
pNode
!=
node
)
{
pNode
[
checkedKey
]
=
false
;
checkedList
.
splice
(
i
,
1
);
view
.
setChkClass
(
setting
,
$$
(
pNode
,
consts
.
id
.
CHECK
,
setting
),
pNode
);
if
(
pNode
.
parentTId
!=
node
.
parentTId
)
{
view
.
repairParentChkClassWithSelf
(
setting
,
pNode
);
view
.
setChkClass
(
setting
,
$$
(
pNode
,
consts
.
id
.
CHECK
,
setting
),
pNode
);
if
(
pNode
.
parentTId
!=
node
.
parentTId
)
{
view
.
repairParentChkClassWithSelf
(
setting
,
pNode
);
}
}
}
checkedList
.
push
(
node
);
...
...
@@ -2305,7 +2307,7 @@
}
})(
jQuery
);
/*
* JQuery zTree exedit v3.5.16-beta.
5
* JQuery zTree exedit v3.5.16-beta.
7
* http://zTree.me/
*
* Copyright (c) 2010 Hunter.z
...
...
@@ -2314,7 +2316,7 @@
* http://www.opensource.org/licenses/mit-license.php
*
* email: hunter.z@263.net
* Date: 201
3-12-29
* Date: 201
4-01-05
*/
(
function
(
$
){
//default consts of exedit
...
...
@@ -2496,14 +2498,15 @@
zTreeTools
.
copyNode
=
function
(
targetNode
,
node
,
moveType
,
isSilent
)
{
if
(
!
node
)
return
null
;
if
(
targetNode
&&
!
targetNode
.
isParent
&&
this
.
setting
.
data
.
keep
.
leaf
&&
moveType
===
consts
.
move
.
TYPE_INNER
)
return
null
;
var
newNode
=
tools
.
clone
(
node
);
var
_this
=
this
,
newNode
=
tools
.
clone
(
node
);
if
(
!
targetNode
)
{
targetNode
=
null
;
moveType
=
consts
.
move
.
TYPE_INNER
;
}
if
(
moveType
==
consts
.
move
.
TYPE_INNER
)
{
function
copyCallback
()
{
view
.
addNodes
(
this
.
setting
,
targetNode
,
[
newNode
],
isSilent
);
view
.
addNodes
(
_
this
.
setting
,
targetNode
,
[
newNode
],
isSilent
);
}
if
(
tools
.
canAsync
(
this
.
setting
,
targetNode
))
{
...
...
@@ -2531,8 +2534,9 @@
}
else
if
(
!
targetNode
)
{
targetNode
=
null
;
}
var
_this
=
this
;
function
moveCallback
()
{
view
.
moveNode
(
this
.
setting
,
targetNode
,
node
,
moveType
,
false
,
isSilent
);
view
.
moveNode
(
_
this
.
setting
,
targetNode
,
node
,
moveType
,
false
,
isSilent
);
}
if
(
tools
.
canAsync
(
this
.
setting
,
targetNode
)
&&
moveType
===
consts
.
move
.
TYPE_INNER
)
{
view
.
asyncNode
(
this
.
setting
,
targetNode
,
isSilent
,
moveCallback
);
...
...
js/jquery.ztree.all-3.5.min.js
浏览文件 @
0626d78f
此差异已折叠。
点击以展开。
js/jquery.ztree.core-3.5.js
浏览文件 @
0626d78f
/*
* JQuery zTree core v3.5.16-beta.
5
* JQuery zTree core v3.5.16-beta.
7
* http://zTree.me/
*
* Copyright (c) 2010 Hunter.z
...
...
@@ -8,7 +8,7 @@
* http://www.opensource.org/licenses/mit-license.php
*
* email: hunter.z@263.net
* Date: 201
3-12-29
* Date: 201
4-01-05
*/
(
function
(
$
){
var
settings
=
{},
roots
=
{},
caches
=
{},
...
...
js/jquery.ztree.core-3.5.min.js
浏览文件 @
0626d78f
/*
* JQuery zTree core v3.5.16-beta.
5
* JQuery zTree core v3.5.16-beta.
7
* http://zTree.me/
*
* Copyright (c) 2010 Hunter.z
...
...
@@ -8,7 +8,7 @@
* http://www.opensource.org/licenses/mit-license.php
*
* email: hunter.z@263.net
* Date: 201
3-12-29
* Date: 201
4-01-05
*/
(
function
(
p
){
var
G
,
H
,
I
,
J
,
K
,
L
,
r
=
{},
u
=
{},
v
=
{},
M
=
{
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
"
},
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
}},
w
=
[
function
(
b
){
var
a
=
b
.
treeObj
,
c
=
e
.
event
;
a
.
bind
(
c
.
NODECREATED
,
function
(
a
,
c
,
g
){
j
.
apply
(
b
.
callback
.
onNodeCreated
,
...
...
js/jquery.ztree.excheck-3.5.js
浏览文件 @
0626d78f
/*
* JQuery zTree excheck v3.5.16-beta.
5
* JQuery zTree excheck v3.5.16-beta.
7
* http://zTree.me/
*
* Copyright (c) 2010 Hunter.z
...
...
@@ -8,7 +8,7 @@
* http://www.opensource.org/licenses/mit-license.php
*
* email: hunter.z@263.net
* Date: 201
3-12-29
* Date: 201
4-01-05
*/
(
function
(
$
){
//default consts of excheck
...
...
@@ -377,12 +377,14 @@
if
(
setting
.
check
.
radioType
==
r
.
TYPE_ALL
)
{
for
(
i
=
checkedList
.
length
-
1
;
i
>=
0
;
i
--
)
{
pNode
=
checkedList
[
i
];
pNode
[
checkedKey
]
=
false
;
checkedList
.
splice
(
i
,
1
);
if
(
pNode
[
checkedKey
]
&&
pNode
!=
node
)
{
pNode
[
checkedKey
]
=
false
;
checkedList
.
splice
(
i
,
1
);
view
.
setChkClass
(
setting
,
$$
(
pNode
,
consts
.
id
.
CHECK
,
setting
),
pNode
);
if
(
pNode
.
parentTId
!=
node
.
parentTId
)
{
view
.
repairParentChkClassWithSelf
(
setting
,
pNode
);
view
.
setChkClass
(
setting
,
$$
(
pNode
,
consts
.
id
.
CHECK
,
setting
),
pNode
);
if
(
pNode
.
parentTId
!=
node
.
parentTId
)
{
view
.
repairParentChkClassWithSelf
(
setting
,
pNode
);
}
}
}
checkedList
.
push
(
node
);
...
...
js/jquery.ztree.excheck-3.5.min.js
浏览文件 @
0626d78f
/*
* JQuery zTree excheck v3.5.16-beta.
5
* JQuery zTree excheck v3.5.16-beta.
7
* http://zTree.me/
*
* Copyright (c) 2010 Hunter.z
...
...
@@ -8,16 +8,16 @@
* http://www.opensource.org/licenses/mit-license.php
*
* email: hunter.z@263.net
* Date: 201
3-12-29
* Date: 201
4-01-05
*/
(
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
),
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
=
f
.
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
===
!
0
)
return
!
1
;
var
b
=
f
.
getSetting
(
c
.
data
.
treeId
),
d
=
n
(
a
,
j
.
id
.
CHECK
,
b
);
a
.
check_Focus
=!
1
;
e
.
setChkClass
(
b
,
d
,
a
);
return
!
0
};
m
.
extend
(
!
0
,
m
.
fn
.
zTree
.
consts
,
o
);
m
.
extend
(
!
0
,
m
.
fn
.
zTree
.
_z
,{
tools
:{},
view
:{
checkNodeRelation
:
function
(
c
,
a
){
var
b
,
d
,
h
,
i
=
c
.
data
.
key
.
children
,
l
=
c
.
data
.
key
.
checked
;
b
=
j
.
radio
;
if
(
c
.
check
.
chkStyle
==
b
.
STYLE
){
var
g
=
f
.
getRadioCheckedList
(
c
);
if
(
a
[
l
])
if
(
c
.
check
.
radioType
==
b
.
TYPE_ALL
){
for
(
d
=
g
.
length
-
1
;
d
>=
0
;
d
--
)
b
=
g
[
d
],
b
[
l
]
=!
1
,
g
.
splice
(
d
,
1
),
e
.
setChkClass
(
c
,
n
(
b
,
j
.
id
.
CHECK
,
c
),
b
),
b
.
parentTId
!=
a
.
parentTId
&&
e
.
repairParentChkClassWithSelf
(
c
,
b
);
g
.
push
(
a
)}
else
{
g
=
a
.
parentTId
?
a
.
getParentNode
():
f
.
getRoot
(
c
);
for
(
d
=
0
,
h
=
g
[
i
].
length
;
d
<
h
;
d
++
)
b
=
g
[
i
][
d
],
b
[
l
]
&&
b
!=
a
&&
(
b
[
l
]
=!
1
,
e
.
setChkClass
(
c
,
n
(
b
,
j
.
id
.
CHECK
,
c
),
b
))}
else
if
(
c
.
check
.
radioType
==
b
.
TYPE_ALL
)
for
(
d
=
0
,
h
=
g
.
length
;
d
<
h
;
d
++
)
if
(
a
==
g
[
d
]){
g
.
splice
(
d
,
1
);
break
}}
else
a
[
l
]
&&
(
!
a
[
i
]
||
a
[
i
].
length
==
0
||
c
.
check
.
chkboxType
.
Y
.
indexOf
(
"
s
"
)
>-
1
)
&&
e
.
setSonNodeCheckBox
(
c
,
a
,
!
0
),
!
a
[
l
]
&&
(
!
a
[
i
]
||
a
[
i
].
length
==
0
||
c
.
check
.
chkboxType
.
N
.
indexOf
(
"
s
"
)
>-
1
)
&&
e
.
setSonNodeCheckBox
(
c
,
a
,
!
1
),
a
[
l
]
&&
c
.
check
.
chkboxType
.
Y
.
indexOf
(
"
p
"
)
>-
1
&&
e
.
setParentNodeCheckBox
(
c
,
a
,
!
0
),
!
a
[
l
]
&&
c
.
check
.
chkboxType
.
N
.
indexOf
(
"
p
"
)
>-
1
&&
e
.
setParentNodeCheckBox
(
c
,
a
,
!
1
)},
makeChkClass
:
function
(
c
,
a
){
var
b
=
c
.
data
.
key
.
checked
,
d
=
j
.
checkbox
,
h
=
j
.
radio
,
i
=
""
,
i
=
a
.
chkDisabled
===!
0
?
d
.
DISABLED
:
a
.
halfCheck
?
d
.
PART
:
c
.
check
.
chkStyle
==
h
.
STYLE
?
a
.
check_Child_State
<
1
?
d
.
FULL
:
d
.
PART
:
a
[
b
]?
a
.
check_Child_State
===
2
||
a
.
check_Child_State
===-
1
?
d
.
FULL
:
d
.
PART
:
a
.
check_Child_State
<
1
?
d
.
FULL
:
d
.
PART
,
b
=
c
.
check
.
chkStyle
+
"
_
"
+
(
a
[
b
]?
d
.
TRUE
:
d
.
FALSE
)
+
"
_
"
+
i
,
b
=
a
.
check_Focus
&&
a
.
chkDisabled
!==!
0
?
b
+
"
_
"
+
d
.
FOCUS
:
b
;
return
j
.
className
.
BUTTON
+
"
"
+
d
.
DEFAULT
+
"
"
+
b
},
repairAllChk
:
function
(
c
,
a
){
if
(
c
.
check
.
enable
&&
c
.
check
.
chkStyle
===
j
.
checkbox
.
STYLE
)
for
(
var
b
=
c
.
data
.
key
.
checked
,
d
=
c
.
data
.
key
.
children
,
h
=
f
.
getRoot
(
c
),
i
=
0
,
l
=
h
[
d
].
length
;
i
<
l
;
i
++
){
var
g
=
h
[
d
][
i
];
g
.
nocheck
!==!
0
&&
g
.
chkDisabled
!==!
0
&&
(
g
[
b
]
=
a
);
e
.
setSonNodeCheckBox
(
c
,
g
,
a
)}},
repairChkClass
:
function
(
c
,
a
){
if
(
a
&&
(
f
.
makeChkFlag
(
c
,
a
),
a
.
nocheck
!==!
0
)){
var
b
=
n
(
a
,
j
.
id
.
CHECK
,
c
);
e
.
setChkClass
(
c
,
b
,
a
)}},
repairParentChkClass
:
function
(
c
,
a
){
if
(
a
&&
a
.
parentTId
){
var
b
=
a
.
getParentNode
();
e
.
repairChkClass
(
c
,
b
);
e
.
repairParentChkClass
(
c
,
b
)}},
repairParentChkClassWithSelf
:
function
(
c
,
a
){
if
(
a
){
var
b
=
c
.
data
.
key
.
children
;
a
[
b
]
&&
a
[
b
].
length
>
0
?
e
.
repairParentChkClass
(
c
,
a
[
b
][
0
]):
e
.
repairParentChkClass
(
c
,
a
)}},
repairSonChkDisabled
:
function
(
c
,
a
,
b
,
d
){
if
(
a
){
var
h
=
c
.
data
.
key
.
children
;
if
(
a
.
chkDisabled
!=
b
)
a
.
chkDisabled
=
b
;
e
.
repairChkClass
(
c
,
a
);
if
(
a
[
h
]
&&
d
)
for
(
var
i
=
0
,
l
=
a
[
h
].
length
;
i
<
l
;
i
++
)
e
.
repairSonChkDisabled
(
c
,
a
[
h
][
i
],
b
,
d
)}},
repairParentChkDisabled
:
function
(
c
,
a
,
b
,
d
){
if
(
a
){
if
(
a
.
chkDisabled
!=
b
&&
d
)
a
.
chkDisabled
=
b
;
e
.
repairChkClass
(
c
,
a
);
e
.
repairParentChkDisabled
(
c
,
a
.
getParentNode
(),
b
,
d
)}},
setChkClass
:
function
(
c
,
a
,
b
){
a
&&
(
b
.
nocheck
===!
0
?
a
.
hide
():
a
.
show
(),
a
.
removeClass
(),
a
.
addClass
(
e
.
makeChkClass
(
c
,
b
)))},
setParentNodeCheckBox
:
function
(
c
,
a
,
b
,
d
){
var
h
=
c
.
data
.
key
.
children
,
i
=
c
.
data
.
key
.
checked
,
l
=
n
(
a
,
j
.
id
.
CHECK
,
c
);
d
||
(
d
=
a
);
f
.
makeChkFlag
(
c
,
a
);
a
.
nocheck
!==!
0
&&
a
.
chkDisabled
!==!
0
&&
(
a
[
i
]
=
b
,
e
.
setChkClass
(
c
,
l
,
a
),
c
.
check
.
autoCheckTrigger
&&
a
!=
d
&&
c
.
treeObj
.
trigger
(
j
.
event
.
CHECK
,
!
0
)
return
!
1
;
var
b
=
f
.
getSetting
(
c
.
data
.
treeId
),
d
=
n
(
a
,
j
.
id
.
CHECK
,
b
);
a
.
check_Focus
=!
1
;
e
.
setChkClass
(
b
,
d
,
a
);
return
!
0
};
m
.
extend
(
!
0
,
m
.
fn
.
zTree
.
consts
,
o
);
m
.
extend
(
!
0
,
m
.
fn
.
zTree
.
_z
,{
tools
:{},
view
:{
checkNodeRelation
:
function
(
c
,
a
){
var
b
,
d
,
h
,
i
=
c
.
data
.
key
.
children
,
l
=
c
.
data
.
key
.
checked
;
b
=
j
.
radio
;
if
(
c
.
check
.
chkStyle
==
b
.
STYLE
){
var
g
=
f
.
getRadioCheckedList
(
c
);
if
(
a
[
l
])
if
(
c
.
check
.
radioType
==
b
.
TYPE_ALL
){
for
(
d
=
g
.
length
-
1
;
d
>=
0
;
d
--
)
b
=
g
[
d
],
b
[
l
]
&&
b
!=
a
&&
(
b
[
l
]
=!
1
,
g
.
splice
(
d
,
1
),
e
.
setChkClass
(
c
,
n
(
b
,
j
.
id
.
CHECK
,
c
),
b
),
b
.
parentTId
!=
a
.
parentTId
&&
e
.
repairParentChkClassWithSelf
(
c
,
b
));
g
.
push
(
a
)}
else
{
g
=
a
.
parentTId
?
a
.
getParentNode
():
f
.
getRoot
(
c
);
for
(
d
=
0
,
h
=
g
[
i
].
length
;
d
<
h
;
d
++
)
b
=
g
[
i
][
d
],
b
[
l
]
&&
b
!=
a
&&
(
b
[
l
]
=!
1
,
e
.
setChkClass
(
c
,
n
(
b
,
j
.
id
.
CHECK
,
c
),
b
))}
else
if
(
c
.
check
.
radioType
==
b
.
TYPE_ALL
)
for
(
d
=
0
,
h
=
g
.
length
;
d
<
h
;
d
++
)
if
(
a
==
g
[
d
]){
g
.
splice
(
d
,
1
);
break
}}
else
a
[
l
]
&&
(
!
a
[
i
]
||
a
[
i
].
length
==
0
||
c
.
check
.
chkboxType
.
Y
.
indexOf
(
"
s
"
)
>-
1
)
&&
e
.
setSonNodeCheckBox
(
c
,
a
,
!
0
),
!
a
[
l
]
&&
(
!
a
[
i
]
||
a
[
i
].
length
==
0
||
c
.
check
.
chkboxType
.
N
.
indexOf
(
"
s
"
)
>-
1
)
&&
e
.
setSonNodeCheckBox
(
c
,
a
,
!
1
),
a
[
l
]
&&
c
.
check
.
chkboxType
.
Y
.
indexOf
(
"
p
"
)
>-
1
&&
e
.
setParentNodeCheckBox
(
c
,
a
,
!
0
),
!
a
[
l
]
&&
c
.
check
.
chkboxType
.
N
.
indexOf
(
"
p
"
)
>-
1
&&
e
.
setParentNodeCheckBox
(
c
,
a
,
!
1
)},
makeChkClass
:
function
(
c
,
a
){
var
b
=
c
.
data
.
key
.
checked
,
d
=
j
.
checkbox
,
h
=
j
.
radio
,
i
=
""
,
i
=
a
.
chkDisabled
===!
0
?
d
.
DISABLED
:
a
.
halfCheck
?
d
.
PART
:
c
.
check
.
chkStyle
==
h
.
STYLE
?
a
.
check_Child_State
<
1
?
d
.
FULL
:
d
.
PART
:
a
[
b
]?
a
.
check_Child_State
===
2
||
a
.
check_Child_State
===-
1
?
d
.
FULL
:
d
.
PART
:
a
.
check_Child_State
<
1
?
d
.
FULL
:
d
.
PART
,
b
=
c
.
check
.
chkStyle
+
"
_
"
+
(
a
[
b
]?
d
.
TRUE
:
d
.
FALSE
)
+
"
_
"
+
i
,
b
=
a
.
check_Focus
&&
a
.
chkDisabled
!==!
0
?
b
+
"
_
"
+
d
.
FOCUS
:
b
;
return
j
.
className
.
BUTTON
+
"
"
+
d
.
DEFAULT
+
"
"
+
b
},
repairAllChk
:
function
(
c
,
a
){
if
(
c
.
check
.
enable
&&
c
.
check
.
chkStyle
===
j
.
checkbox
.
STYLE
)
for
(
var
b
=
c
.
data
.
key
.
checked
,
d
=
c
.
data
.
key
.
children
,
h
=
f
.
getRoot
(
c
),
i
=
0
,
l
=
h
[
d
].
length
;
i
<
l
;
i
++
){
var
g
=
h
[
d
][
i
];
g
.
nocheck
!==!
0
&&
g
.
chkDisabled
!==!
0
&&
(
g
[
b
]
=
a
);
e
.
setSonNodeCheckBox
(
c
,
g
,
a
)}},
repairChkClass
:
function
(
c
,
a
){
if
(
a
&&
(
f
.
makeChkFlag
(
c
,
a
),
a
.
nocheck
!==!
0
)){
var
b
=
n
(
a
,
j
.
id
.
CHECK
,
c
);
e
.
setChkClass
(
c
,
b
,
a
)}},
repairParentChkClass
:
function
(
c
,
a
){
if
(
a
&&
a
.
parentTId
){
var
b
=
a
.
getParentNode
();
e
.
repairChkClass
(
c
,
b
);
e
.
repairParentChkClass
(
c
,
b
)}},
repairParentChkClassWithSelf
:
function
(
c
,
a
){
if
(
a
){
var
b
=
c
.
data
.
key
.
children
;
a
[
b
]
&&
a
[
b
].
length
>
0
?
e
.
repairParentChkClass
(
c
,
a
[
b
][
0
]):
e
.
repairParentChkClass
(
c
,
a
)}},
repairSonChkDisabled
:
function
(
c
,
a
,
b
,
d
){
if
(
a
){
var
h
=
c
.
data
.
key
.
children
;
if
(
a
.
chkDisabled
!=
b
)
a
.
chkDisabled
=
b
;
e
.
repairChkClass
(
c
,
a
);
if
(
a
[
h
]
&&
d
)
for
(
var
i
=
0
,
l
=
a
[
h
].
length
;
i
<
l
;
i
++
)
e
.
repairSonChkDisabled
(
c
,
a
[
h
][
i
],
b
,
d
)}},
repairParentChkDisabled
:
function
(
c
,
a
,
b
,
d
){
if
(
a
){
if
(
a
.
chkDisabled
!=
b
&&
d
)
a
.
chkDisabled
=
b
;
e
.
repairChkClass
(
c
,
a
);
e
.
repairParentChkDisabled
(
c
,
a
.
getParentNode
(),
b
,
d
)}},
setChkClass
:
function
(
c
,
a
,
b
){
a
&&
(
b
.
nocheck
===!
0
?
a
.
hide
():
a
.
show
(),
a
.
removeClass
(),
a
.
addClass
(
e
.
makeChkClass
(
c
,
b
)))},
setParentNodeCheckBox
:
function
(
c
,
a
,
b
,
d
){
var
h
=
c
.
data
.
key
.
children
,
i
=
c
.
data
.
key
.
checked
,
l
=
n
(
a
,
j
.
id
.
CHECK
,
c
);
d
||
(
d
=
a
);
f
.
makeChkFlag
(
c
,
a
);
a
.
nocheck
!==!
0
&&
a
.
chkDisabled
!==!
0
&&
(
a
[
i
]
=
b
,
e
.
setChkClass
(
c
,
l
,
a
),
c
.
check
.
autoCheckTrigger
&&
a
!=
d
&&
c
.
treeObj
.
trigger
(
j
.
event
.
CHECK
,
[
null
,
c
.
treeId
,
a
]));
if
(
a
.
parentTId
){
l
=!
0
;
if
(
!
b
)
for
(
var
h
=
a
.
getParentNode
()[
h
],
g
=
0
,
k
=
h
.
length
;
g
<
k
;
g
++
)
if
(
h
[
g
].
nocheck
!==!
0
&&
h
[
g
].
chkDisabled
!==!
0
&&
h
[
g
][
i
]
||
(
h
[
g
].
nocheck
===!
0
||
h
[
g
].
chkDisabled
===!
0
)
&&
h
[
g
].
check_Child_State
>
0
){
l
=!
1
;
break
}
l
&&
e
.
setParentNodeCheckBox
(
c
,
a
.
getParentNode
(),
b
,
d
)}},
setSonNodeCheckBox
:
function
(
c
,
a
,
b
,
d
){
if
(
a
){
var
h
=
c
.
data
.
key
.
children
,
i
=
c
.
data
.
key
.
checked
,
l
=
n
(
a
,
j
.
id
.
CHECK
,
c
);
d
||
(
d
=
a
);
var
g
=!
1
;
if
(
a
[
h
])
for
(
var
k
=
0
,
m
=
a
[
h
].
length
;
k
<
m
&&
a
.
chkDisabled
!==!
0
;
k
++
){
var
o
=
a
[
h
][
k
];
e
.
setSonNodeCheckBox
(
c
,
o
,
b
,
d
);
o
.
chkDisabled
===!
0
&&
(
g
=!
0
)}
if
(
a
!=
f
.
getRoot
(
c
)
&&
a
.
chkDisabled
!==!
0
){
g
&&
a
.
nocheck
!==!
0
&&
f
.
makeChkFlag
(
c
,
a
);
if
(
a
.
nocheck
!==!
0
&&
a
.
chkDisabled
!==!
0
){
if
(
a
[
i
]
=
b
,
!
g
)
a
.
check_Child_State
=
a
[
h
]
&&
a
[
h
].
length
>
0
?
b
?
2
:
0
:
-
1
}
else
a
.
check_Child_State
=-
1
;
e
.
setChkClass
(
c
,
l
,
a
);
c
.
check
.
autoCheckTrigger
&&
a
!=
d
&&
a
.
nocheck
!==!
0
&&
a
.
chkDisabled
!==!
0
&&
c
.
treeObj
.
trigger
(
j
.
event
.
CHECK
,[
null
,
c
.
treeId
,
a
])}}}},
event
:{},
data
:{
getRadioCheckedList
:
function
(
c
){
for
(
var
a
=
f
.
getRoot
(
c
).
radioCheckedList
,
b
=
0
,
d
=
a
.
length
;
b
<
d
;
b
++
)
f
.
getNodeCache
(
c
,
a
[
b
].
tId
)
||
(
a
.
splice
(
b
,
1
),
b
--
,
d
--
);
return
a
},
getCheckStatus
:
function
(
c
,
a
){
if
(
!
c
.
check
.
enable
||
a
.
nocheck
||
a
.
chkDisabled
)
return
null
;
var
b
=
c
.
data
.
key
.
checked
;
return
{
checked
:
a
[
b
],
half
:
a
.
halfCheck
?
a
.
halfCheck
:
c
.
check
.
chkStyle
==
j
.
radio
.
STYLE
?
a
.
check_Child_State
===
2
:
a
[
b
]?
a
.
check_Child_State
>-
1
&&
a
.
check_Child_State
<
2
:
a
.
check_Child_State
>
0
}},
getTreeCheckedNodes
:
function
(
c
,
a
,
b
,
d
){
if
(
!
a
)
return
[];
for
(
var
h
=
c
.
data
.
key
.
children
,
i
=
c
.
data
.
key
.
checked
,
e
=
b
&&
c
.
check
.
chkStyle
==
j
.
radio
.
STYLE
&&
c
.
check
.
radioType
==
j
.
radio
.
TYPE_ALL
,
...
...
js/jquery.ztree.exedit-3.5.js
浏览文件 @
0626d78f
/*
* JQuery zTree exedit v3.5.16-beta.
5
* JQuery zTree exedit v3.5.16-beta.
7
* http://zTree.me/
*
* Copyright (c) 2010 Hunter.z
...
...
@@ -8,7 +8,7 @@
* http://www.opensource.org/licenses/mit-license.php
*
* email: hunter.z@263.net
* Date: 201
3-12-29
* Date: 201
4-01-05
*/
(
function
(
$
){
//default consts of exedit
...
...
@@ -190,14 +190,15 @@
zTreeTools
.
copyNode
=
function
(
targetNode
,
node
,
moveType
,
isSilent
)
{
if
(
!
node
)
return
null
;
if
(
targetNode
&&
!
targetNode
.
isParent
&&
this
.
setting
.
data
.
keep
.
leaf
&&
moveType
===
consts
.
move
.
TYPE_INNER
)
return
null
;
var
newNode
=
tools
.
clone
(
node
);
var
_this
=
this
,
newNode
=
tools
.
clone
(
node
);
if
(
!
targetNode
)
{
targetNode
=
null
;
moveType
=
consts
.
move
.
TYPE_INNER
;
}
if
(
moveType
==
consts
.
move
.
TYPE_INNER
)
{
function
copyCallback
()
{
view
.
addNodes
(
this
.
setting
,
targetNode
,
[
newNode
],
isSilent
);
view
.
addNodes
(
_
this
.
setting
,
targetNode
,
[
newNode
],
isSilent
);
}
if
(
tools
.
canAsync
(
this
.
setting
,
targetNode
))
{
...
...
@@ -225,8 +226,9 @@
}
else
if
(
!
targetNode
)
{
targetNode
=
null
;
}
var
_this
=
this
;
function
moveCallback
()
{
view
.
moveNode
(
this
.
setting
,
targetNode
,
node
,
moveType
,
false
,
isSilent
);
view
.
moveNode
(
_
this
.
setting
,
targetNode
,
node
,
moveType
,
false
,
isSilent
);
}
if
(
tools
.
canAsync
(
this
.
setting
,
targetNode
)
&&
moveType
===
consts
.
move
.
TYPE_INNER
)
{
view
.
asyncNode
(
this
.
setting
,
targetNode
,
isSilent
,
moveCallback
);
...
...
js/jquery.ztree.exedit-3.5.min.js
浏览文件 @
0626d78f
此差异已折叠。
点击以展开。
js/jquery.ztree.exhide-3.5.js
浏览文件 @
0626d78f
/*
* JQuery zTree exHideNodes v3.5.16-beta.
5
* JQuery zTree exHideNodes v3.5.16-beta.
7
* http://zTree.me/
*
* Copyright (c) 2010 Hunter.z
...
...
@@ -8,7 +8,7 @@
* http://www.opensource.org/licenses/mit-license.php
*
* email: hunter.z@263.net
* Date: 201
3-12-29
* Date: 201
4-01-05
*/
(
function
(
$
){
//default init node of exLib
...
...
js/jquery.ztree.exhide-3.5.min.js
浏览文件 @
0626d78f
/*
* JQuery zTree exHideNodes v3.5.16-beta.
5
* JQuery zTree exHideNodes v3.5.16-beta.
7
* http://zTree.me/
*
* Copyright (c) 2010 Hunter.z
...
...
@@ -8,7 +8,7 @@
* http://www.opensource.org/licenses/mit-license.php
*
* email: hunter.z@263.net
* Date: 201
3-12-29
* Date: 201
4-01-05
*/
(
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
){
for
(
var
b
=
a
.
getPreNode
();
b
;){
if
(
b
.
isLastNode
){
b
.
isLastNode
=!
1
;
d
.
setNodeLineIcos
(
c
,
b
);
break
}
if
(
b
.
isFirstNode
)
break
;
b
=
b
.
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
浏览文件 @
0626d78f
...
...
@@ -14,7 +14,7 @@
</font>
*201
3.12.29* v3.5.16-beta.5
*201
4.01.05* v3.5.16-beta.7
* 【增加】onDragMove 回调,便于控制 zTree 节点与其他 DOM 的拖拽操作。(感谢 yumi301)
* 【增加】针对 Mac 系统 Cmd 键的支持, Cmd 键 + 左键 也可以多选节点
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录