diff options
author | Christoph Wurst <ChristophWurst@users.noreply.github.com> | 2016-04-14 11:53:09 +0200 |
---|---|---|
committer | Thomas Müller <DeepDiver1975@users.noreply.github.com> | 2016-04-14 11:53:09 +0200 |
commit | a2572ffec79f7bd2fa7aa29ed48d9b011836759d (patch) | |
tree | b050e2b326de195f264128378a13cc5e594874fa /core/js | |
parent | 411fac892a86814b0625cfcbedbc2d575308cbeb (diff) | |
download | nextcloud-server-a2572ffec79f7bd2fa7aa29ed48d9b011836759d.tar.gz nextcloud-server-a2572ffec79f7bd2fa7aa29ed48d9b011836759d.zip |
add loading feedback to user menu entries (#23916)
fixes #19857
Diffstat (limited to 'core/js')
-rw-r--r-- | core/js/js.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/core/js/js.js b/core/js/js.js index 598e0dcd185..d06986dac23 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -1557,7 +1557,22 @@ function initCore() { }); } + function setupUserMenu() { + var $menu = $('#header #settings'); + + $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-dark')); + }); + } + setupMainMenu(); + setupUserMenu(); // move triangle of apps dropdown to align with app name triangle // 2 is the additional offset between the triangles |