Fixed user menu to not show spinner on ctrl+click.

Fixes #616
This commit is contained in:
Thomas Pulzer 2016-07-29 11:31:46 +02:00 committed by Morris Jobke
parent c04b0364ac
commit 1ab9477ac1
No known key found for this signature in database
GPG key ID: 9CE5ED29E7FCD38A

View file

@ -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();
}
});
}