summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@owncloud.com>2015-10-21 13:22:49 +0200
committerJoas Schilling <nickvergessen@owncloud.com>2015-10-21 13:59:30 +0200
commita0437591dbb0bcab53c5b8bc451a43ba5830c58c (patch)
tree96b43b57c96dd8a0cd200f13cd184a3885f0b642 /core
parentab8616b2f85a8bdc0224deaa06de6e55d8ed2ec2 (diff)
downloadnextcloud-server-a0437591dbb0bcab53c5b8bc451a43ba5830c58c.tar.gz
nextcloud-server-a0437591dbb0bcab53c5b8bc451a43ba5830c58c.zip
Use the normal OC.menu JS for handling the Settings menu
Diffstat (limited to 'core')
-rw-r--r--core/js/js.js19
1 files changed, 1 insertions, 18 deletions
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.