aboutsummaryrefslogtreecommitdiffstats
path: root/core
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
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')
-rw-r--r--core/css/header.scss2
-rw-r--r--core/js/contactsmenu.js2
-rw-r--r--core/js/js.js10
-rw-r--r--core/templates/layout.user.php2
4 files changed, 9 insertions, 7 deletions
diff --git a/core/css/header.scss b/core/css/header.scss
index ff34f1db357..a2c91d00ee4 100644
--- a/core/css/header.scss
+++ b/core/css/header.scss
@@ -461,7 +461,7 @@ nav {
opacity: .6;
}
}
- .app-loading .icon-loading-small {
+ .app-loading .icon-loading-small-dark {
top: 12px;
width: 20px;
height: 20px;
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) {
diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php
index c8c8ec84efa..e11620a3111 100644
--- a/core/templates/layout.user.php
+++ b/core/templates/layout.user.php
@@ -80,7 +80,7 @@
<defs><filter id="invertMenuMore-<?php p($entry['id']); ?>"><feColorMatrix in="SourceGraphic" type="matrix" values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0"></feColorMatrix></filter></defs>
<image x="0" y="0" width="16" height="16" preserveAspectRatio="xMinYMin meet" filter="url(#invertMenuMore-<?php p($entry['id']); ?>)" xlink:href="<?php print_unescaped($entry['icon'] . '?v=' . $_['versionHash']); ?>" class="app-icon"></image>
</svg>
- <div class="icon-loading-small-dark" style="display:none;"></div>
+ <div class="icon-loading-small" style="display:none;"></div>
<span><?php p($entry['name']); ?></span>
</a>
</li>