fix scorllbar bug

This commit is contained in:
MaysWind 2016-05-22 16:29:32 +08:00
parent 84d4743ef0
commit 57827fb0cf
3 changed files with 11 additions and 26 deletions

View file

@ -149,7 +149,7 @@
</aside>
<div id="content-wrapper" class="content-wrapper">
<div ng-view cg-busy="{ promise: loadPromise, message: ('Loading' | translate) }"></div>
<div id="content-body" class="content-body" ng-view cg-busy="{ promise: loadPromise, message: ('Loading' | translate) }"></div>
</div>
<footer class="main-footer">

View file

@ -3,29 +3,10 @@
//copy from AdminLTE app.js
var fixContentWrapperHeight = function () {
var windowHeight = $(window).height();
var neg = $('.main-header').outerHeight() + $('.main-footer').outerHeight();
var window_height = $(window).height();
var sidebar_height = $(".sidebar").height();
if ($("body").hasClass("fixed")) {
$(".content-wrapper, .right-side").css('height', window_height - $('.main-footer').outerHeight());
} else {
var postSetWidth;
if (window_height >= sidebar_height) {
$(".content-wrapper, .right-side").css('height', window_height - neg);
postSetWidth = window_height - neg;
} else {
$(".content-wrapper, .right-side").css('height', sidebar_height);
postSetWidth = sidebar_height;
}
//Fix for the control sidebar height
var controlSidebar = $($.AdminLTE.options.controlSidebarOptions.selector);
if (typeof controlSidebar !== "undefined") {
if (controlSidebar.height() > postSetWidth)
$(".content-wrapper, .right-side").css('height', controlSidebar.height());
}
}
$(".content-body").css('height', windowHeight - neg);
};
$(window, ".wrapper").resize(function () {

View file

@ -4,6 +4,10 @@
*/
/* skin-aria-ng */
.skin-aria-ng {
overflow-y: hidden;
}
.skin-aria-ng, h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
font-family: 'Hiragino Sans GB', 'Microsoft YaHei', 'STHeiti', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
@ -119,14 +123,14 @@
color: #0080ff;
}
.skin-aria-ng .content-wrapper {
overflow-y: scroll;
}
.skin-aria-ng .content-wrapper, .right-side {
background-color: #fff;
}
.skin-aria-ng .content-wrapper > .content-body {
overflow-y: scroll;
}
@media screen and (max-width: 767px) {
.skin-aria-ng .content-wrapper .content {
margin-top: 5px;