Only enable toggle for sidebar in mobile mode

This commit is contained in:
Vincent Petry 2014-03-17 20:40:22 +01:00
parent ea8705bac8
commit 872006da03
1 changed files with 6 additions and 1 deletions

View File

@ -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);