]>
BookStack Code Mirror - bookstack/commitdiff
projects
/
bookstack
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
b9ad3f9
)
Updated dropdowns to close all others before opening
author
Dan Brown
<redacted>
Mon, 6 May 2019 16:59:17 +0000
(17:59 +0100)
committer
Dan Brown
<redacted>
Mon, 6 May 2019 16:59:17 +0000
(17:59 +0100)
resources/assets/js/components/dropdown.js
patch
|
blob
|
history
diff --git
a/resources/assets/js/components/dropdown.js
b/resources/assets/js/components/dropdown.js
index ce797bbeb31976c351335888c92b80b30c8d2fdb..3887e8432289d23e2f81cd01424c7476428c8e33 100644
(file)
--- a/
resources/assets/js/components/dropdown.js
+++ b/
resources/assets/js/components/dropdown.js
@@
-14,7
+14,7
@@
class DropDown {
}
show(event) {
- this.hide();
+ this.hide
All
();
this.menu.style.display = 'block';
this.menu.classList.add('anim', 'menuIn');
@@
-44,6
+44,12
@@
class DropDown {
event.stopPropagation();
}
+ hideAll() {
+ for (let dropdown of window.components.dropdown) {
+ dropdown.hide();
+ }
+ }
+
hide() {
this.menu.style.display = 'none';
this.menu.classList.remove('anim', 'menuIn');
hide
Morty Proxy
This is a
proxified and sanitized
view of the page, visit
original site
.