added close right sidebar on document click if the slide option is enabled

pull/360/head
Abdullah Almsaeed 10 years ago
parent d4674d3a1d
commit d6861e81be

26
dist/js/app.js vendored

@ -256,14 +256,14 @@ function _init() {
$(".content-wrapper, .right-side").css('min-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)
if (typeof controlSidebar !== "undefined") {
if (controlSidebar.height() > postSetWidth)
$(".content-wrapper, .right-side").css('min-height', controlSidebar.height());
}
}
},
fixSidebar: function () {
@ -468,20 +468,26 @@ function _init() {
},
//Open the control sidebar
open: function (sidebar, slide) {
var _this = this;
//Slide over content
if (slide)
if (slide) {
sidebar.addClass('control-sidebar-open');
//Push the content by adding the open class to the body instead
//of the sidebar itself
else
$('.content-wrapper, .right-side').on('click', function () {
_this.close(sidebar, slide);
});
} else {
//Push the content by adding the open class to the body instead
//of the sidebar itself
$('body').addClass('control-sidebar-open');
}
},
//Close the control sidebar
close: function (sidebar, slide) {
if (slide)
if (slide) {
sidebar.removeClass('control-sidebar-open');
else
} else {
$('body').removeClass('control-sidebar-open');
}
},
_fix: function (sidebar) {
var _this = this;

File diff suppressed because one or more lines are too long

2
dist/js/demo.js vendored

@ -206,7 +206,7 @@
demo_settings.append(skins_list);
tab_pane.append(demo_settings);
$("#control-sidebar-settings-tab").before(tab_pane);
$("#control-sidebar-home-tab").after(tab_pane);
setup();

Loading…
Cancel
Save