Fix for sidebar collapse/expand and window resizing
This commit is contained in:
parent
c406c35ff7
commit
70a7142877
@ -4,7 +4,7 @@
|
|||||||
@include('adminlte::layouts.partials.htmlheader')
|
@include('adminlte::layouts.partials.htmlheader')
|
||||||
@show
|
@show
|
||||||
|
|
||||||
<body class="hold-transition sidebar-mini">
|
<body class="hold-transition sidebar-mini @if (Cookie::get('toggleState') === 'closed') {{ 'sidebar-collapse' }} @endif">
|
||||||
<div id="app">
|
<div id="app">
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
@include('adminlte::layouts.partials.mainheader')
|
@include('adminlte::layouts.partials.mainheader')
|
||||||
|
@ -25,15 +25,25 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
$("body").on("collapsed.lte.pushmenu", function(){
|
$("body").on("collapsed.lte.pushmenu", function(){
|
||||||
if($.AdminLTESidebarTweak.options.EnableRemember){
|
if($.AdminLTESidebarTweak.options.EnableRemember) {
|
||||||
document.cookie = "toggleState=closed";
|
document.cookie = "toggleState=closed;path=/";
|
||||||
|
|
||||||
|
$("body").delay(500).queue(function () {
|
||||||
|
window.dispatchEvent(new Event('resize'));
|
||||||
|
$(this).dequeue();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// @todo this is not firing.
|
// @todo this is not firing.
|
||||||
$("body").on("expanded.lte.pushmenu", function(){
|
$("body").on("shown.lte.pushmenu", function(){
|
||||||
if($.AdminLTESidebarTweak.options.EnableRemember){
|
if($.AdminLTESidebarTweak.options.EnableRemember){
|
||||||
document.cookie = "toggleState=opened";
|
document.cookie = "toggleState=opened;path=/";
|
||||||
|
|
||||||
|
$("body").delay(500).queue(function () {
|
||||||
|
window.dispatchEvent(new Event('resize'));
|
||||||
|
$(this).dequeue();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user