Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
views_tree
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
views_tree
Merge requests
!12
Issue
#3344199
: Collapsible javascript event attach multiple times
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Issue
#3344199
: Collapsible javascript event attach multiple times
issue/views_tree-3344199:3344199-collapsible-javascript-event
into
3.0.x
Overview
0
Commits
3
Pipelines
3
Changes
1
Merged
Jürgen Haas
requested to merge
issue/views_tree-3344199:3344199-collapsible-javascript-event
into
3.0.x
2 years ago
Overview
0
Commits
3
Pipelines
3
Changes
1
Expand
0
0
Merge request reports
Compare
3.0.x
version 3
6e116490
1 month ago
version 2
6e116490
1 month ago
version 1
3d6e7116
2 years ago
3.0.x (base)
and
latest version
latest version
08730997
3 commits,
1 month ago
version 3
6e116490
2 commits,
1 month ago
version 2
6e116490
9 commits,
1 month ago
version 1
3d6e7116
1 commit,
2 years ago
1 file
+
14
−
12
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
js/collapsible.js
+
14
−
12
Options
@@ -43,18 +43,20 @@
});
});
$
(
'
.views_tree_link a
'
,
context
).
on
(
'
click
'
,
function
(
e
)
{
e
.
preventDefault
();
const
$parent
=
$
(
this
).
parent
();
const
$itemList
=
$parent
.
parent
().
children
(
'
.item-list
'
);
const
isExpanded
=
$parent
.
hasClass
(
'
views_tree_link_expanded
'
);
$itemList
.
slideToggle
();
$parent
.
toggleClass
(
'
views_tree_link_expanded views_tree_link_collapsed
'
,
);
});
$
(
'
.views_tree_link a:not(.view-tree-processed)
'
,
context
)
.
addClass
(
'
view-tree-processed
'
)
.
on
(
'
click
'
,
function
(
e
)
{
e
.
preventDefault
();
const
$parent
=
$
(
this
).
parent
();
const
$itemList
=
$parent
.
parent
().
children
(
'
.item-list
'
);
const
isExpanded
=
$parent
.
hasClass
(
'
views_tree_link_expanded
'
);
$itemList
.
slideToggle
();
$parent
.
toggleClass
(
'
views_tree_link_expanded views_tree_link_collapsed
'
,
);
});
},
};
})(
jQuery
,
Drupal
);
Loading