rebuild dist files

pull/2256/head
REJack 2019-10-02 12:44:03 +02:00
parent 00675ef1cb
commit 0997acea1e
No known key found for this signature in database
GPG Key ID: 9F3976CC630CC888
20 changed files with 13196 additions and 925 deletions

7963
dist/css/adminlte.css vendored

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

340
dist/js/adminlte.js vendored
View File

@ -1,5 +1,5 @@
/*!
* AdminLTE v3.0.0-rc.1 (https://adminlte.io)
* AdminLTE v3.0.0-rc.2 (https://adminlte.io)
* Copyright 2014-2019 Colorlib <http://colorlib.com>
* Licensed under MIT (https://github.com/almasaeed2010/AdminLTE/blob/master/LICENSE)
*/
@ -52,6 +52,10 @@
FOOTER_LG_FIXED: 'layout-lg-footer-fixed',
FOOTER_XL_FIXED: 'layout-xl-footer-fixed'
};
/**
* Class Definition
* ====================================================
*/
var ControlSidebar =
/*#__PURE__*/
@ -293,7 +297,9 @@
WRAPPER: '.wrapper',
CONTROL_SIDEBAR: '.control-sidebar',
LAYOUT_FIXED: '.layout-fixed',
FOOTER: '.main-footer'
FOOTER: '.main-footer',
LOGIN_BOX: '.login-box',
REGISTER_BOX: '.register-box'
};
var ClassName = {
HOLD: 'hold-transition',
@ -302,17 +308,18 @@
SIDEBAR_FOCUSED: 'sidebar-focused',
LAYOUT_FIXED: 'layout-fixed',
NAVBAR_FIXED: 'layout-navbar-fixed',
FOOTER_FIXED: 'layout-footer-fixed'
FOOTER_FIXED: 'layout-footer-fixed',
LOGIN_PAGE: 'login-page',
REGISTER_PAGE: 'register-page'
};
var Default = {
scrollbarTheme: 'os-theme-light',
scrollbarAutoHide: 'l'
/**
* Class Definition
* ====================================================
*/
};
/**
* Class Definition
* ====================================================
*/
var Layout =
/*#__PURE__*/
@ -330,16 +337,16 @@
_proto.fixLayoutHeight = function fixLayoutHeight() {
var heights = {
window: $(window).height(),
header: $(Selector.HEADER).outerHeight(),
footer: $(Selector.FOOTER).outerHeight(),
sidebar: $(Selector.SIDEBAR).height()
header: $(Selector.HEADER).length !== 0 ? $(Selector.HEADER).outerHeight() : 0,
footer: $(Selector.FOOTER).length !== 0 ? $(Selector.FOOTER).outerHeight() : 0,
sidebar: $(Selector.SIDEBAR).length !== 0 ? $(Selector.SIDEBAR).height() : 0
};
var max = this._max(heights);
if ($('body').hasClass(ClassName.LAYOUT_FIXED)) {
$(Selector.CONTENT).css('min-height', max - heights.header - heights.footer); // $(Selector.SIDEBAR).css('min-height', max - heights.header)
$(Selector.CONTENT).css('min-height', max - heights.footer);
if ($('body').hasClass(ClassName.LAYOUT_FIXED)) {
if (typeof $.fn.overlayScrollbars !== 'undefined') {
$(Selector.SIDEBAR).overlayScrollbars({
className: this._config.scrollbarTheme,
@ -350,12 +357,6 @@
}
});
}
} else {
if (heights.window > heights.sidebar) {
$(Selector.CONTENT).css('min-height', heights.window - heights.header - heights.footer);
} else {
$(Selector.CONTENT).css('min-height', heights.sidebar - heights.header);
}
}
} // Private
;
@ -363,9 +364,7 @@
_proto._init = function _init() {
var _this = this;
// Enable transitions
$('body').removeClass(ClassName.HOLD); // Activate layout height watcher
// Activate layout height watcher
this.fixLayoutHeight();
$(Selector.SIDEBAR).on('collapsed.lte.treeview expanded.lte.treeview collapsed.lte.pushmenu expanded.lte.pushmenu', function () {
_this.fixLayoutHeight();
@ -373,7 +372,15 @@
$(window).resize(function () {
_this.fixLayoutHeight();
});
$('body, html').css('height', 'auto');
if (!$('body').hasClass(ClassName.LOGIN_PAGE) && !$('body').hasClass(ClassName.REGISTER_PAGE)) {
$('body, html').css('height', 'auto');
} else if ($('body').hasClass(ClassName.LOGIN_PAGE) || $('body').hasClass(ClassName.REGISTER_PAGE)) {
var box_height = $(Selector.LOGIN_BOX + ', ' + Selector.REGISTER_BOX).height();
$('body').css('min-height', box_height);
}
$('body.hold-transition').removeClass('hold-transition');
};
_proto._max = function _max(numbers) {
@ -459,7 +466,6 @@
};
var Default = {
autoCollapseSize: false,
screenCollapseSize: 768,
enableRemember: false,
noTransitionAfterReload: true
};
@ -474,14 +480,12 @@
var ClassName = {
SIDEBAR_OPEN: 'sidebar-open',
COLLAPSED: 'sidebar-collapse',
OPEN: 'sidebar-open',
SIDEBAR_MINI: 'sidebar-mini'
/**
* Class Definition
* ====================================================
*/
OPEN: 'sidebar-open'
};
/**
* Class Definition
* ====================================================
*/
var PushMenu =
/*#__PURE__*/
@ -490,11 +494,15 @@
this._element = element;
this._options = $.extend({}, Default, options);
this._init();
if (!$(Selector.BODY).hasClass(ClassName.COLLAPSED) && !$(Selector.BODY).hasClass(ClassName.OPEN)) {
$(Selector.BODY).addClass(ClassName.OPEN);
}
if (!$(Selector.OVERLAY).length) {
this._addOverlay();
}
this._init();
} // Public
@ -522,16 +530,8 @@
$(this._element).trigger(collapsedEvent);
};
_proto.isShown = function isShown() {
if ($(window).width() >= this._options.screenCollapseSize) {
return !$(Selector.BODY).hasClass(ClassName.COLLAPSED);
} else {
return $(Selector.BODY).hasClass(ClassName.OPEN);
}
};
_proto.toggle = function toggle() {
if (this.isShown()) {
if ($(Selector.BODY).hasClass(ClassName.OPEN)) {
this.collapse();
} else {
this.show();
@ -541,11 +541,11 @@
_proto.autoCollapse = function autoCollapse() {
if (this._options.autoCollapseSize) {
if ($(window).width() <= this._options.autoCollapseSize) {
if (this.isShown()) {
if ($(Selector.BODY).hasClass(ClassName.OPEN)) {
this.toggle();
}
} else {
if (!this.isShown()) {
if (!$(Selector.BODY).hasClass(ClassName.OPEN)) {
this.toggle();
}
}
@ -558,13 +558,22 @@
if (toggleState == ClassName.COLLAPSED) {
if (this._options.noTransitionAfterReload) {
$("body").addClass('hold-transition').addClass(ClassName.COLLAPSED).delay(10).queue(function () {
$("body").addClass('hold-transition').addClass(ClassName.COLLAPSED).delay(50).queue(function () {
$(this).removeClass('hold-transition');
$(this).dequeue();
});
} else {
$("body").addClass(ClassName.COLLAPSED);
}
} else {
if (this._options.noTransitionAfterReload) {
$("body").addClass('hold-transition').removeClass(ClassName.COLLAPSED).delay(50).queue(function () {
$(this).removeClass('hold-transition');
$(this).dequeue();
});
} else {
$("body").removeClass(ClassName.COLLAPSED);
}
}
}
} // Private
@ -685,12 +694,11 @@
trigger: Selector.DATA_WIDGET + " " + Selector.LINK,
animationSpeed: 300,
accordion: true
/**
* Class Definition
* ====================================================
*/
};
/**
* Class Definition
* ====================================================
*/
var Treeview =
/*#__PURE__*/
@ -738,10 +746,17 @@
_proto.toggle = function toggle(event) {
var $relativeTarget = $(event.currentTarget);
var treeviewMenu = $relativeTarget.next();
var $parent = $relativeTarget.parent();
var treeviewMenu = $parent.find(Selector.TREEVIEW_MENU);
if (!treeviewMenu.is(Selector.TREEVIEW_MENU)) {
return;
if (!$parent.is(Selector.LI)) {
treeviewMenu = $parent.parent().find(Selector.TREEVIEW_MENU);
}
if (!treeviewMenu.is(Selector.TREEVIEW_MENU)) {
return;
}
}
event.preventDefault();
@ -926,12 +941,11 @@
onUnCheck: function onUnCheck(item) {
return item;
}
/**
* Class Definition
* ====================================================
*/
};
/**
* Class Definition
* ====================================================
*/
var TodoList =
/*#__PURE__*/
@ -1524,6 +1538,219 @@
return Dropdown;
}(jQuery);
/**
* --------------------------------------------
* AdminLTE Toasts.js
* License MIT
* --------------------------------------------
*/
var Toasts = function ($) {
/**
* Constants
* ====================================================
*/
var NAME = 'Toasts';
var DATA_KEY = 'lte.toasts';
var EVENT_KEY = "." + DATA_KEY;
var JQUERY_NO_CONFLICT = $.fn[NAME];
var Event = {
INIT: "init" + EVENT_KEY,
CREATED: "created" + EVENT_KEY,
REMOVED: "removed" + EVENT_KEY
};
var Selector = {
BODY: 'toast-body',
CONTAINER_TOP_RIGHT: '#toastsContainerTopRight',
CONTAINER_TOP_LEFT: '#toastsContainerTopLeft',
CONTAINER_BOTTOM_RIGHT: '#toastsContainerBottomRight',
CONTAINER_BOTTOM_LEFT: '#toastsContainerBottomLeft'
};
var ClassName = {
TOP_RIGHT: 'toasts-top-right',
TOP_LEFT: 'toasts-top-left',
BOTTOM_RIGHT: 'toasts-bottom-right',
BOTTOM_LEFT: 'toasts-bottom-left',
FADE: 'fade'
};
var Position = {
TOP_RIGHT: 'topRight',
TOP_LEFT: 'topLeft',
BOTTOM_RIGHT: 'bottomRight',
BOTTOM_LEFT: 'bottomLeft'
};
var Default = {
position: Position.TOP_RIGHT,
fixed: true,
autohide: false,
autoremove: true,
delay: 1000,
fade: true,
icon: null,
image: null,
imageAlt: null,
imageHeight: '25px',
title: null,
subtitle: null,
close: true,
body: null,
class: null
};
/**
* Class Definition
* ====================================================
*/
var Toasts =
/*#__PURE__*/
function () {
function Toasts(element, config) {
this._config = config;
this._prepareContainer();
var initEvent = $.Event(Event.INIT);
$('body').trigger(initEvent);
} // Public
var _proto = Toasts.prototype;
_proto.create = function create() {
var toast = $('<div class="toast" role="alert" aria-live="assertive" aria-atomic="true"/>');
toast.data('autohide', this._config.autohide);
toast.data('animation', this._config.fade);
if (this._config.class) {
toast.addClass(this._config.class);
}
if (this._config.delay && this._config.delay != 500) {
toast.data('delay', this._config.delay);
}
var toast_header = $('<div class="toast-header">');
if (this._config.image != null) {
var toast_image = $('<img />').addClass('rounded mr-2').attr('src', this._config.image).attr('alt', this._config.imageAlt);
if (this._config.imageHeight != null) {
toast_image.height(this._config.imageHeight).width('auto');
}
toast_header.append(toast_image);
}
if (this._config.icon != null) {
toast_header.append($('<i />').addClass('mr-2').addClass(this._config.icon));
}
if (this._config.title != null) {
toast_header.append($('<strong />').addClass('mr-auto').html(this._config.title));
}
if (this._config.subtitle != null) {
toast_header.append($('<small />').html(this._config.subtitle));
}
if (this._config.close == true) {
var toast_close = $('<button data-dismiss="toast" />').attr('type', 'button').addClass('ml-2 mb-1 close').attr('aria-label', 'Close').append('<span aria-hidden="true">&times;</span>');
if (this._config.title == null) {
toast_close.toggleClass('ml-2 ml-auto');
}
toast_header.append(toast_close);
}
toast.append(toast_header);
if (this._config.body != null) {
toast.append($('<div class="toast-body" />').html(this._config.body));
}
$(this._getContainerId()).prepend(toast);
var createdEvent = $.Event(Event.CREATED);
$('body').trigger(createdEvent);
toast.toast('show');
if (this._config.autoremove) {
toast.on('hidden.bs.toast', function () {
$(this).delay(200).remove();
var removedEvent = $.Event(Event.REMOVED);
$('body').trigger(removedEvent);
});
}
} // Static
;
_proto._getContainerId = function _getContainerId() {
if (this._config.position == Position.TOP_RIGHT) {
return Selector.CONTAINER_TOP_RIGHT;
} else if (this._config.position == Position.TOP_LEFT) {
return Selector.CONTAINER_TOP_LEFT;
} else if (this._config.position == Position.BOTTOM_RIGHT) {
return Selector.CONTAINER_BOTTOM_RIGHT;
} else if (this._config.position == Position.BOTTOM_LEFT) {
return Selector.CONTAINER_BOTTOM_LEFT;
}
};
_proto._prepareContainer = function _prepareContainer() {
if ($(this._getContainerId()).length === 0) {
var container = $('<div />').attr('id', this._getContainerId().replace('#', ''));
if (this._config.position == Position.TOP_RIGHT) {
container.addClass(ClassName.TOP_RIGHT);
} else if (this._config.position == Position.TOP_LEFT) {
container.addClass(ClassName.TOP_LEFT);
} else if (this._config.position == Position.BOTTOM_RIGHT) {
container.addClass(ClassName.BOTTOM_RIGHT);
} else if (this._config.position == Position.BOTTOM_LEFT) {
container.addClass(ClassName.BOTTOM_LEFT);
}
$('body').append(container);
}
if (this._config.fixed) {
$(this._getContainerId()).addClass('fixed');
} else {
$(this._getContainerId()).removeClass('fixed');
}
} // Static
;
Toasts._jQueryInterface = function _jQueryInterface(option, config) {
return this.each(function () {
var _config = $.extend({}, Default, config);
var toast = new Toasts($(this), _config);
if (option === 'create') {
toast[option]();
}
});
};
return Toasts;
}();
/**
* jQuery API
* ====================================================
*/
$.fn[NAME] = Toasts._jQueryInterface;
$.fn[NAME].Constructor = Toasts;
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return Toasts._jQueryInterface;
};
return Toasts;
}(jQuery);
exports.CardRefresh = CardRefresh;
exports.CardWidget = CardWidget;
exports.ControlSidebar = ControlSidebar;
@ -1531,6 +1758,7 @@
exports.Dropdown = Dropdown;
exports.Layout = Layout;
exports.PushMenu = PushMenu;
exports.Toasts = Toasts;
exports.TodoList = TodoList;
exports.Treeview = Treeview;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

36
dist/js/demo.js vendored
View File

@ -236,6 +236,24 @@
'bg-olive'
]
var accent_colors = [
'accent-primary',
'accent-warning',
'accent-info',
'accent-danger',
'accent-success',
'accent-indigo',
'accent-navy',
'accent-purple',
'accent-fuchsia',
'accent-pink',
'accent-maroon',
'accent-orange',
'accent-lime',
'accent-teal',
'accent-olive'
]
var sidebar_skins = [
'sidebar-dark-primary',
'sidebar-dark-warning',
@ -269,6 +287,22 @@
'sidebar-light-olive'
]
$container.append('<h6>Accent Color Variants</h6>')
var $accent_variants = $('<div />', {
'class': 'd-flex'
})
$container.append($accent_variants)
$container.append(createSkinBlock(accent_colors, function () {
var color = $(this).data('color')
var accent_class = color
var $body = $('body')
accent_colors.map(function (skin) {
$body.removeClass(skin)
})
$body.addClass(accent_class)
}))
$container.append('<h6>Dark Sidebar Variants</h6>')
var $sidebar_variants = $('<div />', {
'class': 'd-flex'
@ -331,7 +365,7 @@
colors.map(function (color) {
var $color = $('<div />', {
'class': (typeof color === 'object' ? color.join(' ') : color).replace('navbar-', 'bg-') + ' elevation-2'
'class': (typeof color === 'object' ? color.join(' ') : color).replace('navbar-', 'bg-').replace('accent-', 'bg-') + ' elevation-2'
})
$block.append($color)

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -52,6 +52,10 @@
FOOTER_LG_FIXED: 'layout-lg-footer-fixed',
FOOTER_XL_FIXED: 'layout-xl-footer-fixed'
};
/**
* Class Definition
* ====================================================
*/
var ControlSidebar =
/*#__PURE__*/
@ -307,12 +311,11 @@
var Default = {
scrollbarTheme: 'os-theme-light',
scrollbarAutoHide: 'l'
/**
* Class Definition
* ====================================================
*/
};
/**
* Class Definition
* ====================================================
*/
var Layout =
/*#__PURE__*/
@ -330,16 +333,16 @@
_proto.fixLayoutHeight = function fixLayoutHeight() {
var heights = {
window: $(window).height(),
header: $(Selector.HEADER).outerHeight(),
footer: $(Selector.FOOTER).outerHeight(),
sidebar: $(Selector.SIDEBAR).height()
header: $(Selector.HEADER).length !== 0 ? $(Selector.HEADER).outerHeight() : 0,
footer: $(Selector.FOOTER).length !== 0 ? $(Selector.FOOTER).outerHeight() : 0,
sidebar: $(Selector.SIDEBAR).length !== 0 ? $(Selector.SIDEBAR).height() : 0
};
var max = this._max(heights);
if ($('body').hasClass(ClassName.LAYOUT_FIXED)) {
$(Selector.CONTENT).css('min-height', max - heights.header - heights.footer); // $(Selector.SIDEBAR).css('min-height', max - heights.header)
$(Selector.CONTENT).css('min-height', max - heights.footer);
if ($('body').hasClass(ClassName.LAYOUT_FIXED)) {
if (typeof $.fn.overlayScrollbars !== 'undefined') {
$(Selector.SIDEBAR).overlayScrollbars({
className: this._config.scrollbarTheme,
@ -350,12 +353,6 @@
}
});
}
} else {
if (heights.window > heights.sidebar) {
$(Selector.CONTENT).css('min-height', heights.window - heights.header - heights.footer);
} else {
$(Selector.CONTENT).css('min-height', heights.sidebar - heights.header);
}
}
} // Private
;
@ -363,9 +360,7 @@
_proto._init = function _init() {
var _this = this;
// Enable transitions
$('body').removeClass(ClassName.HOLD); // Activate layout height watcher
// Activate layout height watcher
this.fixLayoutHeight();
$(Selector.SIDEBAR).on('collapsed.lte.treeview expanded.lte.treeview collapsed.lte.pushmenu expanded.lte.pushmenu', function () {
_this.fixLayoutHeight();
@ -374,6 +369,7 @@
_this.fixLayoutHeight();
});
$('body, html').css('height', 'auto');
$('body.hold-transition').removeClass('hold-transition');
};
_proto._max = function _max(numbers) {
@ -476,12 +472,11 @@
COLLAPSED: 'sidebar-collapse',
OPEN: 'sidebar-open',
SIDEBAR_MINI: 'sidebar-mini'
/**
* Class Definition
* ====================================================
*/
};
/**
* Class Definition
* ====================================================
*/
var PushMenu =
/*#__PURE__*/
@ -558,13 +553,22 @@
if (toggleState == ClassName.COLLAPSED) {
if (this._options.noTransitionAfterReload) {
$("body").addClass('hold-transition').addClass(ClassName.COLLAPSED).delay(10).queue(function () {
$("body").addClass('hold-transition').addClass(ClassName.COLLAPSED).delay(50).queue(function () {
$(this).removeClass('hold-transition');
$(this).dequeue();
});
} else {
$("body").addClass(ClassName.COLLAPSED);
}
} else {
if (this._options.noTransitionAfterReload) {
$("body").addClass('hold-transition').removeClass(ClassName.COLLAPSED).delay(50).queue(function () {
$(this).removeClass('hold-transition');
$(this).dequeue();
});
} else {
$("body").removeClass(ClassName.COLLAPSED);
}
}
}
} // Private
@ -685,12 +689,11 @@
trigger: Selector.DATA_WIDGET + " " + Selector.LINK,
animationSpeed: 300,
accordion: true
/**
* Class Definition
* ====================================================
*/
};
/**
* Class Definition
* ====================================================
*/
var Treeview =
/*#__PURE__*/
@ -738,10 +741,14 @@
_proto.toggle = function toggle(event) {
var $relativeTarget = $(event.currentTarget);
var treeviewMenu = $relativeTarget.next();
var treeviewMenu = $relativeTarget.parent().find(Selector.TREEVIEW_MENU);
if (!treeviewMenu.is(Selector.TREEVIEW_MENU)) {
return;
treeviewMenu = $relativeTarget.parent().parent().find(Selector.TREEVIEW_MENU);
if (!treeviewMenu.is(Selector.TREEVIEW_MENU)) {
return;
}
}
event.preventDefault();
@ -926,12 +933,11 @@
onUnCheck: function onUnCheck(item) {
return item;
}
/**
* Class Definition
* ====================================================
*/
};
/**
* Class Definition
* ====================================================
*/
var TodoList =
/*#__PURE__*/
@ -1524,6 +1530,219 @@
return Dropdown;
}(jQuery);
/**
* --------------------------------------------
* AdminLTE Toasts.js
* License MIT
* --------------------------------------------
*/
var Toasts = function ($) {
/**
* Constants
* ====================================================
*/
var NAME = 'Toasts';
var DATA_KEY = 'lte.toasts';
var EVENT_KEY = "." + DATA_KEY;
var JQUERY_NO_CONFLICT = $.fn[NAME];
var Event = {
INIT: "init" + EVENT_KEY,
CREATED: "created" + EVENT_KEY,
REMOVED: "removed" + EVENT_KEY
};
var Selector = {
BODY: 'toast-body',
CONTAINER_TOP_RIGHT: '#toastsContainerTopRight',
CONTAINER_TOP_LEFT: '#toastsContainerTopLeft',
CONTAINER_BOTTOM_RIGHT: '#toastsContainerBottomRight',
CONTAINER_BOTTOM_LEFT: '#toastsContainerBottomLeft'
};
var ClassName = {
TOP_RIGHT: 'toasts-top-right',
TOP_LEFT: 'toasts-top-left',
BOTTOM_RIGHT: 'toasts-bottom-right',
BOTTOM_LEFT: 'toasts-bottom-left',
FADE: 'fade'
};
var Position = {
TOP_RIGHT: 'topRight',
TOP_LEFT: 'topLeft',
BOTTOM_RIGHT: 'bottomRight',
BOTTOM_LEFT: 'bottomLeft'
};
var Default = {
position: Position.TOP_RIGHT,
fixed: true,
autohide: false,
autoremove: true,
delay: 1000,
fade: true,
icon: null,
image: null,
imageAlt: null,
imageHeight: '25px',
title: null,
subtitle: null,
close: true,
body: null,
class: null
};
/**
* Class Definition
* ====================================================
*/
var Toasts =
/*#__PURE__*/
function () {
function Toasts(element, config) {
this._config = config;
this._prepareContainer();
var initEvent = $.Event(Event.INIT);
$('body').trigger(initEvent);
} // Public
var _proto = Toasts.prototype;
_proto.create = function create() {
var toast = $('<div class="toast" role="alert" aria-live="assertive" aria-atomic="true"/>');
toast.data('autohide', this._config.autohide);
toast.data('animation', this._config.fade);
if (this._config.class) {
toast.addClass(this._config.class);
}
if (this._config.delay && this._config.delay != 500) {
toast.data('delay', this._config.delay);
}
var toast_header = $('<div class="toast-header">');
if (this._config.image != null) {
var toast_image = $('<img />').addClass('rounded mr-2').attr('src', this._config.image).attr('alt', this._config.imageAlt);
if (this._config.imageHeight != null) {
toast_image.height(this._config.imageHeight).width('auto');
}
toast_header.append(toast_image);
}
if (this._config.icon != null) {
toast_header.append($('<i />').addClass('mr-2').addClass(this._config.icon));
}
if (this._config.title != null) {
toast_header.append($('<strong />').addClass('mr-auto').html(this._config.title));
}
if (this._config.subtitle != null) {
toast_header.append($('<small />').html(this._config.subtitle));
}
if (this._config.close == true) {
var toast_close = $('<button data-dismiss="toast" />').attr('type', 'button').addClass('ml-2 mb-1 close').attr('aria-label', 'Close').append('<span aria-hidden="true">&times;</span>');
if (this._config.title == null) {
toast_close.toggleClass('ml-2 ml-auto');
}
toast_header.append(toast_close);
}
toast.append(toast_header);
if (this._config.body != null) {
toast.append($('<div class="toast-body" />').html(this._config.body));
}
$(this._getContainerId()).prepend(toast);
var createdEvent = $.Event(Event.CREATED);
$('body').trigger(createdEvent);
toast.toast('show');
if (this._config.autoremove) {
toast.on('hidden.bs.toast', function () {
$(this).delay(200).remove();
var removedEvent = $.Event(Event.REMOVED);
$('body').trigger(removedEvent);
});
}
} // Static
;
_proto._getContainerId = function _getContainerId() {
if (this._config.position == Position.TOP_RIGHT) {
return Selector.CONTAINER_TOP_RIGHT;
} else if (this._config.position == Position.TOP_LEFT) {
return Selector.CONTAINER_TOP_LEFT;
} else if (this._config.position == Position.BOTTOM_RIGHT) {
return Selector.CONTAINER_BOTTOM_RIGHT;
} else if (this._config.position == Position.BOTTOM_LEFT) {
return Selector.CONTAINER_BOTTOM_LEFT;
}
};
_proto._prepareContainer = function _prepareContainer() {
if ($(this._getContainerId()).length === 0) {
var container = $('<div />').attr('id', this._getContainerId().replace('#', ''));
if (this._config.position == Position.TOP_RIGHT) {
container.addClass(ClassName.TOP_RIGHT);
} else if (this._config.position == Position.TOP_LEFT) {
container.addClass(ClassName.TOP_LEFT);
} else if (this._config.position == Position.BOTTOM_RIGHT) {
container.addClass(ClassName.BOTTOM_RIGHT);
} else if (this._config.position == Position.BOTTOM_LEFT) {
container.addClass(ClassName.BOTTOM_LEFT);
}
$('body').append(container);
}
if (this._config.fixed) {
$(this._getContainerId()).addClass('fixed');
} else {
$(this._getContainerId()).removeClass('fixed');
}
} // Static
;
Toasts._jQueryInterface = function _jQueryInterface(option, config) {
return this.each(function () {
var _config = $.extend({}, Default, config);
var toast = new Toasts($(this), _config);
if (option === 'create') {
toast[option]();
}
});
};
return Toasts;
}();
/**
* jQuery API
* ====================================================
*/
$.fn[NAME] = Toasts._jQueryInterface;
$.fn[NAME].Constructor = Toasts;
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return Toasts._jQueryInterface;
};
return Toasts;
}(jQuery);
exports.CardRefresh = CardRefresh;
exports.CardWidget = CardWidget;
exports.ControlSidebar = ControlSidebar;
@ -1531,6 +1750,7 @@
exports.Dropdown = Dropdown;
exports.Layout = Layout;
exports.PushMenu = PushMenu;
exports.Toasts = Toasts;
exports.TodoList = TodoList;
exports.Treeview = Treeview;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -39,9 +39,145 @@
$container.append(
'<h5>Customize AdminLTE</h5><hr class="mb-2"/>'
+ '<h6>Navbar Variants</h6>'
)
var $no_border_checkbox = $('<input />', {
type : 'checkbox',
value : 1,
checked: $('.main-header').hasClass('border-bottom-0'),
'class': 'mr-1'
}).on('click', function () {
if ($(this).is(':checked')) {
$('.main-header').addClass('border-bottom-0')
} else {
$('.main-header').removeClass('border-bottom-0')
}
})
var $no_border_container = $('<div />', {'class': 'mb-1'}).append($no_border_checkbox).append('<span>No Navbar border</span>')
$container.append($no_border_container)
var $text_sm_body_checkbox = $('<input />', {
type : 'checkbox',
value : 1,
checked: $('body').hasClass('text-sm'),
'class': 'mr-1'
}).on('click', function () {
if ($(this).is(':checked')) {
$('body').addClass('text-sm')
} else {
$('body').removeClass('text-sm')
}
})
var $text_sm_body_container = $('<div />', {'class': 'mb-1'}).append($text_sm_body_checkbox).append('<span>Body small text</span>')
$container.append($text_sm_body_container)
var $text_sm_header_checkbox = $('<input />', {
type : 'checkbox',
value : 1,
checked: $('.main-header').hasClass('text-sm'),
'class': 'mr-1'
}).on('click', function () {
if ($(this).is(':checked')) {
$('.main-header').addClass('text-sm')
} else {
$('.main-header').removeClass('text-sm')
}
})
var $text_sm_header_container = $('<div />', {'class': 'mb-1'}).append($text_sm_header_checkbox).append('<span>Navbar small text</span>')
$container.append($text_sm_header_container)
var $text_sm_sidebar_checkbox = $('<input />', {
type : 'checkbox',
value : 1,
checked: $('.nav-sidebar').hasClass('text-sm'),
'class': 'mr-1'
}).on('click', function () {
if ($(this).is(':checked')) {
$('.nav-sidebar').addClass('text-sm')
} else {
$('.nav-sidebar').removeClass('text-sm')
}
})
var $text_sm_sidebar_container = $('<div />', {'class': 'mb-1'}).append($text_sm_sidebar_checkbox).append('<span>Sidebar nav small text</span>')
$container.append($text_sm_sidebar_container)
var $flat_sidebar_checkbox = $('<input />', {
type : 'checkbox',
value : 1,
checked: $('.nav-sidebar').hasClass('nav-flat'),
'class': 'mr-1'
}).on('click', function () {
if ($(this).is(':checked')) {
$('.nav-sidebar').addClass('nav-flat')
} else {
$('.nav-sidebar').removeClass('nav-flat')
}
})
var $flat_sidebar_container = $('<div />', {'class': 'mb-1'}).append($flat_sidebar_checkbox).append('<span>Sidebar nav flat style</span>')
$container.append($flat_sidebar_container)
var $compact_sidebar_checkbox = $('<input />', {
type : 'checkbox',
value : 1,
checked: $('.nav-sidebar').hasClass('nav-compact'),
'class': 'mr-1'
}).on('click', function () {
if ($(this).is(':checked')) {
$('.nav-sidebar').addClass('nav-compact')
} else {
$('.nav-sidebar').removeClass('nav-compact')
}
})
var $compact_sidebar_container = $('<div />', {'class': 'mb-1'}).append($compact_sidebar_checkbox).append('<span>Sidebar nav compact</span>')
$container.append($compact_sidebar_container)
var $child_indent_sidebar_checkbox = $('<input />', {
type : 'checkbox',
value : 1,
checked: $('.nav-sidebar').hasClass('nav-child-indent'),
'class': 'mr-1'
}).on('click', function () {
if ($(this).is(':checked')) {
$('.nav-sidebar').addClass('nav-child-indent')
} else {
$('.nav-sidebar').removeClass('nav-child-indent')
}
})
var $child_indent_sidebar_container = $('<div />', {'class': 'mb-1'}).append($child_indent_sidebar_checkbox).append('<span>Sidebar nav child indent</span>')
$container.append($child_indent_sidebar_container)
var $no_expand_sidebar_checkbox = $('<input />', {
type : 'checkbox',
value : 1,
checked: $('.main-sidebar').hasClass('sidebar-no-expand'),
'class': 'mr-1'
}).on('click', function () {
if ($(this).is(':checked')) {
$('.main-sidebar').addClass('sidebar-no-expand')
} else {
$('.main-sidebar').removeClass('sidebar-no-expand')
}
})
var $no_expand_sidebar_container = $('<div />', {'class': 'mb-1'}).append($no_expand_sidebar_checkbox).append('<span>Main Sidebar disable hover/focus auto expand</span>')
$container.append($no_expand_sidebar_container)
var $text_sm_brand_checkbox = $('<input />', {
type : 'checkbox',
value : 1,
checked: $('.brand-link').hasClass('text-sm'),
'class': 'mr-1'
}).on('click', function () {
if ($(this).is(':checked')) {
$('.brand-link').addClass('text-sm')
} else {
$('.brand-link').removeClass('text-sm')
}
})
var $text_sm_brand_container = $('<div />', {'class': 'mb-4'}).append($text_sm_brand_checkbox).append('<span>Brand small text</span>')
$container.append($text_sm_brand_container)
$container.append('<h6>Navbar Variants</h6>')
var $navbar_variants = $('<div />', {
'class': 'd-flex'
})
@ -67,26 +203,6 @@
$container.append($navbar_variants)
var $checkbox_container = $('<div />', {
'class': 'mb-4'
})
var $navbar_border = $('<input />', {
type : 'checkbox',
value : 1,
checked: $('.main-header').hasClass('border-bottom-0'),
'class': 'mr-1'
}).on('click', function () {
if ($(this).is(':checked')) {
$('.main-header').addClass('border-bottom-0')
} else {
$('.main-header').removeClass('border-bottom-0')
}
})
$checkbox_container.append($navbar_border)
$checkbox_container.append('<span>No Navbar border</span>')
$container.append($checkbox_container)
var sidebar_colors = [
'bg-primary',
'bg-warning',

View File

@ -64,7 +64,7 @@ $(function () {
}
// World map by jvectormap
$('#world-map').vectorMap({
map : 'world_en',
map : 'usa_en',
backgroundColor : 'transparent',
regionStyle : {
initial: {

View File

@ -118,235 +118,12 @@ $(function () {
*/
$('#world-map-markers').mapael({
map: {
name : "world_countries",
name : "usa_states",
zoom: {
enabled: true,
maxLevel: 10
},
defaultPlot: {
size: 12,
attrs: {
"stroke-width": 0,
"stroke-linejoin": "round"
},
attrsHover: {
size: 15,
"fill": '#28a745',
"stroke-width": 0,
animDuration: 0
},
}
},
plots: {
"marker1": {
latitude: 41.90,
longitude: 12.45,
href: '#',
tooltip: {
content: 'Vatican City'
}
},
"marker2": {
latitude: 43.73,
longitude: 7.41,
href: '#',
tooltip: {
content: 'Monaco'
}
},
"marker3": {
latitude: -0.52,
longitude: 166.93,
href: '#',
tooltip: {
content: 'Nauru'
}
},
"marker4": {
latitude: -8.51,
longitude: 179.21,
href: '#',
tooltip: {
content: 'Tuvalu'
}
},
"marker5": {
latitude: 43.93,
longitude: 12.46,
href: '#',
tooltip: {
content: 'San Marino'
}
},
"marker6": {
latitude: 47.14,
longitude: 9.52,
href: '#',
tooltip: {
content: 'Liechtenstein'
}
},
"marker7": {
latitude: 7.11,
longitude: 171.06,
href: '#',
tooltip: {
content: 'Marshall Islands'
}
},
"marker8": {
latitude: 17.3,
longitude: -62.73,
href: '#',
tooltip: {
content: 'Saint Kitts and Nevis'
}
},
"marker9": {
latitude: 3.2,
longitude: 73.22,
href: '#',
tooltip: {
content: 'Maldives'
}
},
"marker10": {
latitude: 35.88,
longitude: 14.5,
href: '#',
tooltip: {
content: 'Malta'
}
},
"marker11": {
latitude: 12.05,
longitude: -61.75,
href: '#',
tooltip: {
content: 'Grenada'
}
},
"marker12": {
latitude: 13.16,
longitude: -61.23,
href: '#',
tooltip: {
content: 'Saint Vincent and the Grenadines'
}
},
"marker13": {
latitude: 13.16,
longitude: -59.55,
href: '#',
tooltip: {
content: 'Barbados'
}
},
"marker14": {
latitude: 17.11,
longitude: -61.85,
href: '#',
tooltip: {
content: 'Antigua and Barbuda'
}
},
"marker15": {
latitude: -4.61,
longitude: 55.45,
href: '#',
tooltip: {
content: 'Seychelles'
}
},
"marker16": {
latitude: 7.35,
longitude: 134.46,
href: '#',
tooltip: {
content: 'Palau'
}
},
"marker17": {
latitude: 42.5,
longitude: 1.51,
href: '#',
tooltip: {
content: 'Andorra'
}
},
"marker18": {
latitude: 14.01,
longitude: -60.98,
href: '#',
tooltip: {
content: 'Saint Lucia'
}
},
"marker19": {
latitude: 6.91,
longitude: 158.18,
href: '#',
tooltip: {
content: 'Federated States of Micronesia'
}
},
"marker20": {
latitude: 1.3,
longitude: 103.8,
href: '#',
tooltip: {
content: 'Singapore'
}
},
"marker21": {
latitude: 1.46,
longitude: 173.03,
href: '#',
tooltip: {
content: 'Kiribati'
}
},
"marker22": {
latitude: -21.13,
longitude: -175.2,
href: '#',
tooltip: {
content: 'Tonga'
}
},
"marker23": {
latitude: 15.3,
longitude: -61.38,
href: '#',
tooltip: {
content: 'Dominica'
}
},
"marker24": {
latitude: -20.2,
longitude: 57.5,
href: '#',
tooltip: {
content: 'Mauritius'
}
},
"marker25": {
latitude: 26.02,
longitude: 50.55,
href: '#',
tooltip: {
content: 'Bahrain'
}
},
"marker26": {
latitude: 0.33,
longitude: 6.73,
href: '#',
tooltip: {
content: 'São Tomé and Príncipe'
}
}
}
}
);