aboutsummaryrefslogtreecommitdiffstats
path: root/core/js/js.js
diff options
context:
space:
mode:
Diffstat (limited to 'core/js/js.js')
-rw-r--r--core/js/js.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/core/js/js.js b/core/js/js.js
index 5fdafa6e412..95c00dd6448 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -1398,6 +1398,7 @@ function initCore() {
// toggle the navigation
var $toggle = $('#header .header-appname-container');
var $navigation = $('#navigation');
+ var $appmenu = $('#appmenu');
// init the menu
OC.registerMenu($toggle, $navigation);
@@ -1427,6 +1428,20 @@ function initCore() {
OC.hideMenus(function(){return false});
}
});
+
+ $appmenu.delegate('a', 'click', function(event) {
+ var $app = $(event.target);
+ if(!$app.is('a')) {
+ $app = $app.closest('a');
+ }
+ if(event.which === 1 && !event.ctrlKey && !event.metaKey) {
+ $app.addClass('app-loading');
+ } else {
+ // Close navigation when opening app in
+ // a new tab
+ OC.hideMenus(function(){return false});
+ }
+ });
}
function setupUserMenu() {