added panelAutoHeight option to Layout.js
This commit is contained in:
25
dist/js/adminlte.js
vendored
25
dist/js/adminlte.js
vendored
@@ -327,6 +327,7 @@
|
||||
var Default = {
|
||||
scrollbarTheme: 'os-theme-light',
|
||||
scrollbarAutoHide: 'l',
|
||||
panelAutoHeight: true,
|
||||
loginRegisterAutoHeight: true
|
||||
};
|
||||
/**
|
||||
@@ -368,16 +369,26 @@
|
||||
|
||||
var max = this._max(heights);
|
||||
|
||||
if (max == heights.control_sidebar) {
|
||||
$(Selector.CONTENT).css('min-height', max);
|
||||
} else if (max == heights.window) {
|
||||
$(Selector.CONTENT).css('min-height', max - heights.header - heights.footer);
|
||||
} else {
|
||||
$(Selector.CONTENT).css('min-height', max - heights.header);
|
||||
var offset = this._config.panelAutoHeight;
|
||||
|
||||
if (offset === true) {
|
||||
offset = 0;
|
||||
}
|
||||
|
||||
if (offset !== false) {
|
||||
if (max == heights.control_sidebar) {
|
||||
$(Selector.CONTENT).css('min-height', max + offset);
|
||||
} else if (max == heights.window) {
|
||||
$(Selector.CONTENT).css('min-height', max + offset - heights.header - heights.footer);
|
||||
} else {
|
||||
$(Selector.CONTENT).css('min-height', max + offset - heights.header);
|
||||
}
|
||||
}
|
||||
|
||||
if ($('body').hasClass(ClassName.LAYOUT_FIXED)) {
|
||||
$(Selector.CONTENT).css('min-height', max - heights.header - heights.footer);
|
||||
if (offset !== false) {
|
||||
$(Selector.CONTENT).css('min-height', max + offset - heights.header - heights.footer);
|
||||
}
|
||||
|
||||
if (typeof $.fn.overlayScrollbars !== 'undefined') {
|
||||
$(Selector.SIDEBAR).overlayScrollbars({
|
||||
|
||||
2
dist/js/adminlte.js.map
vendored
2
dist/js/adminlte.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/js/adminlte.min.js
vendored
2
dist/js/adminlte.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/js/adminlte.min.js.map
vendored
2
dist/js/adminlte.min.js.map
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user