diff options
-rw-r--r-- | core/css/header.css | 6 | ||||
-rw-r--r-- | core/js/js.js | 15 |
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 |