summaryrefslogtreecommitdiffstats
path: root/core/js/js.js
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2015-08-11 11:35:46 +0200
committerVincent Petry <pvince81@owncloud.com>2015-08-11 11:35:46 +0200
commit984ae8140d986e93a2fcea5951436e95c8e2c603 (patch)
tree3a44d5c7889ac77dd463e296a767517f93888f72 /core/js/js.js
parenta5aa03a1a6c0f659c0528253d28c63f759d1ed50 (diff)
downloadnextcloud-server-984ae8140d986e93a2fcea5951436e95c8e2c603.tar.gz
nextcloud-server-984ae8140d986e93a2fcea5951436e95c8e2c603.zip
Fixed file actions menu to close when reclicking trigger
FileActionsMenu is now a backbone view. The trigger and highlight handling is now done in the FileActions.showMenu() method using events.
Diffstat (limited to 'core/js/js.js')
-rw-r--r--core/js/js.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/core/js/js.js b/core/js/js.js
index 25baafde08f..89bb9a71430 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -611,9 +611,14 @@ var OC={
*/
hideMenus: function(complete) {
if (OC._currentMenu) {
+ var lastMenu = OC._currentMenu;
OC._currentMenu.trigger(new $.Event('beforeHide'));
- OC._currentMenu.slideUp(OC.menuSpeed, complete);
- OC._currentMenu.trigger(new $.Event('afterHide'));
+ OC._currentMenu.slideUp(OC.menuSpeed, function() {
+ lastMenu.trigger(new $.Event('afterHide'));
+ if (complete) {
+ complete.apply(this, arguments);
+ }
+ });
}
OC._currentMenu = null;
OC._currentMenuToggle = null;