未验证 提交 a1734eab 编写于 作者: R REJack

fixed scroll top bug in fixed layout mode

上级 f6a5d05c
......@@ -23,6 +23,8 @@
layoutBoxed : '.layout-boxed',
mainFooter : '.main-footer',
mainHeader : '.main-header',
mainSidebar : '.main-sidebar',
slimScrollDiv : 'slimScrollDiv',
sidebar : '.sidebar',
controlSidebar: '.control-sidebar',
fixed : '.fixed',
......@@ -130,9 +132,11 @@
// $(Selector.sidebar).slimScroll({ destroy: true }).height('auto')
// Add slimscroll
$(Selector.sidebar).slimScroll({
height: ($(window).height() - $(Selector.mainHeader).height()) + 'px'
});
if ($(Selector.mainSidebar).find(Selector.slimScrollDiv).length === 0) {
$(Selector.sidebar).slimScroll({
height: ($(window).height() - $(Selector.mainHeader).height()) + 'px'
});
}
}
}
};
......
......@@ -986,6 +986,8 @@ throw new Error('AdminLTE requires jQuery')
layoutBoxed : '.layout-boxed',
mainFooter : '.main-footer',
mainHeader : '.main-header',
mainSidebar : '.main-sidebar',
slimScrollDiv : 'slimScrollDiv',
sidebar : '.sidebar',
controlSidebar: '.control-sidebar',
fixed : '.fixed',
......@@ -1093,9 +1095,11 @@ throw new Error('AdminLTE requires jQuery')
// $(Selector.sidebar).slimScroll({ destroy: true }).height('auto')
// Add slimscroll
$(Selector.sidebar).slimScroll({
height: ($(window).height() - $(Selector.mainHeader).height()) + 'px'
});
if ($(Selector.mainSidebar).find(Selector.slimScrollDiv).length === 0) {
$(Selector.sidebar).slimScroll({
height: ($(window).height() - $(Selector.mainHeader).height()) + 'px'
});
}
}
}
};
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册