Update AdminLTE

- from 2.4.5 to 2.4.18 (cannot detect any issues)
- set default scancycle for Apple Devices to 1
This commit is contained in:
leiweibau
2022-07-11 21:34:04 +02:00
parent a5a060b7c0
commit b2d2e3e9b6
3506 changed files with 228613 additions and 134604 deletions

View File

@@ -35,7 +35,7 @@
var BoxRefresh = function (element, options) {
this.element = element;
this.options = options;
this.$overlay = $(options.overlay);
this.$overlay = $(options.overlayTemplate);
if (options.source === '') {
throw new Error('Source url was not defined. Please specify a url in your BoxRefresh source option.');
@@ -51,7 +51,7 @@
$.get(this.options.source, this.options.params, function (response) {
if (this.options.loadInContent) {
$(this.options.content).html(response);
$(this.element).find(this.options.content).html(response);
}
this.options.onLoadDone.call($(this), response);
this._removeOverlay();
@@ -61,7 +61,7 @@
// Private
BoxRefresh.prototype._setUpListeners = function () {
$(this.element).on('click', Selector.trigger, function (event) {
$(this.element).on('click', this.options.trigger, function (event) {
if (event) event.preventDefault();
this.load();
}.bind(this));
@@ -72,7 +72,7 @@
};
BoxRefresh.prototype._removeOverlay = function () {
$(this.element).remove(this.$overlay);
$(this.$overlay).remove();
};
// Plugin Definition

View File

@@ -34,10 +34,13 @@
};
var Event = {
collapsed: 'collapsed.boxwidget',
expanded : 'expanded.boxwidget',
removed : 'removed.boxwidget'
};
collapsing: 'collapsing.boxwidget',
collapsed: 'collapsed.boxwidget',
expanding: 'expanding.boxwidget',
expanded: 'expanded.boxwidget',
removing: 'removing.boxwidget',
removed: 'removed.boxwidget'
};
// BoxWidget Class Definition
// =====================
@@ -60,6 +63,7 @@
BoxWidget.prototype.expand = function () {
var expandedEvent = $.Event(Event.expanded);
var expandingEvent = $.Event(Event.expanding);
var collapseIcon = this.options.collapseIcon;
var expandIcon = this.options.expandIcon;
@@ -75,11 +79,13 @@
$(this.element).children(Selector.body + ', ' + Selector.footer)
.slideDown(this.options.animationSpeed, function () {
$(this.element).trigger(expandedEvent);
}.bind(this));
}.bind(this))
.trigger(expandingEvent);
};
BoxWidget.prototype.collapse = function () {
var collapsedEvent = $.Event(Event.collapsed);
var collapsingEvent = $.Event(Event.collapsing);
var collapseIcon = this.options.collapseIcon;
var expandIcon = this.options.expandIcon;
@@ -94,16 +100,19 @@
.slideUp(this.options.animationSpeed, function () {
$(this.element).addClass(ClassName.collapsed);
$(this.element).trigger(collapsedEvent);
}.bind(this));
}.bind(this))
.trigger(collapsingEvent);
};
BoxWidget.prototype.remove = function () {
var removedEvent = $.Event(Event.removed);
var removingEvent = $.Event(Event.removing);
$(this.element).slideUp(this.options.animationSpeed, function () {
$(this.element).trigger(removedEvent);
$(this.element).remove();
}.bind(this));
}.bind(this))
.trigger(removingEvent);
};
// Private

View File

@@ -12,7 +12,7 @@
var DataKey = 'lte.controlsidebar';
var Default = {
slide: true
controlsidebarSlide: true
};
var Selector = {
@@ -26,7 +26,8 @@
};
var ClassName = {
open : 'control-sidebar-open',
open: 'control-sidebar-open',
transition: 'control-sidebar-hold-transition',
fixed: 'fixed'
};
@@ -71,17 +72,30 @@
};
ControlSidebar.prototype.expand = function () {
if (!this.options.slide) {
$('body').addClass(ClassName.open);
$(Selector.sidebar).show();
if (!this.options.controlsidebarSlide) {
$('body').addClass(ClassName.transition).addClass(ClassName.open).delay(50).queue(function(){
$('body').removeClass(ClassName.transition);
$(this).dequeue()
})
} else {
$(Selector.sidebar).addClass(ClassName.open);
}
$(this.element).trigger($.Event(Event.expanded));
};
ControlSidebar.prototype.collapse = function () {
$('body, ' + Selector.sidebar).removeClass(ClassName.open);
if (!this.options.controlsidebarSlide) {
$('body').addClass(ClassName.transition).removeClass(ClassName.open).delay(50).queue(function(){
$('body').removeClass(ClassName.transition);
$(this).dequeue()
})
} else {
$(Selector.sidebar).removeClass(ClassName.open);
}
$(Selector.sidebar).fadeOut();
$(this.element).trigger($.Event(Event.collapsed));
};

View File

@@ -23,6 +23,8 @@
layoutBoxed : '.layout-boxed',
mainFooter : '.main-footer',
mainHeader : '.main-header',
mainSidebar : '.main-sidebar',
slimScrollDiv : 'slimScrollDiv',
sidebar : '.sidebar',
controlSidebar: '.control-sidebar',
fixed : '.fixed',
@@ -84,11 +86,11 @@
$(Selector.layoutBoxed + ' > ' + Selector.wrapper).css('overflow', 'hidden');
// Get window height and the wrapper height
var footerHeight = $(Selector.mainFooter).outerHeight() || 0;
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;
var sidebarHeight = $(Selector.sidebar).outerHeight() || 0;
// Set the min-height of the content and sidebar based on
// the height of the document.
@@ -97,7 +99,7 @@
} else {
var postSetHeight;
if (windowHeight >= sidebarHeight) {
if (windowHeight >= sidebarHeight + headerHeight) {
$(Selector.contentWrapper).css('min-height', windowHeight - neg);
postSetHeight = windowHeight - neg;
} else {
@@ -130,9 +132,11 @@
// $(Selector.sidebar).slimScroll({ destroy: true }).height('auto')
// Add slimscroll
$(Selector.sidebar).slimScroll({
height: ($(window).height() - $(Selector.mainHeader).height()) + 'px'
});
if ($(Selector.mainSidebar).find(Selector.slimScrollDiv).length === 0) {
$(Selector.sidebar).slimScroll({
height: ($(window).height() - $(Selector.mainHeader).height()) + 'px'
});
}
}
}
};

View File

@@ -82,8 +82,9 @@
}
parent.addClass(ClassName.open);
tree.slideDown(this.options.animationSpeed, function () {
tree.stop().slideDown(this.options.animationSpeed, function () {
$(this.element).trigger(expandedEvent);
parent.height('auto');
}.bind(this));
};
@@ -92,9 +93,12 @@
//tree.find(Selector.open).removeClass(ClassName.open);
parentLi.removeClass(ClassName.open);
tree.slideUp(this.options.animationSpeed, function () {
tree.stop().slideUp(this.options.animationSpeed, function () {
//tree.find(Selector.open + ' > ' + Selector.treeview).slideUp();
$(this.element).trigger(collapsedEvent);
// Collapse child items
parentLi.find(Selector.treeview).removeClass(ClassName.open).find(Selector.treeviewMenu).hide();
}.bind(this));
};