summaryrefslogtreecommitdiffstats
path: root/core/js
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-03-17 20:40:22 +0100
committerVincent Petry <pvince81@owncloud.com>2014-03-17 20:44:30 +0100
commit872006da035b92b17b0a0d5da781844080861531 (patch)
tree96576d27e6c6914465216024b6bd70e1f8d12f76 /core/js
parentea8705bac8ae10b0c3c11258e83d8fb80ee616e9 (diff)
downloadnextcloud-server-872006da035b92b17b0a0d5da781844080861531.tar.gz
nextcloud-server-872006da035b92b17b0a0d5da781844080861531.zip
Only enable toggle for sidebar in mobile mode
Diffstat (limited to 'core/js')
-rw-r--r--core/js/js.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/core/js/js.js b/core/js/js.js
index 2b3a9f04770..23d16b69234 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -979,7 +979,12 @@ function initCore() {
});
// toggle the navigation on mobile
- OC.registerMenu($('#header #owncloud'), $('#navigation'));
+ if (window.matchMedia) {
+ var mq = window.matchMedia('(max-width: 600px)');
+ if (mq && mq.matches) {
+ OC.registerMenu($('#header #owncloud'), $('#navigation'));
+ }
+ }
}
$(document).ready(initCore);