|
@@ -36,6 +36,7 @@ const Default = {
|
|
|
scrollbarTheme: 'os-theme-light',
|
|
|
scrollbarAutoHide: 'l',
|
|
|
panelAutoHeight: true,
|
|
|
+ panelAutoHeightMode: 'min-height',
|
|
|
loginRegisterAutoHeight: true
|
|
|
}
|
|
|
|
|
@@ -81,15 +82,15 @@ class Layout {
|
|
|
|
|
|
if (offset !== false) {
|
|
|
if (max === heights.controlSidebar) {
|
|
|
- $contentSelector.css('min-height', (max + offset))
|
|
|
+ $contentSelector.css(this._config.panelAutoHeightMode, (max + offset))
|
|
|
} else if (max === heights.window) {
|
|
|
- $contentSelector.css('min-height', (max + offset) - heights.header - heights.footer)
|
|
|
+ $contentSelector.css(this._config.panelAutoHeightMode, (max + offset) - heights.header - heights.footer)
|
|
|
} else {
|
|
|
- $contentSelector.css('min-height', (max + offset) - heights.header)
|
|
|
+ $contentSelector.css(this._config.panelAutoHeightMode, (max + offset) - heights.header)
|
|
|
}
|
|
|
|
|
|
if (this._isFooterFixed()) {
|
|
|
- $contentSelector.css('min-height', parseFloat($contentSelector.css('min-height')) + heights.footer)
|
|
|
+ $contentSelector.css(this._config.panelAutoHeightMode, parseFloat($contentSelector.css(this._config.panelAutoHeightMode)) + heights.footer)
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -98,7 +99,7 @@ class Layout {
|
|
|
}
|
|
|
|
|
|
if (offset !== false) {
|
|
|
- $contentSelector.css('min-height', (max + offset) - heights.header - heights.footer)
|
|
|
+ $contentSelector.css(this._config.panelAutoHeightMode, (max + offset) - heights.header - heights.footer)
|
|
|
}
|
|
|
|
|
|
if (typeof $.fn.overlayScrollbars !== 'undefined') {
|
|
@@ -123,8 +124,8 @@ class Layout {
|
|
|
} else {
|
|
|
const boxHeight = $selector.height()
|
|
|
|
|
|
- if ($body.css('min-height') !== boxHeight) {
|
|
|
- $body.css('min-height', boxHeight)
|
|
|
+ if ($body.css(this._config.panelAutoHeightMode) !== boxHeight) {
|
|
|
+ $body.css(this._config.panelAutoHeightMode, boxHeight)
|
|
|
}
|
|
|
}
|
|
|
}
|