mirror of https://github.com/ColorlibHQ/AdminLTE
Fixed sidebar issue
parent
9753353574
commit
9197cb613f
|
@ -98,15 +98,12 @@
|
|||
}
|
||||
//Direct chat contacts pane
|
||||
.direct-chat-contacts-open {
|
||||
/*.direct-chat-messages {
|
||||
.translate(-101%, 0);
|
||||
}*/
|
||||
.direct-chat-contacts {
|
||||
.translate(0, 0);
|
||||
}
|
||||
}
|
||||
.direct-chat-contacts {
|
||||
.translate(101%, 0);
|
||||
.translate(100%, 0);
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
top: 0;
|
||||
left: 0;
|
||||
padding-top: 50px;
|
||||
height: 100%;
|
||||
min-height: 100%;
|
||||
width: @sidebar-width;
|
||||
z-index: 810;
|
||||
.transition-transform(@transition-speed @transition-fn);
|
||||
|
|
|
@ -388,7 +388,7 @@ a:focus {
|
|||
top: 0;
|
||||
left: 0;
|
||||
padding-top: 50px;
|
||||
height: 100%;
|
||||
min-height: 100%;
|
||||
width: 230px;
|
||||
z-index: 810;
|
||||
-webkit-transition: -webkit-transform 0.3s cubic-bezier(0.32, 1.25, 0.375, 1.15);
|
||||
|
@ -2339,11 +2339,6 @@ table.text-center th {
|
|||
.direct-chat-timestamp {
|
||||
color: #999;
|
||||
}
|
||||
.direct-chat-contacts-open {
|
||||
/*.direct-chat-messages {
|
||||
.translate(-101%, 0);
|
||||
}*/
|
||||
}
|
||||
.direct-chat-contacts-open .direct-chat-contacts {
|
||||
-webkit-transform: translate(0, 0);
|
||||
-ms-transform: translate(0, 0);
|
||||
|
@ -2351,10 +2346,10 @@ table.text-center th {
|
|||
transform: translate(0, 0);
|
||||
}
|
||||
.direct-chat-contacts {
|
||||
-webkit-transform: translate(101%, 0);
|
||||
-ms-transform: translate(101%, 0);
|
||||
-o-transform: translate(101%, 0);
|
||||
transform: translate(101%, 0);
|
||||
-webkit-transform: translate(100%, 0);
|
||||
-ms-transform: translate(100%, 0);
|
||||
-o-transform: translate(100%, 0);
|
||||
transform: translate(100%, 0);
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,5 +1,5 @@
|
|||
/*! AdminLTE 2.0.1 app.js
|
||||
* ======================
|
||||
/*! AdminLTE app.js
|
||||
* ================
|
||||
* Main JS application file for AdminLTE v2. This file
|
||||
* should be included in all pages. It controls some layout
|
||||
* options and implements exclusive AdminLTE plugins.
|
||||
|
@ -7,7 +7,7 @@
|
|||
* @Author Almsaeed Studio
|
||||
* @Support <http://www.almsaeedstudio.com>
|
||||
* @Email <support@almsaeedstudio.com>
|
||||
* @version 2.0
|
||||
* @version 2.0.2
|
||||
* @license MIT <http://opensource.org/licenses/MIT>
|
||||
*/
|
||||
|
||||
|
@ -102,6 +102,15 @@ $.AdminLTE.options = {
|
|||
maroon: "#D81B60",
|
||||
black: "#222222",
|
||||
gray: "#d2d6de"
|
||||
},
|
||||
//The standard screen sizes that bootstrap uses.
|
||||
//If you change these in the variables.less file, change
|
||||
//them here too.
|
||||
screenSizes: {
|
||||
xs: 480,
|
||||
sm: 768,
|
||||
md: 992,
|
||||
lg: 1200
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -250,16 +259,31 @@ $.AdminLTE.layout = {
|
|||
* @usage: $.AdminLTE.pushMenu("[data-toggle='offcanvas']")
|
||||
*/
|
||||
$.AdminLTE.pushMenu = function (toggleBtn) {
|
||||
//Get the screen sizes
|
||||
var screenSizes = this.options.screenSizes;
|
||||
|
||||
//Enable sidebar toggle
|
||||
$(toggleBtn).click(function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
//Enable sidebar push menu
|
||||
if ($(window).width() > (screenSizes.sm - 1)) {
|
||||
$("body").toggleClass('sidebar-collapse');
|
||||
$("body").toggleClass('sidebar-open');
|
||||
}
|
||||
//Handle sidebar push menu for small screens
|
||||
else {
|
||||
if ($("body").hasClass('sidebar-open')) {
|
||||
$("body").removeClass('sidebar-open');
|
||||
$("body").removeClass('sidebar-collapse')
|
||||
} else {
|
||||
$("body").addClass('sidebar-open');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$(".content-wrapper").click(function () {
|
||||
//Enable hide menu when clicking on the content-wrapper on small screens
|
||||
if ($(window).width() <= 767 && $("body").hasClass("sidebar-open")) {
|
||||
if ($(window).width() <= (screenSizes.sm - 1) && $("body").hasClass("sidebar-open")) {
|
||||
$("body").removeClass('sidebar-open');
|
||||
}
|
||||
});
|
||||
|
@ -275,6 +299,8 @@ $.AdminLTE.pushMenu = function (toggleBtn) {
|
|||
* @Usage: $.AdminLTE.tree('.sidebar')
|
||||
*/
|
||||
$.AdminLTE.tree = function (menu) {
|
||||
var _this = this;
|
||||
|
||||
$("li a", $(menu)).click(function (e) {
|
||||
//Get the clicked link and the next element
|
||||
var $this = $(this);
|
||||
|
@ -285,6 +311,8 @@ $.AdminLTE.tree = function (menu) {
|
|||
//Close the menu
|
||||
checkElement.slideUp('normal', function () {
|
||||
checkElement.removeClass('menu-open');
|
||||
//Fix the layout in case the sidebar stretches over the height of the window
|
||||
//_this.layout.fix();
|
||||
});
|
||||
checkElement.parent("li").removeClass("active");
|
||||
}
|
||||
|
@ -305,6 +333,8 @@ $.AdminLTE.tree = function (menu) {
|
|||
checkElement.addClass('menu-open');
|
||||
parent.find('li.active').removeClass('active');
|
||||
parent_li.addClass('active');
|
||||
//Fix the layout in case the sidebar stretches over the height of the window
|
||||
_this.layout.fix();
|
||||
});
|
||||
}
|
||||
//if this isn't a link, prevent the page from being redirected
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue