From 79d2d02b41884ead740f6cf61b2df2ef278a9f5e Mon Sep 17 00:00:00 2001 From: Daniel Molina Date: Fri, 14 Mar 2014 15:23:36 +0100 Subject: [PATCH] feature #2746: Close drop downs on click --- src/sunstone/public/js/plugins/config-tab.js | 1 + src/sunstone/public/js/sunstone.js | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/sunstone/public/js/plugins/config-tab.js b/src/sunstone/public/js/plugins/config-tab.js index b5a96813b7..94dbc4e164 100644 --- a/src/sunstone/public/js/plugins/config-tab.js +++ b/src/sunstone/public/js/plugins/config-tab.js @@ -495,6 +495,7 @@ $(document).ready(function(){ setupUpdatePassword(); $(".user-zone-info a.configuration").click(function(){ + $(document).foundation('dropdown', 'closeall'); fillUserInfo(); OpenNebula.Group.list( diff --git a/src/sunstone/public/js/sunstone.js b/src/sunstone/public/js/sunstone.js index 2a4adb8437..d56b7a289e 100644 --- a/src/sunstone/public/js/sunstone.js +++ b/src/sunstone/public/js/sunstone.js @@ -3644,6 +3644,8 @@ $(document).ready(function(){ value = $(this).attr('href'); } + $(document).foundation('dropdown', 'closeall'); + var action = SunstoneCfg["actions"][value]; if (!action) { notifyError("Action "+value+" not defined."); @@ -3672,6 +3674,7 @@ $(document).ready(function(){ //Listen .confirm_buttons. These buttons show a confirmation dialog //before running the action. $('.confirm_button',main_tabs_context).live("click",function(){ + $(document).foundation('dropdown', 'closeall'); popUpConfirmDialog(this); return false; }); @@ -3679,6 +3682,7 @@ $(document).ready(function(){ //Listen .confirm_buttons. These buttons show a confirmation dialog //with a select box before running the action. $('.confirm_with_select_button',main_tabs_context).live("click",function(){ + $(document).foundation('dropdown', 'closeall'); popUpConfirmWithSelectDialog(this); return false; }); @@ -3732,7 +3736,7 @@ $(document).ready(function(){ $(document).foundation({ reveal : { animation: 'fade', - animation_speed: 250 + animation_speed: 150 } }) });