diff options
author | Joas Schilling <nickvergessen@owncloud.com> | 2015-10-21 13:22:49 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@owncloud.com> | 2015-11-06 08:42:37 +0100 |
commit | b08861c603e57b7d535be6733e51f6b1d2aae71a (patch) | |
tree | f8c004bf4eb1715622219c1db9ce8009eba56e15 /core/js | |
parent | d732a7b32f13aaa3aa38378799dd25a99f606f6a (diff) | |
download | nextcloud-server-b08861c603e57b7d535be6733e51f6b1d2aae71a.tar.gz nextcloud-server-b08861c603e57b7d535be6733e51f6b1d2aae71a.zip |
Use the normal OC.menu JS for handling the Settings menu
Diffstat (limited to 'core/js')
-rw-r--r-- | core/js/js.js | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/core/js/js.js b/core/js/js.js index 956fbecb167..460f65256a9 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -1275,23 +1275,7 @@ function initCore() { SVGSupport.checkMimeType(); } - // user menu - $('#settings #expand').keydown(function(event) { - if (event.which === 13 || event.which === 32) { - $('#expand').click(); - } - }); - $('#settings #expand').click(function(event) { - $('#settings #expanddiv').slideToggle(OC.menuSpeed); - event.stopPropagation(); - }); - $('#settings #expanddiv').click(function(event){ - event.stopPropagation(); - }); - //hide the user menu when clicking outside it - $(document).click(function(){ - $('#settings #expanddiv').slideUp(OC.menuSpeed); - }); + OC.registerMenu($('#expand'), $('#expanddiv')); // toggle for menus $(document).on('mouseup.closemenus', function(event) { @@ -1304,7 +1288,6 @@ function initCore() { OC.hideMenus(); }); - /** * Set up the main menu toggle to react to media query changes. * If the screen is small enough, the main menu becomes a toggle. |