mirror of https://github.com/ColorlibHQ/AdminLTE
pull/1109/head
parent
8438a30eaa
commit
bcd808d203
|
@ -62,7 +62,7 @@ $.AdminLTE.options = {
|
||||||
//native touch experience with touch devices. If you
|
//native touch experience with touch devices. If you
|
||||||
//choose to enable the plugin, make sure you load the script
|
//choose to enable the plugin, make sure you load the script
|
||||||
//before AdminLTE's app.js
|
//before AdminLTE's app.js
|
||||||
enableFastclick: true,
|
enableFastclick: false,
|
||||||
//Control Sidebar Options
|
//Control Sidebar Options
|
||||||
enableControlSidebar: true,
|
enableControlSidebar: true,
|
||||||
controlSidebarOptions: {
|
controlSidebarOptions: {
|
||||||
|
@ -146,8 +146,8 @@ $(function () {
|
||||||
//Extend options if external options exist
|
//Extend options if external options exist
|
||||||
if (typeof AdminLTEOptions !== "undefined") {
|
if (typeof AdminLTEOptions !== "undefined") {
|
||||||
$.extend(true,
|
$.extend(true,
|
||||||
$.AdminLTE.options,
|
$.AdminLTE.options,
|
||||||
AdminLTEOptions);
|
AdminLTEOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Easy access to options
|
//Easy access to options
|
||||||
|
@ -344,8 +344,8 @@ function _init() {
|
||||||
|
|
||||||
//Enable expand on hover for sidebar mini
|
//Enable expand on hover for sidebar mini
|
||||||
if ($.AdminLTE.options.sidebarExpandOnHover
|
if ($.AdminLTE.options.sidebarExpandOnHover
|
||||||
|| ($('body').hasClass('fixed')
|
|| ($('body').hasClass('fixed')
|
||||||
&& $('body').hasClass('sidebar-mini'))) {
|
&& $('body').hasClass('sidebar-mini'))) {
|
||||||
this.expandOnHover();
|
this.expandOnHover();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -355,14 +355,14 @@ function _init() {
|
||||||
//Expand sidebar on hover
|
//Expand sidebar on hover
|
||||||
$('.main-sidebar').hover(function () {
|
$('.main-sidebar').hover(function () {
|
||||||
if ($('body').hasClass('sidebar-mini')
|
if ($('body').hasClass('sidebar-mini')
|
||||||
&& $("body").hasClass('sidebar-collapse')
|
&& $("body").hasClass('sidebar-collapse')
|
||||||
&& $(window).width() > screenWidth) {
|
&& $(window).width() > screenWidth) {
|
||||||
_this.expand();
|
_this.expand();
|
||||||
}
|
}
|
||||||
}, function () {
|
}, function () {
|
||||||
if ($('body').hasClass('sidebar-mini')
|
if ($('body').hasClass('sidebar-mini')
|
||||||
&& $('body').hasClass('sidebar-expanded-on-hover')
|
&& $('body').hasClass('sidebar-expanded-on-hover')
|
||||||
&& $(window).width() > screenWidth) {
|
&& $(window).width() > screenWidth) {
|
||||||
_this.collapse();
|
_this.collapse();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -455,7 +455,7 @@ function _init() {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
//If the sidebar is not open
|
//If the sidebar is not open
|
||||||
if (!sidebar.hasClass('control-sidebar-open')
|
if (!sidebar.hasClass('control-sidebar-open')
|
||||||
&& !$('body').hasClass('control-sidebar-open')) {
|
&& !$('body').hasClass('control-sidebar-open')) {
|
||||||
//Open the sidebar
|
//Open the sidebar
|
||||||
_this.open(sidebar, o.slide);
|
_this.open(sidebar, o.slide);
|
||||||
} else {
|
} else {
|
||||||
|
@ -563,8 +563,8 @@ function _init() {
|
||||||
if (!box.hasClass("collapsed-box")) {
|
if (!box.hasClass("collapsed-box")) {
|
||||||
//Convert minus into plus
|
//Convert minus into plus
|
||||||
element.children(":first")
|
element.children(":first")
|
||||||
.removeClass(_this.icons.collapse)
|
.removeClass(_this.icons.collapse)
|
||||||
.addClass(_this.icons.open);
|
.addClass(_this.icons.open);
|
||||||
//Hide the content
|
//Hide the content
|
||||||
box_content.slideUp(_this.animationSpeed, function () {
|
box_content.slideUp(_this.animationSpeed, function () {
|
||||||
box.addClass("collapsed-box");
|
box.addClass("collapsed-box");
|
||||||
|
@ -572,8 +572,8 @@ function _init() {
|
||||||
} else {
|
} else {
|
||||||
//Convert plus into minus
|
//Convert plus into minus
|
||||||
element.children(":first")
|
element.children(":first")
|
||||||
.removeClass(_this.icons.open)
|
.removeClass(_this.icons.open)
|
||||||
.addClass(_this.icons.collapse);
|
.addClass(_this.icons.collapse);
|
||||||
//Show the content
|
//Show the content
|
||||||
box_content.slideDown(_this.animationSpeed, function () {
|
box_content.slideDown(_this.animationSpeed, function () {
|
||||||
box.removeClass("collapsed-box");
|
box.removeClass("collapsed-box");
|
||||||
|
@ -672,7 +672,7 @@ function _init() {
|
||||||
|
|
||||||
})(jQuery);
|
})(jQuery);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* EXPLICIT BOX CONTROLS
|
* EXPLICIT BOX CONTROLS
|
||||||
* -----------------------
|
* -----------------------
|
||||||
* This is a custom plugin to use with the component BOX. It allows you to activate
|
* This is a custom plugin to use with the component BOX. It allows you to activate
|
||||||
|
@ -691,12 +691,12 @@ function _init() {
|
||||||
$.AdminLTE.boxWidget.activate(this);
|
$.AdminLTE.boxWidget.activate(this);
|
||||||
};
|
};
|
||||||
|
|
||||||
$.fn.toggleBox = function(){
|
$.fn.toggleBox = function () {
|
||||||
var button = $($.AdminLTE.boxWidget.selectors.collapse, this);
|
var button = $($.AdminLTE.boxWidget.selectors.collapse, this);
|
||||||
$.AdminLTE.boxWidget.collapse(button);
|
$.AdminLTE.boxWidget.collapse(button);
|
||||||
};
|
};
|
||||||
|
|
||||||
$.fn.removeBox = function(){
|
$.fn.removeBox = function () {
|
||||||
var button = $($.AdminLTE.boxWidget.selectors.remove, this);
|
var button = $($.AdminLTE.boxWidget.selectors.remove, this);
|
||||||
$.AdminLTE.boxWidget.remove(button);
|
$.AdminLTE.boxWidget.remove(button);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue