mirror of https://github.com/ColorlibHQ/AdminLTE
renamed option `slide` to `controlsidebarSlide` and tweaked a bit the animate step
parent
ac6a58c118
commit
fd8183c965
|
@ -34,7 +34,7 @@ const ControlSidebar = (($) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const Default = {
|
const Default = {
|
||||||
slide: true
|
controlsidebarSlide: true
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -52,11 +52,11 @@ const ControlSidebar = (($) => {
|
||||||
|
|
||||||
show() {
|
show() {
|
||||||
// Show the control sidebar
|
// Show the control sidebar
|
||||||
if (this._config.slide) {
|
if (this._config.controlsidebarSlide) {
|
||||||
$('html').addClass(ClassName.CONTROL_SIDEBAR_ANIMATE)
|
$('html').addClass(ClassName.CONTROL_SIDEBAR_ANIMATE)
|
||||||
$('body').removeClass(ClassName.CONTROL_SIDEBAR_SLIDE).delay(300).queue(function(){
|
$('body').removeClass(ClassName.CONTROL_SIDEBAR_SLIDE).delay(50).queue(function(){
|
||||||
$(Selector.CONTROL_SIDEBAR).hide()
|
|
||||||
$('html').removeClass(ClassName.CONTROL_SIDEBAR_ANIMATE)
|
$('html').removeClass(ClassName.CONTROL_SIDEBAR_ANIMATE)
|
||||||
|
$(Selector.CONTROL_SIDEBAR).fadeOut()
|
||||||
$(this).dequeue()
|
$(this).dequeue()
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
@ -66,10 +66,10 @@ const ControlSidebar = (($) => {
|
||||||
|
|
||||||
collapse() {
|
collapse() {
|
||||||
// Collapse the control sidebar
|
// Collapse the control sidebar
|
||||||
if (this._config.slide) {
|
if (this._config.controlsidebarSlide) {
|
||||||
$('html').addClass(ClassName.CONTROL_SIDEBAR_ANIMATE)
|
$('html').addClass(ClassName.CONTROL_SIDEBAR_ANIMATE)
|
||||||
$(Selector.CONTROL_SIDEBAR).show().delay(100).queue(function(){
|
$(Selector.CONTROL_SIDEBAR).show().delay(50).queue(function(){
|
||||||
$('body').addClass(ClassName.CONTROL_SIDEBAR_SLIDE).delay(300).queue(function(){
|
$('body').addClass(ClassName.CONTROL_SIDEBAR_SLIDE).delay(50).queue(function(){
|
||||||
$('html').removeClass(ClassName.CONTROL_SIDEBAR_ANIMATE)
|
$('html').removeClass(ClassName.CONTROL_SIDEBAR_ANIMATE)
|
||||||
$(this).dequeue()
|
$(this).dequeue()
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue