Merge pull request #5414 from pichalite/fix-acp

Fix ACP layout on tablets
v1.18.x
Julian Lam 8 years ago committed by GitHub
commit 9ceeff6f0a

@ -1,5 +1,5 @@
"use strict";
/*global config, componentHandler, socket, app, bootbox, Slideout, NProgress*/
/*global config, componentHandler, socket, app, bootbox, Slideout, NProgress, utils*/
(function () {
var logoutTimer = 0;
@ -176,6 +176,8 @@
}
function configureSlidemenu() {
var env = utils.findBootstrapEnvironment();
var slideout = new Slideout({
'panel': document.getElementById('panel'),
'menu': document.getElementById('menu'),
@ -183,6 +185,10 @@
'tolerance': 70
});
if (env === 'md' || env === 'lg') {
slideout.disableTouch();
}
$('#mobile-menu').on('click', function () {
slideout.toggle();
});
@ -193,6 +199,20 @@
$(window).on('resize', function () {
slideout.close();
env = utils.findBootstrapEnvironment();
if (env === 'md' || env === 'lg') {
slideout.disableTouch();
$('#header').css({
'position': 'relative'
});
} else {
slideout.enableTouch();
$('#header').css({
'position': 'fixed'
});
}
});
function onOpeningMenu() {
@ -202,9 +222,7 @@
});
}
slideout.on('beforeopen', onOpeningMenu);
slideout.on('open', onOpeningMenu);
slideout.on('translate', onOpeningMenu);
slideout.on('close', function () {
$('#header').css({

File diff suppressed because one or more lines are too long

@ -1,4 +1,4 @@
<nav id="menu" class="visible-xs visible-sm">
<nav id="menu" class="hidden-md hidden-lg">
<section class="menu-section">
<h3 class="menu-section-title">[[admin/menu:section-general]]</h3>
<ul class="menu-section-list">

Loading…
Cancel
Save