summaryrefslogtreecommitdiffstats
path: root/core/js
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-02-21 15:12:42 +0100
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-03-04 14:12:29 +0100
commit15a3caedc09c33b8c3037153a4316076715ffb76 (patch)
treee2fc99abb78378bfb98a839cbc34d628afba71c9 /core/js
parent67699f95060a12d01b07cc976e0cb3db883e68b7 (diff)
downloadnextcloud-server-15a3caedc09c33b8c3037153a4316076715ffb76.tar.gz
nextcloud-server-15a3caedc09c33b8c3037153a4316076715ffb76.zip
Create special option to toggle header menu container
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'core/js')
-rw-r--r--core/js/contactsmenu.js2
-rw-r--r--core/js/js.js10
2 files changed, 7 insertions, 5 deletions
diff --git a/core/js/contactsmenu.js b/core/js/contactsmenu.js
index 9e7ec552830..b0f302e1599 100644
--- a/core/js/contactsmenu.js
+++ b/core/js/contactsmenu.js
@@ -464,7 +464,7 @@
OC.registerMenu(this._$trigger, this.$el, function() {
this._toggleVisibility(true);
- }.bind(this));
+ }.bind(this), true);
this.$el.on('beforeHide', function() {
this._toggleVisibility(false);
}.bind(this));
diff --git a/core/js/js.js b/core/js/js.js
index 89f6f465ead..3cdaab0cde9 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -678,10 +678,10 @@ var OCP = {},
* @param {jQuery} $toggle
* @param {jQuery} $menuEl
* @param {function|undefined} toggle callback invoked everytime the menu is opened
+ * @param {boolean} headerMenu is this a top right header menu?
* @returns {undefined}
*/
- registerMenu: function($toggle, $menuEl, toggle) {
- console.trace();
+ registerMenu: function($toggle, $menuEl, toggle, headerMenu) {
var self = this;
$menuEl.addClass('menu');
$toggle.on('click.menu', function(event) {
@@ -698,7 +698,9 @@ var OCP = {},
self.hideMenus();
}
- $(event.currentTarget).addClass('openedMenu');
+ if (headerMenu === true) {
+ $(event.currentTarget).parent().addClass('openedMenu');
+ }
$menuEl.slideToggle(OC.menuSpeed, toggle);
OC._currentMenu = $menuEl;
@@ -1401,7 +1403,7 @@ function initCore() {
initSessionHeartBeat();
}
- OC.registerMenu($('#expand'), $('#expanddiv'));
+ OC.registerMenu($('#expand'), $('#expanddiv'), false, true);
// toggle for menus
$(document).on('mouseup.closemenus', function(event) {