Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
GitCode
1024程序员开源挑战赛(10.23-11.14)
提交
acd61848
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看板
提交
acd61848
编写于
5月 25, 2015
作者:
Z
ztree
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add callback function: onSelected / onUnSelectedadd callback function: onSelected / onUnSelected
上级
ca88248e
变更
12
展开全部
显示空白变更内容
内联
并排
Showing
12 changed file
with
276 addition
and
220 deletion
+276
-220
QUI 框架介绍.txt
QUI 框架介绍.txt
+0
-7
api/apiCss/jquery.ztree.core-3.5.js
api/apiCss/jquery.ztree.core-3.5.js
+58
-57
js/jquery.ztree.all-3.5.js
js/jquery.ztree.all-3.5.js
+45
-15
js/jquery.ztree.all-3.5.min.js
js/jquery.ztree.all-3.5.min.js
+62
-61
js/jquery.ztree.core-3.5.js
js/jquery.ztree.core-3.5.js
+41
-11
js/jquery.ztree.core-3.5.min.js
js/jquery.ztree.core-3.5.min.js
+58
-57
js/jquery.ztree.excheck-3.5.js
js/jquery.ztree.excheck-3.5.js
+2
-2
js/jquery.ztree.excheck-3.5.min.js
js/jquery.ztree.excheck-3.5.min.js
+2
-2
js/jquery.ztree.exedit-3.5.js
js/jquery.ztree.exedit-3.5.js
+2
-2
js/jquery.ztree.exedit-3.5.min.js
js/jquery.ztree.exedit-3.5.min.js
+2
-2
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
未找到文件。
QUI 框架介绍.txt
已删除
100644 → 0
浏览文件 @
ca88248e
如果你喜欢 zTree,但又觉得缺少系统的完整性,不妨可以考虑一下 QUI 框架, QUI框架实现了一整套企业级方案,同时对 zTree 进行了扩展,使用起来更加简便。
QUI框架网址:http://www.quickui.net
需要购买 QUI框架 的用户,在购买前告知是 zTree 的用户,可以获得更加优惠的价格。
\ No newline at end of file
api/apiCss/jquery.ztree.core-3.5.js
浏览文件 @
acd61848
此差异已折叠。
点击以展开。
js/jquery.ztree.all-3.5.js
浏览文件 @
acd61848
/*
* JQuery zTree core v3.5.1
7
* JQuery zTree core v3.5.1
8
* 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: 2015-0
2-1
5
* Date: 2015-0
5-2
5
*/
(
function
(
$
){
var
settings
=
{},
roots
=
{},
caches
=
{},
...
...
@@ -28,7 +28,9 @@
COLLAPSE
:
"
ztree_collapse
"
,
ASYNC_SUCCESS
:
"
ztree_async_success
"
,
ASYNC_ERROR
:
"
ztree_async_error
"
,
REMOVE
:
"
ztree_remove
"
REMOVE
:
"
ztree_remove
"
,
SELECTED
:
"
ztree_selected
"
,
UNSELECTED
:
"
ztree_unselected
"
},
id
:
{
A
:
"
_a
"
,
...
...
@@ -180,6 +182,13 @@
o
.
bind
(
c
.
REMOVE
,
function
(
event
,
treeId
,
treeNode
)
{
tools
.
apply
(
setting
.
callback
.
onRemove
,
[
event
,
treeId
,
treeNode
]);
});
o
.
bind
(
c
.
SELECTED
,
function
(
event
,
srcEvent
,
treeId
,
node
)
{
tools
.
apply
(
setting
.
callback
.
onSelected
,
[
srcEvent
,
treeId
,
node
]);
});
o
.
bind
(
c
.
UNSELECTED
,
function
(
event
,
srcEvent
,
treeId
,
node
)
{
tools
.
apply
(
setting
.
callback
.
onUnSelected
,
[
srcEvent
,
treeId
,
node
]);
});
},
_unbindEvent
=
function
(
setting
)
{
var
o
=
setting
.
treeObj
,
...
...
@@ -190,7 +199,9 @@
.
unbind
(
c
.
COLLAPSE
)
.
unbind
(
c
.
ASYNC_SUCCESS
)
.
unbind
(
c
.
ASYNC_ERROR
)
.
unbind
(
c
.
REMOVE
);
.
unbind
(
c
.
REMOVE
)
.
unbind
(
c
.
SELECTED
)
.
unbind
(
c
.
UNSELECTED
);
},
//default event proxy of core
_eventProxy
=
function
(
event
)
{
...
...
@@ -980,18 +991,23 @@
});
return
true
;
},
cancelPreSelectedNode
:
function
(
setting
,
node
)
{
var
list
=
data
.
getRoot
(
setting
).
curSelectedList
;
for
(
var
i
=
0
,
j
=
list
.
length
-
1
;
j
>=
i
;
j
--
)
{
if
(
!
node
||
node
===
list
[
j
])
{
$$
(
list
[
j
],
consts
.
id
.
A
,
setting
).
removeClass
(
consts
.
node
.
CURSELECTED
);
cancelPreSelectedNode
:
function
(
setting
,
node
,
excludeNode
)
{
var
list
=
data
.
getRoot
(
setting
).
curSelectedList
,
i
,
n
;
for
(
i
=
list
.
length
-
1
;
i
>=
0
;
i
--
)
{
n
=
list
[
i
];
if
(
node
===
n
||
(
!
node
&&
(
!
excludeNode
||
excludeNode
!==
n
)))
{
$$
(
n
,
consts
.
id
.
A
,
setting
).
removeClass
(
consts
.
node
.
CURSELECTED
);
if
(
node
)
{
data
.
removeSelectedNode
(
setting
,
node
);
setting
.
treeObj
.
trigger
(
consts
.
event
.
UNSELECTED
,
[
event
,
setting
.
treeId
,
n
]);
break
;
}
else
{
list
.
splice
(
i
,
1
);
setting
.
treeObj
.
trigger
(
consts
.
event
.
UNSELECTED
,
[
event
,
setting
.
treeId
,
n
]);
}
}
}
if
(
!
node
)
data
.
getRoot
(
setting
).
curSelectedList
=
[];
},
createNodeCallback
:
function
(
setting
)
{
if
(
!!
setting
.
callback
.
onNodeCreated
||
!!
setting
.
view
.
addDiyDom
)
{
...
...
@@ -1123,6 +1139,19 @@
data
.
getRoot
(
setting
).
expandTriggerFlag
=
expandTriggerFlag
;
view
.
expandCollapseNode
(
setting
,
node
,
expandFlag
,
animateFlag
,
callback
);
},
isSelectedNode
:
function
(
setting
,
node
)
{
if
(
!
node
)
{
return
false
;
}
var
list
=
data
.
getRoot
(
setting
).
curSelectedList
,
i
;
for
(
i
=
list
.
length
-
1
;
i
>=
0
;
i
--
)
{
if
(
node
===
list
[
i
])
{
return
true
;
}
}
return
false
;
},
makeDOMNodeIcon
:
function
(
html
,
setting
,
node
)
{
var
nameStr
=
data
.
getNodeName
(
setting
,
node
),
name
=
setting
.
view
.
nameIsHTML
?
nameStr
:
nameStr
.
replace
(
/&/g
,
'
&
'
).
replace
(
/</g
,
'
<
'
).
replace
(
/>/g
,
'
>
'
);
...
...
@@ -1365,10 +1394,11 @@
},
selectNode
:
function
(
setting
,
node
,
addFlag
)
{
if
(
!
addFlag
)
{
view
.
cancelPreSelectedNode
(
setting
);
view
.
cancelPreSelectedNode
(
setting
,
null
,
node
);
}
$$
(
node
,
consts
.
id
.
A
,
setting
).
addClass
(
consts
.
node
.
CURSELECTED
);
data
.
addSelectedNode
(
setting
,
node
);
setting
.
treeObj
.
trigger
(
consts
.
event
.
SELECTED
,
[
event
,
setting
.
treeId
,
node
]);
},
setNodeFontCss
:
function
(
setting
,
treeNode
)
{
var
aObj
=
$$
(
treeNode
,
consts
.
id
.
A
,
setting
),
...
...
@@ -1685,7 +1715,7 @@
consts
=
zt
.
consts
;
})(
jQuery
);
/*
* JQuery zTree excheck v3.5.1
7
* JQuery zTree excheck v3.5.1
8
* http://zTree.me/
*
* Copyright (c) 2010 Hunter.z
...
...
@@ -1694,7 +1724,7 @@
* http://www.opensource.org/licenses/mit-license.php
*
* email: hunter.z@263.net
* Date: 2015-0
2-1
5
* Date: 2015-0
5-2
5
*/
(
function
(
$
){
//default consts of excheck
...
...
@@ -2313,7 +2343,7 @@
}
})(
jQuery
);
/*
* JQuery zTree exedit v3.5.1
7
* JQuery zTree exedit v3.5.1
8
* http://zTree.me/
*
* Copyright (c) 2010 Hunter.z
...
...
@@ -2322,7 +2352,7 @@
* http://www.opensource.org/licenses/mit-license.php
*
* email: hunter.z@263.net
* Date: 2015-0
2-1
5
* Date: 2015-0
5-2
5
*/
(
function
(
$
){
//default consts of exedit
...
...
js/jquery.ztree.all-3.5.min.js
浏览文件 @
acd61848
此差异已折叠。
点击以展开。
js/jquery.ztree.core-3.5.js
浏览文件 @
acd61848
/*
* JQuery zTree core v3.5.1
7
* JQuery zTree core v3.5.1
8
* 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: 2015-0
2-1
5
* Date: 2015-0
5-2
5
*/
(
function
(
$
){
var
settings
=
{},
roots
=
{},
caches
=
{},
...
...
@@ -27,7 +27,9 @@
COLLAPSE
:
"
ztree_collapse
"
,
ASYNC_SUCCESS
:
"
ztree_async_success
"
,
ASYNC_ERROR
:
"
ztree_async_error
"
,
REMOVE
:
"
ztree_remove
"
REMOVE
:
"
ztree_remove
"
,
SELECTED
:
"
ztree_selected
"
,
UNSELECTED
:
"
ztree_unselected
"
},
id
:
{
A
:
"
_a
"
,
...
...
@@ -179,6 +181,13 @@
o
.
bind
(
c
.
REMOVE
,
function
(
event
,
treeId
,
treeNode
)
{
tools
.
apply
(
setting
.
callback
.
onRemove
,
[
event
,
treeId
,
treeNode
]);
});
o
.
bind
(
c
.
SELECTED
,
function
(
event
,
srcEvent
,
treeId
,
node
)
{
tools
.
apply
(
setting
.
callback
.
onSelected
,
[
srcEvent
,
treeId
,
node
]);
});
o
.
bind
(
c
.
UNSELECTED
,
function
(
event
,
srcEvent
,
treeId
,
node
)
{
tools
.
apply
(
setting
.
callback
.
onUnSelected
,
[
srcEvent
,
treeId
,
node
]);
});
},
_unbindEvent
=
function
(
setting
)
{
var
o
=
setting
.
treeObj
,
...
...
@@ -189,7 +198,9 @@
.
unbind
(
c
.
COLLAPSE
)
.
unbind
(
c
.
ASYNC_SUCCESS
)
.
unbind
(
c
.
ASYNC_ERROR
)
.
unbind
(
c
.
REMOVE
);
.
unbind
(
c
.
REMOVE
)
.
unbind
(
c
.
SELECTED
)
.
unbind
(
c
.
UNSELECTED
);
},
//default event proxy of core
_eventProxy
=
function
(
event
)
{
...
...
@@ -979,18 +990,23 @@
});
return
true
;
},
cancelPreSelectedNode
:
function
(
setting
,
node
)
{
var
list
=
data
.
getRoot
(
setting
).
curSelectedList
;
for
(
var
i
=
0
,
j
=
list
.
length
-
1
;
j
>=
i
;
j
--
)
{
if
(
!
node
||
node
===
list
[
j
])
{
$$
(
list
[
j
],
consts
.
id
.
A
,
setting
).
removeClass
(
consts
.
node
.
CURSELECTED
);
cancelPreSelectedNode
:
function
(
setting
,
node
,
excludeNode
)
{
var
list
=
data
.
getRoot
(
setting
).
curSelectedList
,
i
,
n
;
for
(
i
=
list
.
length
-
1
;
i
>=
0
;
i
--
)
{
n
=
list
[
i
];
if
(
node
===
n
||
(
!
node
&&
(
!
excludeNode
||
excludeNode
!==
n
)))
{
$$
(
n
,
consts
.
id
.
A
,
setting
).
removeClass
(
consts
.
node
.
CURSELECTED
);
if
(
node
)
{
data
.
removeSelectedNode
(
setting
,
node
);
setting
.
treeObj
.
trigger
(
consts
.
event
.
UNSELECTED
,
[
event
,
setting
.
treeId
,
n
]);
break
;
}
else
{
list
.
splice
(
i
,
1
);
setting
.
treeObj
.
trigger
(
consts
.
event
.
UNSELECTED
,
[
event
,
setting
.
treeId
,
n
]);
}
}
}
if
(
!
node
)
data
.
getRoot
(
setting
).
curSelectedList
=
[];
},
createNodeCallback
:
function
(
setting
)
{
if
(
!!
setting
.
callback
.
onNodeCreated
||
!!
setting
.
view
.
addDiyDom
)
{
...
...
@@ -1122,6 +1138,19 @@
data
.
getRoot
(
setting
).
expandTriggerFlag
=
expandTriggerFlag
;
view
.
expandCollapseNode
(
setting
,
node
,
expandFlag
,
animateFlag
,
callback
);
},
isSelectedNode
:
function
(
setting
,
node
)
{
if
(
!
node
)
{
return
false
;
}
var
list
=
data
.
getRoot
(
setting
).
curSelectedList
,
i
;
for
(
i
=
list
.
length
-
1
;
i
>=
0
;
i
--
)
{
if
(
node
===
list
[
i
])
{
return
true
;
}
}
return
false
;
},
makeDOMNodeIcon
:
function
(
html
,
setting
,
node
)
{
var
nameStr
=
data
.
getNodeName
(
setting
,
node
),
name
=
setting
.
view
.
nameIsHTML
?
nameStr
:
nameStr
.
replace
(
/&/g
,
'
&
'
).
replace
(
/</g
,
'
<
'
).
replace
(
/>/g
,
'
>
'
);
...
...
@@ -1364,10 +1393,11 @@
},
selectNode
:
function
(
setting
,
node
,
addFlag
)
{
if
(
!
addFlag
)
{
view
.
cancelPreSelectedNode
(
setting
);
view
.
cancelPreSelectedNode
(
setting
,
null
,
node
);
}
$$
(
node
,
consts
.
id
.
A
,
setting
).
addClass
(
consts
.
node
.
CURSELECTED
);
data
.
addSelectedNode
(
setting
,
node
);
setting
.
treeObj
.
trigger
(
consts
.
event
.
SELECTED
,
[
event
,
setting
.
treeId
,
node
]);
},
setNodeFontCss
:
function
(
setting
,
treeNode
)
{
var
aObj
=
$$
(
treeNode
,
consts
.
id
.
A
,
setting
),
...
...
js/jquery.ztree.core-3.5.min.js
浏览文件 @
acd61848
此差异已折叠。
点击以展开。
js/jquery.ztree.excheck-3.5.js
浏览文件 @
acd61848
/*
* JQuery zTree excheck v3.5.1
7
* JQuery zTree excheck v3.5.1
8
* 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: 2015-0
2-1
5
* Date: 2015-0
5-2
5
*/
(
function
(
$
){
//default consts of excheck
...
...
js/jquery.ztree.excheck-3.5.min.js
浏览文件 @
acd61848
/*
* JQuery zTree excheck v3.5.1
7
* JQuery zTree excheck v3.5.1
8
* 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: 2015-0
2-1
5
* Date: 2015-0
5-2
5
*/
(
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
===
...
...
js/jquery.ztree.exedit-3.5.js
浏览文件 @
acd61848
/*
* JQuery zTree exedit v3.5.1
7
* JQuery zTree exedit v3.5.1
8
* 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: 2015-0
2-1
5
* Date: 2015-0
5-2
5
*/
(
function
(
$
){
//default consts of exedit
...
...
js/jquery.ztree.exedit-3.5.min.js
浏览文件 @
acd61848
/*
* JQuery zTree exedit v3.5.1
7
* JQuery zTree exedit v3.5.1
8
* 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: 2015-0
2-1
5
* Date: 2015-0
5-2
5
*/
(
function
(
w
){
var
I
=
{
event
:{
DRAG
:
"
ztree_drag
"
,
DROP
:
"
ztree_drop
"
,
RENAME
:
"
ztree_rename
"
,
DRAGMOVE
:
"
ztree_dragmove
"
},
id
:{
EDIT
:
"
_edit
"
,
INPUT
:
"
_input
"
,
REMOVE
:
"
_remove
"
},
move
:{
TYPE_INNER
:
"
inner
"
,
TYPE_PREV
:
"
prev
"
,
TYPE_NEXT
:
"
next
"
},
node
:{
CURSELECTED_EDIT
:
"
curSelectedNode_Edit
"
,
TMPTARGET_TREE
:
"
tmpTargetzTree
"
,
TMPTARGET_NODE
:
"
tmpTargetNode
"
}},
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
(
C
.
dragFlag
==
0
&&
Math
.
abs
(
N
-
b
.
clientX
)
<
e
.
edit
.
drag
.
minMoveSize
&&
Math
.
abs
(
O
-
b
.
clientY
)
<
e
.
edit
.
drag
.
minMoveSize
)
return
!
0
;
var
a
,
c
,
n
,
k
,
i
;
i
=
e
.
data
.
key
.
children
;
M
.
css
(
"
cursor
"
,
"
pointer
"
);
if
(
C
.
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
)
C
.
dragNodeShowBefore
=
...
...
js/jquery.ztree.exhide-3.5.js
浏览文件 @
acd61848
/*
* JQuery zTree exHideNodes v3.5.1
7
* JQuery zTree exHideNodes v3.5.1
8
* 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: 2015-0
2-1
5
* Date: 2015-0
5-2
5
*/
(
function
(
$
){
//default init node of exLib
...
...
js/jquery.ztree.exhide-3.5.min.js
浏览文件 @
acd61848
/*
* JQuery zTree exHideNodes v3.5.1
7
* JQuery zTree exHideNodes v3.5.1
8
* 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: 2015-0
2-1
5
* Date: 2015-0
5-2
5
*/
(
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
=
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录