fixed scroll top bug in fixed layout mode

pull/3406/head
REJack 5 years ago
parent f6a5d05c90
commit a1734eabda
No known key found for this signature in database
GPG Key ID: 9F3976CC630CC888

@ -23,6 +23,8 @@
layoutBoxed : '.layout-boxed', layoutBoxed : '.layout-boxed',
mainFooter : '.main-footer', mainFooter : '.main-footer',
mainHeader : '.main-header', mainHeader : '.main-header',
mainSidebar : '.main-sidebar',
slimScrollDiv : 'slimScrollDiv',
sidebar : '.sidebar', sidebar : '.sidebar',
controlSidebar: '.control-sidebar', controlSidebar: '.control-sidebar',
fixed : '.fixed', fixed : '.fixed',
@ -130,9 +132,11 @@
// $(Selector.sidebar).slimScroll({ destroy: true }).height('auto') // $(Selector.sidebar).slimScroll({ destroy: true }).height('auto')
// Add slimscroll // Add slimscroll
$(Selector.sidebar).slimScroll({ if ($(Selector.mainSidebar).find(Selector.slimScrollDiv).length === 0) {
height: ($(window).height() - $(Selector.mainHeader).height()) + 'px' $(Selector.sidebar).slimScroll({
}); height: ($(window).height() - $(Selector.mainHeader).height()) + 'px'
});
}
} }
} }
}; };

@ -986,6 +986,8 @@ throw new Error('AdminLTE requires jQuery')
layoutBoxed : '.layout-boxed', layoutBoxed : '.layout-boxed',
mainFooter : '.main-footer', mainFooter : '.main-footer',
mainHeader : '.main-header', mainHeader : '.main-header',
mainSidebar : '.main-sidebar',
slimScrollDiv : 'slimScrollDiv',
sidebar : '.sidebar', sidebar : '.sidebar',
controlSidebar: '.control-sidebar', controlSidebar: '.control-sidebar',
fixed : '.fixed', fixed : '.fixed',
@ -1093,9 +1095,11 @@ throw new Error('AdminLTE requires jQuery')
// $(Selector.sidebar).slimScroll({ destroy: true }).height('auto') // $(Selector.sidebar).slimScroll({ destroy: true }).height('auto')
// Add slimscroll // Add slimscroll
$(Selector.sidebar).slimScroll({ if ($(Selector.mainSidebar).find(Selector.slimScrollDiv).length === 0) {
height: ($(window).height() - $(Selector.mainHeader).height()) + 'px' $(Selector.sidebar).slimScroll({
}); height: ($(window).height() - $(Selector.mainHeader).height()) + 'px'
});
}
} }
} }
}; };

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save