sidebar upgradeed (#3159)

Removed Unnecessary Code
And
Sidebar improved (Can work smothly without overlayscroll plugin)
This commit is contained in:
Daniel 2020-11-27 13:51:15 +05:30 committed by GitHub
parent b835bb678b
commit 48ceaed751
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 7 deletions

View file

@ -32,7 +32,6 @@ const CLASS_NAME_SIDEBAR_FOCUSED = 'sidebar-focused'
const CLASS_NAME_LAYOUT_FIXED = 'layout-fixed'
const CLASS_NAME_CONTROL_SIDEBAR_SLIDE_OPEN = 'control-sidebar-slide-open'
const CLASS_NAME_CONTROL_SIDEBAR_OPEN = 'control-sidebar-open'
const CLASS_NAME_LAYOUT_TOP_NAV = 'layout-top-nav'
const Default = {
scrollbarTheme: 'os-theme-light',
@ -84,11 +83,7 @@ class Layout {
if (offset !== false) {
if (max === heights.controlSidebar) {
if ($body.hasClass(CLASS_NAME_LAYOUT_TOP_NAV)) {
$contentSelector.css(this._config.panelAutoHeightMode, (max + offset) - heights.header - heights.footer)
} else {
$contentSelector.css(this._config.panelAutoHeightMode, (max + offset))
}
$contentSelector.css(this._config.panelAutoHeightMode, (max + offset))
} else if (max === heights.window) {
$contentSelector.css(this._config.panelAutoHeightMode, (max + offset) - heights.header - heights.footer)
} else {
@ -121,6 +116,8 @@ class Layout {
clickScrolling: true
}
})
} else {
$(SELECTOR_SIDEBAR).css('overflow-y', 'auto')
}
}

View file

@ -528,7 +528,7 @@ body:not(.sidebar-mini-md) {
}
}
:not(.layout-fixed) {
body:not(.layout-fixed) {
.main-sidebar {
height: inherit;
min-height: 100%;

View file

@ -20,6 +20,7 @@
.sidebar {
height: calc(100% - (#{$main-header-height-inner} + #{$main-header-bottom-border-width}));
overflow-y: initial;
scrollbar-width: thin;
padding-bottom: $sidebar-padding-y;
padding-left: $sidebar-padding-x;
padding-right: $sidebar-padding-x;