toggle the navigation on desktop, not only on mobile

This commit is contained in:
Jan-Christoph Borchardt 2014-05-16 16:04:36 +02:00
parent e2e05c4798
commit 19d7d87964

View file

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