mirror of https://github.com/ColorlibHQ/AdminLTE
Layout Height Fixed (#3214)
parent
c426c01389
commit
077599d1cc
|
@ -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
|
||||
|
|
|
@ -579,6 +579,8 @@ body:not(.layout-fixed) {
|
|||
|
||||
.control-sidebar-content {
|
||||
height: calc(100vh - #{$main-header-height});
|
||||
overflow-y: auto;
|
||||
scrollbar-width: thin;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue