|
|
|
@ -38,6 +38,7 @@ const Selector = {
|
|
|
|
|
const ClassName = { |
|
|
|
|
COLLAPSED: 'sidebar-collapse', |
|
|
|
|
OPEN: 'sidebar-open', |
|
|
|
|
IS_OPENING: 'sidebar-is-opening', |
|
|
|
|
CLOSED: 'sidebar-closed' |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -67,7 +68,7 @@ class PushMenu {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$(Selector.BODY).removeClass(ClassName.COLLAPSED).removeClass(ClassName.CLOSED) |
|
|
|
|
$(Selector.BODY).addClass(ClassName.IS_OPENING).removeClass(`${ClassName.COLLAPSED} ${ClassName.CLOSED}`) |
|
|
|
|
|
|
|
|
|
if (this._options.enableRemember) { |
|
|
|
|
localStorage.setItem(`remember${EVENT_KEY}`, ClassName.OPEN) |
|
|
|
@ -83,7 +84,7 @@ class PushMenu {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$(Selector.BODY).addClass(ClassName.COLLAPSED) |
|
|
|
|
$(Selector.BODY).removeClass(ClassName.IS_OPENING).addClass(ClassName.COLLAPSED) |
|
|
|
|
|
|
|
|
|
if (this._options.enableRemember) { |
|
|
|
|
localStorage.setItem(`remember${EVENT_KEY}`, ClassName.COLLAPSED) |
|
|
|
|