Close open menu when clicking again on the button
This commit is contained in:
@@ -10,10 +10,18 @@ Kanboard.Dropdown.prototype.listen = function() {
|
||||
self.close();
|
||||
});
|
||||
|
||||
$(document).on('click', '.active-dropdown-menu', function() {
|
||||
$(this).addClass('dropdown-menu');
|
||||
$(this).removeClass('active-dropdown-menu');
|
||||
self.close();
|
||||
});
|
||||
|
||||
$(document).on('click', '.dropdown-menu', function(e) {
|
||||
e.preventDefault();
|
||||
e.stopImmediatePropagation();
|
||||
self.close();
|
||||
$(this).removeClass('dropdown-menu');
|
||||
$(this).addClass('active-dropdown-menu');
|
||||
|
||||
var submenu = $(this).next('ul');
|
||||
var offset = $(this).offset();
|
||||
|
||||
Reference in New Issue
Block a user