Compare commits

..

5 Commits

Author SHA1 Message Date
REJack
7309e2e5d5 bump version 2019-06-11 13:52:23 +02:00
REJack
af70f05345 added height auto to .login-page & .register-page 2019-06-11 12:14:18 +02:00
REJack
90b65eac6d bump version to v2.4.12-pre 2019-06-11 12:13:34 +02:00
REJack
340bbbaf93 fixed strange navigation menu behavior + dark space on reloads (#2126)
- changed height: 0px to height: auto for uk.treeview-menu to fix not smooth treeview closing
- fixed .content-wrapper calc, it returned -2% before
- changed order of js file generation
- rebuild dist files
2019-06-11 11:59:05 +02:00
REJack
67044517c3 fixed npm audit error 2019-06-11 11:53:48 +02:00
14 changed files with 206 additions and 204 deletions

View File

@@ -149,10 +149,10 @@ module.exports = function (grunt) { // jshint ignore:line
'build/js/BoxWidget.js',
'build/js/ControlSidebar.js',
'build/js/DirectChat.js',
'build/js/Layout.js',
'build/js/PushMenu.js',
'build/js/TodoList.js',
'build/js/Tree.js'
'build/js/Tree.js',
'build/js/Layout.js',
],
dest: 'dist/js/adminlte.js'
}

View File

