|
|
|
@ -50,8 +50,6 @@ class Layout {
|
|
|
|
|
constructor(element, config) {
|
|
|
|
|
this._config = config
|
|
|
|
|
this._element = element
|
|
|
|
|
|
|
|
|
|
this._init()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Public
|
|
|
|
@ -90,10 +88,6 @@ class Layout {
|
|
|
|
|
$contentSelector.css(this._config.panelAutoHeightMode, (max + offset) - heights.header)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (heights.controlSidebar + heights.footer >= heights.sidebar && heights.controlSidebar != 0) {
|
|
|
|
|
$contentSelector.css(this._config.panelAutoHeightMode, (heights.controlSidebar + offset))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (this._isFooterFixed()) {
|
|
|
|
|
$contentSelector.css(this._config.panelAutoHeightMode, parseFloat($contentSelector.css(this._config.panelAutoHeightMode)) + heights.footer)
|
|
|
|
|
}
|
|
|
|
@ -103,10 +97,6 @@ class Layout {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (offset !== false) {
|
|
|
|
|
$contentSelector.css(this._config.panelAutoHeightMode, (max + offset) - heights.header - heights.footer)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (typeof $.fn.overlayScrollbars !== 'undefined') {
|
|
|
|
|
$(SELECTOR_SIDEBAR).overlayScrollbars({
|
|
|
|
|
className: this._config.scrollbarTheme,
|
|
|
|
@ -180,10 +170,6 @@ class Layout {
|
|
|
|
|
this.fixLayoutHeight()
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
$(document).ready(() => {
|
|
|
|
|
this.fixLayoutHeight()
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
$('body.hold-transition').removeClass('hold-transition')
|
|
|
|
|
}, 50)
|
|
|
|
@ -236,13 +222,13 @@ $(window).on('load', () => {
|
|
|
|
|
Layout._jQueryInterface.call($('body'))
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
$(`${SELECTOR_SIDEBAR} a`).on('focusin', () => {
|
|
|
|
|
$(SELECTOR_MAIN_SIDEBAR).addClass(CLASS_NAME_SIDEBAR_FOCUSED)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
$(`${SELECTOR_SIDEBAR} a`).on('focusout', () => {
|
|
|
|
|
$(SELECTOR_MAIN_SIDEBAR).removeClass(CLASS_NAME_SIDEBAR_FOCUSED)
|
|
|
|
|
})
|
|
|
|
|
$(`${SELECTOR_SIDEBAR} a`)
|
|
|
|
|
.on('focusin', () => {
|
|
|
|
|
$(SELECTOR_MAIN_SIDEBAR).addClass(CLASS_NAME_SIDEBAR_FOCUSED)
|
|
|
|
|
})
|
|
|
|
|
.on('focusout', () => {
|
|
|
|
|
$(SELECTOR_MAIN_SIDEBAR).removeClass(CLASS_NAME_SIDEBAR_FOCUSED)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* jQuery API
|
|
|
|
|