summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Wurst <ChristophWurst@users.noreply.github.com>2016-04-14 11:53:09 +0200
committerThomas Müller <DeepDiver1975@users.noreply.github.com>2016-04-14 11:53:09 +0200
commita2572ffec79f7bd2fa7aa29ed48d9b011836759d (patch)
treeb050e2b326de195f264128378a13cc5e594874fa
parent411fac892a86814b0625cfcbedbc2d575308cbeb (diff)
downloadnextcloud-server-a2572ffec79f7bd2fa7aa29ed48d9b011836759d.tar.gz
nextcloud-server-a2572ffec79f7bd2fa7aa29ed48d9b011836759d.zip
add loading feedback to user menu entries (#23916)
fixes #19857
-rw-r--r--core/css/header.css6
-rw-r--r--core/js/js.js15
2 files changed, 21 insertions, 0 deletions
diff --git a/core/css/header.css b/core/css/header.css
index 5a5acb269ab..083f6f350ea 100644
--- a/core/css/header.css
+++ b/core/css/header.css
@@ -294,6 +294,12 @@
color: #bbb;
cursor: pointer;
}
+#settings .icon-loading-dark {
+ display: inline-block;
+ margin-bottom: -3px;
+ margin-right: 6px;
+ background-size: 16px 16px;
+}
#expand {
display: block;
padding: 7px 30px 6px 10px;
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