summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan-Christoph Borchardt <hey@jancborchardt.net>2014-05-16 16:04:36 +0200
committerJan-Christoph Borchardt <hey@jancborchardt.net>2014-06-04 14:29:46 +0200
commit19d7d8796461a36dc9f73f3fe2e55df9c87bb1f7 (patch)
treea8562ddfdd4377407bee9c3a16a3c6a2866d5eb0
parente2e05c4798a1c7aff439b2d91d6578e2fcc49260 (diff)
downloadnextcloud-server-19d7d8796461a36dc9f73f3fe2e55df9c87bb1f7.tar.gz
nextcloud-server-19d7d8796461a36dc9f73f3fe2e55df9c87bb1f7.zip
toggle the navigation on desktop, not only on mobile
-rw-r--r--core/js/js.js10
1 files changed, 2 insertions, 8 deletions
diff --git a/core/js/js.js b/core/js/js.js
index 834916b2e3f..67da7915cfb 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -1111,18 +1111,12 @@ function initCore() {
* If the screen is bigger, the main menu is not a toggle any more.
*/
function setupMainMenu() {
- // toggle the navigation on mobile
- if (!OC._matchMedia) {
- return;
- }
- var mq = OC._matchMedia('(max-width: 768px)');
- var lastMatch = mq.matches;
+ // toggle the navigation
var $toggle = $('#header #owncloud');
var $navigation = $('#navigation');
function updateMainMenu() {
- // mobile mode ?
- if (lastMatch && !$toggle.hasClass('menutoggle')) {
+ if (!$toggle.hasClass('menutoggle')) {
// init the menu
OC.registerMenu($toggle, $navigation);
$toggle.data('oldhref', $toggle.attr('href'));