Use the normal OC.menu JS for handling the Settings menu
This commit is contained in:
parent
ab8616b2f8
commit
a0437591db
1 changed files with 1 additions and 18 deletions
|
@ -1275,23 +1275,7 @@ function initCore() {
|
||||||
SVGSupport.checkMimeType();
|
SVGSupport.checkMimeType();
|
||||||
}
|
}
|
||||||
|
|
||||||
// user menu
|
OC.registerMenu($('#expand'), $('#expanddiv'));
|
||||||
$('#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);
|
|
||||||
});
|
|
||||||
|
|
||||||
// toggle for menus
|
// toggle for menus
|
||||||
$(document).on('mouseup.closemenus', function(event) {
|
$(document).on('mouseup.closemenus', function(event) {
|
||||||
|
@ -1304,7 +1288,6 @@ function initCore() {
|
||||||
OC.hideMenus();
|
OC.hideMenus();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set up the main menu toggle to react to media query changes.
|
* Set up the main menu toggle to react to media query changes.
|
||||||
* If the screen is small enough, the main menu becomes a toggle.
|
* If the screen is small enough, the main menu becomes a toggle.
|
||||||
|
|
Loading…
Reference in a new issue