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