mirror of https://github.com/ColorlibHQ/AdminLTE
fixed drag and drop breaking adminlte's design
- updated ControlSidebar.js to hide control sidebar instead of only moving it - updated dashboard.js to use containment in sortable() - added display none to control sidebar content in index.html (Closes #1924)pull/2125/head
parent
3254b3b60f
commit
2226c0e7cf
|
@ -71,17 +71,20 @@
|
|||
};
|
||||
|
||||
ControlSidebar.prototype.expand = function () {
|
||||
$(Selector.sidebar).show();
|
||||
if (!this.options.slide) {
|
||||
$('body').addClass(ClassName.open);
|
||||
} else {
|
||||
$(Selector.sidebar).addClass(ClassName.open);
|
||||
}
|
||||
|
||||
|
||||
$(this.element).trigger($.Event(Event.expanded));
|
||||
};
|
||||
|
||||
ControlSidebar.prototype.collapse = function () {
|
||||
$('body, ' + Selector.sidebar).removeClass(ClassName.open);
|
||||
$(Selector.sidebar).fadeOut();
|
||||
$(this.element).trigger($.Event(Event.collapsed));
|
||||
};
|
||||
|
||||
|
|
|
@ -389,17 +389,20 @@ throw new Error('AdminLTE requires jQuery')
|
|||
};
|
||||
|
||||
ControlSidebar.prototype.expand = function () {
|
||||
$(Selector.sidebar).show();
|
||||
if (!this.options.slide) {
|
||||
$('body').addClass(ClassName.open);
|
||||
} else {
|
||||
$(Selector.sidebar).addClass(ClassName.open);
|
||||
}
|
||||
|
||||
|
||||
$(this.element).trigger($.Event(Event.expanded));
|
||||
};
|
||||
|
||||
ControlSidebar.prototype.collapse = function () {
|
||||
$('body, ' + Selector.sidebar).removeClass(ClassName.open);
|
||||
$(Selector.sidebar).fadeOut();
|
||||
$(this.element).trigger($.Event(Event.collapsed));
|
||||
};
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -11,6 +11,7 @@ $(function () {
|
|||
|
||||
// Make the dashboard widgets sortable Using jquery UI
|
||||
$('.connectedSortable').sortable({
|
||||
containment : $('section.content'),
|
||||
placeholder : 'sort-highlight',
|
||||
connectWith : '.connectedSortable',
|
||||
handle : '.box-header, .nav-tabs',
|
||||
|
|
|
@ -1035,7 +1035,7 @@
|
|||
</footer>
|
||||
|
||||
<!-- Control Sidebar -->
|
||||
<aside class="control-sidebar control-sidebar-dark">
|
||||
<aside class="control-sidebar control-sidebar-dark" style="display: none;">
|
||||
<!-- Create the tabs -->
|
||||
<ul class="nav nav-tabs nav-justified control-sidebar-tabs">
|
||||
<li><a href="#control-sidebar-home-tab" data-toggle="tab"><i class="fa fa-home"></i></a></li>
|
||||
|
|
Loading…
Reference in New Issue