@@ -1,5 +1,5 @@
/*!
* AdminLTE v2.4.11
* AdminLTE v2.4.12
* Without Third-Party Plugins
*
* Author: Colorlib

View File

@@ -1,5 +1,5 @@
/*!
* AdminLTE v2.4.11
* AdminLTE v2.4.12
*
* Author: Colorlib
* Support: <https://github.com/ColorlibHQ/AdminLTE/issues>

View File

@@ -70,7 +70,7 @@ body {
}
.content-wrapper {
min-height: calc(100% - 102px);
min-height: ~"calc(100% - 102px)";
background-color: @content-bg;
z-index: 800;
}

View File

@@ -16,6 +16,7 @@
.login-page,
.register-page {
height: auto;
background: @gray-lte;
}

View File

@@ -32,7 +32,7 @@
.treeview {
> ul.treeview-menu {
overflow: hidden;
height:0px;
height:auto;
padding-top:0px !important;
padding-bottom: 0px !important;
}

View File

@@ -1,5 +1,5 @@
/*!
* AdminLTE v2.4.11
* AdminLTE v2.4.12
*
* Author: Colorlib
* Support: <https://github.com/ColorlibHQ/AdminLTE/issues>
@@ -87,7 +87,7 @@ body {
}
}
.content-wrapper {
min-height: calc(-2%);
min-height: calc(100% - 102px);
background-color: #ecf0f5;
z-index: 800;
}
@@ -3099,7 +3099,7 @@ table.text-center th {
}
.treeview > ul.treeview-menu {
overflow: hidden;
height: 0px;
height: auto;
padding-top: 0px !important;
padding-bottom: 0px !important;
}
@@ -3259,6 +3259,7 @@ table.text-center th {
}
.login-page,
.register-page {
height: auto;
background: #d2d6de;
}
.login-box,

File diff suppressed because one or more lines are too long

View File

@@ -1,5 +1,5 @@
/*!
* AdminLTE v2.4.11
* AdminLTE v2.4.12
* Without Third-Party Plugins
*
* Author: Colorlib
@@ -88,7 +88,7 @@ body {
}
}
.content-wrapper {
min-height: calc(-2%);
min-height: calc(100% - 102px);
background-color: #ecf0f5;
z-index: 800;
}
@@ -3100,7 +3100,7 @@ table.text-center th {
}
.treeview > ul.treeview-menu {
overflow: hidden;
height: 0px;
height: auto;
padding-top: 0px !important;
padding-bottom: 0px !important;
}
@@ -3260,6 +3260,7 @@ table.text-center th {
}
.login-page,
.register-page {
height: auto;
background: #d2d6de;
}
.login-box,

File diff suppressed because one or more lines are too long

362
dist/js/adminlte.js vendored
View File

@@ -6,7 +6,7 @@
*
* @author Colorlib
* @support <https://github.com/ColorlibHQ/AdminLTE/issues>
* @version 2.4.11
* @version 2.4.12
* @repository git://github.com/ColorlibHQ/AdminLTE.git
* @license MIT <http://opensource.org/licenses/MIT>
*/
@@ -526,186 +526,6 @@ throw new Error('AdminLTE requires jQuery')
}(jQuery);
/* Layout()
* ========
* Implements AdminLTE layout.
* Fixes the layout height in case min-height fails.
*
* @usage activated automatically upon window load.
* Configure any options by passing data-option="value"
* to the body tag.
*/
+function ($) {
'use strict';
var DataKey = 'lte.layout';
var Default = {
slimscroll : true,
resetHeight: true
};
var Selector = {
wrapper : '.wrapper',
contentWrapper: '.content-wrapper',
layoutBoxed : '.layout-boxed',
mainFooter : '.main-footer',
mainHeader : '.main-header',
sidebar : '.sidebar',
controlSidebar: '.control-sidebar',
fixed : '.fixed',
sidebarMenu : '.sidebar-menu',
logo : '.main-header .logo'
};
var ClassName = {
fixed : 'fixed',
holdTransition: 'hold-transition'
};
var Layout = function (options) {
this.options = options;
this.bindedResize = false;
this.activate();
};
Layout.prototype.activate = function () {
this.fix();
this.fixSidebar();
$('body').removeClass(ClassName.holdTransition);
if (this.options.resetHeight) {
$('body, html, ' + Selector.wrapper).css({
'height' : 'auto',
'min-height': '100%'
});
}
if (!this.bindedResize) {
$(window).resize(function () {
this.fix();
this.fixSidebar();
$(Selector.logo + ', ' + Selector.sidebar).one('webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend', function () {
this.fix();
this.fixSidebar();
}.bind(this));
}.bind(this));
this.bindedResize = true;
}
$(Selector.sidebarMenu).on('expanded.tree', function () {
this.fix();
this.fixSidebar();
}.bind(this));
$(Selector.sidebarMenu).on('collapsed.tree', function () {
this.fix();
this.fixSidebar();
}.bind(this));
};
Layout.prototype.fix = function () {
// Remove overflow from .wrapper if layout-boxed exists
$(Selector.layoutBoxed + ' > ' + Selector.wrapper).css('overflow', 'hidden');
// Get window height and the wrapper height
var footerHeight = $(Selector.mainFooter).outerHeight() || 0;
var headerHeight = $(Selector.mainHeader).outerHeight() || 0;
var neg = headerHeight + footerHeight;
var windowHeight = $(window).height();
var sidebarHeight = $(Selector.sidebar).height() || 0;
// Set the min-height of the content and sidebar based on
// the height of the document.
if ($('body').hasClass(ClassName.fixed)) {
$(Selector.contentWrapper).css('min-height', windowHeight - footerHeight);
} else {
var postSetHeight;
if (windowHeight >= sidebarHeight + headerHeight) {
$(Selector.contentWrapper).css('min-height', windowHeight - neg);
postSetHeight = windowHeight - neg;
} else {
$(Selector.contentWrapper).css('min-height', sidebarHeight);
postSetHeight = sidebarHeight;
}
// Fix for the control sidebar height
var $controlSidebar = $(Selector.controlSidebar);
if (typeof $controlSidebar !== 'undefined') {
if ($controlSidebar.height() > postSetHeight)
$(Selector.contentWrapper).css('min-height', $controlSidebar.height());
}
}
};
Layout.prototype.fixSidebar = function () {
// Make sure the body tag has the .fixed class
if (!$('body').hasClass(ClassName.fixed)) {
if (typeof $.fn.slimScroll !== 'undefined') {
$(Selector.sidebar).slimScroll({ destroy: true }).height('auto');
}
return;
}
// Enable slimscroll for fixed layout
if (this.options.slimscroll) {
if (typeof $.fn.slimScroll !== 'undefined') {
// Destroy if it exists
// $(Selector.sidebar).slimScroll({ destroy: true }).height('auto')
// Add slimscroll
$(Selector.sidebar).slimScroll({
height: ($(window).height() - $(Selector.mainHeader).height()) + 'px'
});
}
}
};
// Plugin Definition
// =================
function Plugin(option) {
return this.each(function () {
var $this = $(this);
var data = $this.data(DataKey);
if (!data) {
var options = $.extend({}, Default, $this.data(), typeof option === 'object' && option);
$this.data(DataKey, (data = new Layout(options)));
}
if (typeof option === 'string') {
if (typeof data[option] === 'undefined') {
throw new Error('No method named ' + option);
}
data[option]();
}
});
}
var old = $.fn.layout;
$.fn.layout = Plugin;
$.fn.layout.Constuctor = Layout;
// No conflict mode
// ================
$.fn.layout.noConflict = function () {
$.fn.layout = old;
return this;
};
// Layout DATA-API
// ===============
$(window).on('load', function () {
Plugin.call($('body'));
});
}(jQuery);
/* PushMenu()
* ==========
* Adds the push menu functionality to the sidebar.
@@ -1139,3 +959,183 @@ throw new Error('AdminLTE requires jQuery')
});
}(jQuery);
/* Layout()
* ========
* Implements AdminLTE layout.
* Fixes the layout height in case min-height fails.
*
* @usage activated automatically upon window load.
* Configure any options by passing data-option="value"
* to the body tag.
*/
+function ($) {
'use strict';
var DataKey = 'lte.layout';
var Default = {
slimscroll : true,
resetHeight: true
};
var Selector = {
wrapper : '.wrapper',
contentWrapper: '.content-wrapper',
layoutBoxed : '.layout-boxed',
mainFooter : '.main-footer',
mainHeader : '.main-header',
sidebar : '.sidebar',
controlSidebar: '.control-sidebar',
fixed : '.fixed',
sidebarMenu : '.sidebar-menu',
logo : '.main-header .logo'
};
var ClassName = {
fixed : 'fixed',
holdTransition: 'hold-transition'
};
var Layout = function (options) {
this.options = options;
this.bindedResize = false;
this.activate();
};
Layout.prototype.activate = function () {
this.fix();
this.fixSidebar();
$('body').removeClass(ClassName.holdTransition);
if (this.options.resetHeight) {
$('body, html, ' + Selector.wrapper).css({
'height' : 'auto',
'min-height': '100%'
});
}
if (!this.bindedResize) {
$(window).resize(function () {
this.fix();
this.fixSidebar();
$(Selector.logo + ', ' + Selector.sidebar).one('webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend', function () {
this.fix();
this.fixSidebar();
}.bind(this));
}.bind(this));
this.bindedResize = true;
}
$(Selector.sidebarMenu).on('expanded.tree', function () {
this.fix();
this.fixSidebar();
}.bind(this));
$(Selector.sidebarMenu).on('collapsed.tree', function () {
this.fix();
this.fixSidebar();
}.bind(this));
};
Layout.prototype.fix = function () {
// Remove overflow from .wrapper if layout-boxed exists
$(Selector.layoutBoxed + ' > ' + Selector.wrapper).css('overflow', 'hidden');
// Get window height and the wrapper height
var footerHeight = $(Selector.mainFooter).outerHeight() || 0;
var headerHeight = $(Selector.mainHeader).outerHeight() || 0;
var neg = headerHeight + footerHeight;
var windowHeight = $(window).height();
var sidebarHeight = $(Selector.sidebar).height() || 0;
// Set the min-height of the content and sidebar based on
// the height of the document.
if ($('body').hasClass(ClassName.fixed)) {
$(Selector.contentWrapper).css('min-height', windowHeight - footerHeight);
} else {
var postSetHeight;
if (windowHeight >= sidebarHeight + headerHeight) {
$(Selector.contentWrapper).css('min-height', windowHeight - neg);
postSetHeight = windowHeight - neg;
} else {
$(Selector.contentWrapper).css('min-height', sidebarHeight);
postSetHeight = sidebarHeight;
}
// Fix for the control sidebar height
var $controlSidebar = $(Selector.controlSidebar);
if (typeof $controlSidebar !== 'undefined') {
if ($controlSidebar.height() > postSetHeight)
$(Selector.contentWrapper).css('min-height', $controlSidebar.height());
}
}
};
Layout.prototype.fixSidebar = function () {
// Make sure the body tag has the .fixed class
if (!$('body').hasClass(ClassName.fixed)) {
if (typeof $.fn.slimScroll !== 'undefined') {
$(Selector.sidebar).slimScroll({ destroy: true }).height('auto');
}
return;
}
// Enable slimscroll for fixed layout
if (this.options.slimscroll) {
if (typeof $.fn.slimScroll !== 'undefined') {
// Destroy if it exists
// $(Selector.sidebar).slimScroll({ destroy: true }).height('auto')
// Add slimscroll
$(Selector.sidebar).slimScroll({
height: ($(window).height() - $(Selector.mainHeader).height()) + 'px'
});
}
}
};
// Plugin Definition
// =================
function Plugin(option) {
return this.each(function () {
var $this = $(this);
var data = $this.data(DataKey);
if (!data) {
var options = $.extend({}, Default, $this.data(), typeof option === 'object' && option);
$this.data(DataKey, (data = new Layout(options)));
}
if (typeof option === 'string') {
if (typeof data[option] === 'undefined') {
throw new Error('No method named ' + option);
}
data[option]();
}
});
}
var old = $.fn.layout;
$.fn.layout = Plugin;
$.fn.layout.Constuctor = Layout;
// No conflict mode
// ================
$.fn.layout.noConflict = function () {
$.fn.layout = old;
return this;
};
// Layout DATA-API
// ===============
$(window).on('load', function () {
Plugin.call($('body'));
});
}(jQuery);

File diff suppressed because one or more lines are too long

5
package-lock.json generated
View File

@@ -5756,9 +5756,8 @@
}
},
"morris.js": {
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/morris.js/-/morris.js-0.5.0.tgz",
"integrity": "sha1-cldnE1z64Fmq51mZuyzmocXRtEs="
"version": "github:morrisjs/morris.js#14530d0733801d5bef1264cf3d062ecace7e326b",
"from": "github:morrisjs/morris.js"
},
"mozjpeg": {
"version": "4.1.1",

View File

@@ -1,6 +1,6 @@
{
"name": "admin-lte",
"version": "2.4.11",
"version": "2.4.12",
"main": "dist/js/adminlte.min.js",
"repository": {
"type": "git",
@@ -52,7 +52,7 @@
"jquery-ui": "^1.12.1",
"jvectormap": "^1.2.2",
"moment": "^2.24.0",
"morris.js": "^0.5.0",
"morris.js": "github:morrisjs/morris.js",
"pace": "0.0.4",
"raphael": "^2.2.7",
"select2": "^4.0.3",