mirror of https://github.com/ColorlibHQ/AdminLTE
fixed sidebar state remember to work in both ways
parent
cac5828617
commit
a99c9b7959
|
@ -94,9 +94,6 @@ const Layout = (($) => {
|
|||
// Private
|
||||
|
||||
_init() {
|
||||
// Enable transitions
|
||||
$('body').removeClass(ClassName.HOLD)
|
||||
|
||||
// Activate layout height watcher
|
||||
this.fixLayoutHeight()
|
||||
$(Selector.SIDEBAR)
|
||||
|
|
|
@ -120,12 +120,21 @@ const PushMenu = (($) => {
|
|||
var toggleState = localStorage.getItem(`remember${EVENT_KEY}`);
|
||||
if (toggleState == ClassName.COLLAPSED){
|
||||
if (this._options.noTransitionAfterReload) {
|
||||
$("body").addClass('hold-transition').addClass(ClassName.COLLAPSED).delay(10).queue(function() {
|
||||
$("body").addClass('hold-transition').addClass(ClassName.COLLAPSED).delay(50).queue(function() {
|
||||
$(this).removeClass('hold-transition');
|
||||
$(this).dequeue()
|
||||
});
|
||||
} else {
|
||||
$("body").addClass(ClassName.COLLAPSED);
|
||||
}
|
||||
} else {
|
||||
if (this._options.noTransitionAfterReload) {
|
||||
$("body").addClass('hold-transition').removeClass(ClassName.COLLAPSED).delay(50).queue(function() {
|
||||
$(this).removeClass('hold-transition');
|
||||
$(this).dequeue()
|
||||
});
|
||||
} else {
|
||||
$("body").addClass(ClassName.COLLAPSED);
|
||||
$("body").removeClass(ClassName.COLLAPSED);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue