diff options
author | Morris Jobke <hey@morrisjobke.de> | 2016-08-18 11:46:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-18 11:46:00 +0200 |
commit | 8e08b8c04e3dff0e44231bb80f6db12a6dbc4b53 (patch) | |
tree | 5da1f6929cdd45ca4546e5cb749a3495d256d0b7 /core | |
parent | 5580a77bd703877541687b72d7ab4ec50b2b0c7d (diff) | |
download | nextcloud-server-8e08b8c04e3dff0e44231bb80f6db12a6dbc4b53.tar.gz nextcloud-server-8e08b8c04e3dff0e44231bb80f6db12a6dbc4b53.zip |
Revert "Fixing infinite spinning animation on user menu ctrl+click"
Diffstat (limited to 'core')
-rw-r--r-- | core/js/js.js | 34 |
1 files changed, 9 insertions, 25 deletions
diff --git a/core/js/js.js b/core/js/js.js index ea621123fb0..4e8d3a01416 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -1501,21 +1501,17 @@ function initCore() { $navigation.hide(); // show loading feedback - $navigation.delegate('a', 'mousedown', function(event) { + $navigation.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) { + if(!event.ctrlKey) { $app.addClass('app-loading'); } else { - // On middle click or on first button click with ctrl key or meta key hold - if(event.which === 2 || (event.which === 1 && (event.ctrlKey || event.metaKey))) { - // Close navigation when opening app in - // a new tab - OC.hideMenus(); - window.open($app, '_blank'); - } + // Close navigation when opening app in + // a new tab + OC.hideMenus(); } }); } @@ -1523,26 +1519,14 @@ function initCore() { function setupUserMenu() { var $menu = $('#header #settings'); - // show loading feedback - $menu.delegate('a', 'mousedown', function(event) { + $menu.delegate('a', 'click', function(event) { var $page = $(event.target); if (!$page.is('a')) { $page = $page.closest('a'); } - if(event.which === 1 && !event.ctrlKey && !event.metaKey) { - $page.find('img').remove(); - $page.find('div').remove(); // prevent odd double-clicks - $page.prepend($('<div/>').addClass('icon-loading-small-dark')); - } else { - // On middle click or on first button click with ctrl key or meta key hold - if(event.which === 2 || (event.which === 1 && (event.ctrlKey || event.metaKey))) { - // Close navigation when opening menu entry in - // a new tab - OC.hideMenus(); - window.open($page, '_blank'); - } - } - $($page).click(); + $page.find('img').remove(); + $page.find('div').remove(); // prevent odd double-clicks + $page.prepend($('<div/>').addClass('icon-loading-small-dark')); }); } |