From a0437591dbb0bcab53c5b8bc451a43ba5830c58c Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 21 Oct 2015 13:22:49 +0200 Subject: Use the normal OC.menu JS for handling the Settings menu --- core/js/js.js | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) (limited to 'core/js/js.js') diff --git a/core/js/js.js b/core/js/js.js index 00a775b8027..fe951857bdc 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. -- cgit v1.2.3