summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Pulzer <t.pulzer@kniel.de>2016-07-29 11:31:46 +0200
committerMorris Jobke <hey@morrisjobke.de>2016-08-09 11:58:32 +0200
commit1ab9477ac1c89821cbf397eacc647ee8be1f3379 (patch)
tree8eedc0575a0e932abc54f46db71005b03e5dbe11
parentc04b0364acecc3b9c9bf5ee37d0e7db5b5b5234a (diff)
downloadnextcloud-server-1ab9477ac1c89821cbf397eacc647ee8be1f3379.tar.gz
nextcloud-server-1ab9477ac1c89821cbf397eacc647ee8be1f3379.zip
Fixed user menu to not show spinner on ctrl+click.
Fixes #616
-rw-r--r--core/js/js.js13
1 files changed, 10 insertions, 3 deletions
diff --git a/core/js/js.js b/core/js/js.js
index d2bbbae6362..31d5b87712c 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -1519,14 +1519,21 @@ function initCore() {
function setupUserMenu() {
var $menu = $('#header #settings');
+ // show loading feedback
$menu.delegate('a', 'click', function(event) {
var $page = $(event.target);
if (!$page.is('a')) {
$page = $page.closest('a');
}
- $page.find('img').remove();
- $page.find('div').remove(); // prevent odd double-clicks
- $page.prepend($('<div/>').addClass('icon-loading-small-dark'));
+ if(!event.ctrlKey) {
+ $page.find('img').remove();
+ $page.find('div').remove(); // prevent odd double-clicks
+ $page.prepend($('<div/>').addClass('icon-loading-small-dark'));
+ } else {
+ // Close navigation when opening menu entry in
+ // a new tab
+ OC.hideMenus();
+ }
});
}