Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
guns-vip
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenjunxiong
guns-vip
Commits
1afcd90a
Commit
1afcd90a
authored
Aug 05, 2018
by
fengshuonan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复treetable收缩不能收缩子所有级的bug
parent
a91a85c9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
1 deletions
+22
-1
guns-admin/src/main/webapp/static/js/plugins/bootstrap-treetable/bootstrap-treetable.js
+22
-1
No files found.
guns-admin/src/main/webapp/static/js/plugins/bootstrap-treetable/bootstrap-treetable.js
View file @
1afcd90a
...
...
@@ -210,10 +210,31 @@
}
else
{
_code
=
tr
.
find
(
"td[name='"
+
options
.
code
+
"']"
).
text
();
}
var
_ls
=
target
.
find
(
"tbody"
).
find
(
".tg-"
+
_code
);
//下一级
var
_ls
=
target
.
find
(
"tbody"
).
find
(
".tg-"
+
_code
);
//下一级
,改为下所有级别
if
(
_ls
&&
_ls
.
length
>
0
){
var
_flag
=
$
(
this
).
hasClass
(
options
.
expanderExpandedClass
);
$
.
each
(
_ls
,
function
(
index
,
item
)
{
//查找当前这个节点的所有节点(包含子节点),如果是折叠都显示为不显示,如果是展开,则根据当前节点的状态
var
pcode
=
$
(
item
).
find
(
"td[name='code']"
).
text
();
var
pcodes
=
target
.
find
(
"tbody"
).
find
(
".tg-"
+
pcode
);
//下一级,改为下所有级别
$
.
each
(
pcodes
,
function
(
pIndex
,
pItem
)
{
//如果是展开,判断当前箭头是开启还是关闭
if
(
!
_flag
){
debugger
;
var
hasExpander
=
$
(
item
).
find
(
"td[name='name']"
).
find
(
".treetable-expander"
)
.
hasClass
(
options
.
expanderExpandedClass
);
if
(
hasExpander
)
{
$
(
pItem
).
css
(
"display"
,
"table"
);
}
else
{
$
(
pItem
).
css
(
"display"
,
"none"
);
}
}
else
{
$
(
pItem
).
css
(
"display"
,
"none"
);
}
});
$
(
item
).
css
(
"display"
,
_flag
?
"none"
:
"table"
);
});
if
(
_flag
){
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment