mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
bug #3924: Close dropdowns when an item is clicked
This commit is contained in:
parent
f2825ec679
commit
974df3424e
@ -66,6 +66,7 @@ define(function(require) {
|
||||
Sunstone.insertTabs();
|
||||
|
||||
_setupAccordion();
|
||||
_setupCloseDropdownsOnClick();
|
||||
_insertUserAndZoneSelector();
|
||||
|
||||
if (Config.isTabEnabled(PROVISION_TAB_ID)) {
|
||||
@ -77,6 +78,13 @@ define(function(require) {
|
||||
}
|
||||
});
|
||||
|
||||
function _setupCloseDropdownsOnClick() {
|
||||
$(document).on("click", '[data-dropdown-content] a', function() {
|
||||
var id = $(this).closest('ul').attr('id');
|
||||
$('[data-dropdown=' + id + ']').trigger('click');
|
||||
});
|
||||
}
|
||||
|
||||
function _setupAccordion() {
|
||||
$(document).on("click", ".accordion_advanced > a", function() {
|
||||
if ($(this).hasClass("active")) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user