summaryrefslogtreecommitdiff
path: root/assets/js/src/Dropdown.js
diff options
context:
space:
mode:
Diffstat (limited to 'assets/js/src/Dropdown.js')
-rw-r--r--assets/js/src/Dropdown.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/assets/js/src/Dropdown.js b/assets/js/src/Dropdown.js
index ec033b3e..406d0460 100644
--- a/assets/js/src/Dropdown.js
+++ b/assets/js/src/Dropdown.js
@@ -41,15 +41,26 @@ Kanboard.Dropdown.prototype.listen = function() {
else {
clone.css('left', offset.left);
}
+
+ if (document.getElementById('dropdown') !== null) {
+ KB.trigger('dropdown.afterRender');
+ }
});
$(document).on('click', '.dropdown-submenu-open li', function(e) {
+
if ($(e.target).is('li')) {
+ KB.trigger('dropdown.clicked');
+
$(this).find('a:visible')[0].click(); // Calling native click() not the jQuery one
}
});
};
Kanboard.Dropdown.prototype.close = function() {
+ if (document.getElementById('dropdown') !== null) {
+ KB.trigger('dropdown.beforeDestroy');
+ }
+
$("#dropdown").remove();
};