2019-07-15 13:32:00 +00:00
|
|
|
/*!
|
2020-04-01 13:20:05 +00:00
|
|
|
* AdminLTE v3.0.3 (https://adminlte.io)
|
2020-01-17 08:05:37 +00:00
|
|
|
* Copyright 2014-2020 Colorlib <http://colorlib.com>
|
2019-10-29 08:39:22 +00:00
|
|
|
* Licensed under MIT (https://github.com/ColorlibHQ/AdminLTE/blob/master/LICENSE)
|
2019-07-15 13:32:00 +00:00
|
|
|
*/
|
|
|
|
(function (global, factory) {
|
|
|
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
|
|
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
|
|
|
(global = global || self, factory(global.adminlte = {}));
|
2019-11-20 08:41:28 +00:00
|
|
|
}(this, (function (exports) { 'use strict';
|
2019-07-15 13:32:00 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* --------------------------------------------
|
|
|
|
* AdminLTE ControlSidebar.js
|
|
|
|
* License MIT
|
|
|
|
* --------------------------------------------
|
|
|
|
*/
|
|
|
|
var ControlSidebar = function ($) {
|
|
|
|
/**
|
|
|
|
* Constants
|
|
|
|
* ====================================================
|
|
|
|
*/
|
|
|
|
var NAME = 'ControlSidebar';
|
2019-08-26 08:39:29 +00:00
|
|
|
var DATA_KEY = 'lte.controlsidebar';
|
|
|
|
var EVENT_KEY = "." + DATA_KEY;
|
2019-07-15 13:32:00 +00:00
|
|
|
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
2019-08-26 08:39:29 +00:00
|
|
|
var Event = {
|
|
|
|
COLLAPSED: "collapsed" + EVENT_KEY,
|
|
|
|
EXPANDED: "expanded" + EVENT_KEY
|
|
|
|
};
|
2019-07-15 13:32:00 +00:00
|
|
|
var Selector = {
|
|
|
|
CONTROL_SIDEBAR: '.control-sidebar',
|
2019-09-01 13:16:39 +00:00
|
|
|
CONTROL_SIDEBAR_CONTENT: '.control-sidebar-content',
|
2019-07-15 13:32:00 +00:00
|
|
|
DATA_TOGGLE: '[data-widget="control-sidebar"]',
|
2019-09-01 13:16:39 +00:00
|
|
|
CONTENT: '.content-wrapper',
|
|
|
|
HEADER: '.main-header',
|
|
|
|
FOOTER: '.main-footer'
|
2019-07-15 13:32:00 +00:00
|
|
|
};
|
|
|
|
var ClassName = {
|
|
|
|
CONTROL_SIDEBAR_ANIMATE: 'control-sidebar-animate',
|
|
|
|
CONTROL_SIDEBAR_OPEN: 'control-sidebar-open',
|
2019-09-01 13:16:39 +00:00
|
|
|
CONTROL_SIDEBAR_SLIDE: 'control-sidebar-slide-open',
|
|
|
|
LAYOUT_FIXED: 'layout-fixed',
|
|
|
|
NAVBAR_FIXED: 'layout-navbar-fixed',
|
|
|
|
NAVBAR_SM_FIXED: 'layout-sm-navbar-fixed',
|
|
|
|
NAVBAR_MD_FIXED: 'layout-md-navbar-fixed',
|
|
|
|
NAVBAR_LG_FIXED: 'layout-lg-navbar-fixed',
|
|
|
|
NAVBAR_XL_FIXED: 'layout-xl-navbar-fixed',
|
|
|
|
FOOTER_FIXED: 'layout-footer-fixed',
|
|
|
|
FOOTER_SM_FIXED: 'layout-sm-footer-fixed',
|
|
|
|
FOOTER_MD_FIXED: 'layout-md-footer-fixed',
|
|
|
|
FOOTER_LG_FIXED: 'layout-lg-footer-fixed',
|
|
|
|
FOOTER_XL_FIXED: 'layout-xl-footer-fixed'
|
2019-07-15 13:32:00 +00:00
|
|
|
};
|
2019-11-20 08:41:28 +00:00
|
|
|
var Default = {
|
|
|
|
controlsidebarSlide: true,
|
|
|
|
scrollbarTheme: 'os-theme-light',
|
|
|
|
scrollbarAutoHide: 'l'
|
|
|
|
};
|
2019-10-02 10:44:03 +00:00
|
|
|
/**
|
|
|
|
* Class Definition
|
|
|
|
* ====================================================
|
|
|
|
*/
|
2019-07-15 13:32:00 +00:00
|
|
|
|
|
|
|
var ControlSidebar =
|
|
|
|
/*#__PURE__*/
|
|
|
|
function () {
|
|
|
|
function ControlSidebar(element, config) {
|
|
|
|
this._element = element;
|
2019-09-01 13:16:39 +00:00
|
|
|
this._config = config;
|
|
|
|
|
|
|
|
this._init();
|
2019-07-15 13:32:00 +00:00
|
|
|
} // Public
|
|
|
|
|
|
|
|
|
|
|
|
var _proto = ControlSidebar.prototype;
|
|
|
|
|
2020-01-17 08:05:37 +00:00
|
|
|
_proto.collapse = function collapse() {
|
2019-07-15 13:32:00 +00:00
|
|
|
// Show the control sidebar
|
2019-08-26 08:39:29 +00:00
|
|
|
if (this._config.controlsidebarSlide) {
|
2019-07-15 13:32:00 +00:00
|
|
|
$('html').addClass(ClassName.CONTROL_SIDEBAR_ANIMATE);
|
|
|
|
$('body').removeClass(ClassName.CONTROL_SIDEBAR_SLIDE).delay(300).queue(function () {
|
|
|
|
$(Selector.CONTROL_SIDEBAR).hide();
|
|
|
|
$('html').removeClass(ClassName.CONTROL_SIDEBAR_ANIMATE);
|
|
|
|
$(this).dequeue();
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
$('body').removeClass(ClassName.CONTROL_SIDEBAR_OPEN);
|
|
|
|
}
|
2019-08-26 08:39:29 +00:00
|
|
|
|
2020-01-17 08:05:37 +00:00
|
|
|
var collapsedEvent = $.Event(Event.COLLAPSED);
|
|
|
|
$(this._element).trigger(collapsedEvent);
|
2019-07-15 13:32:00 +00:00
|
|
|
};
|
|
|
|
|
2020-01-17 08:05:37 +00:00
|
|
|
_proto.show = function show() {
|
2019-07-15 13:32:00 +00:00
|
|
|
// Collapse the control sidebar
|
2019-08-26 08:39:29 +00:00
|
|
|
if (this._config.controlsidebarSlide) {
|
2019-07-15 13:32:00 +00:00
|
|
|
$('html').addClass(ClassName.CONTROL_SIDEBAR_ANIMATE);
|
2019-08-26 08:39:29 +00:00
|
|
|
$(Selector.CONTROL_SIDEBAR).show().delay(10).queue(function () {
|
2019-07-15 13:32:00 +00:00
|
|
|
$('body').addClass(ClassName.CONTROL_SIDEBAR_SLIDE).delay(300).queue(function () {
|
|
|
|
$('html').removeClass(ClassName.CONTROL_SIDEBAR_ANIMATE);
|
|
|
|
$(this).dequeue();
|
|
|
|
});
|
|
|
|
$(this).dequeue();
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
$('body').addClass(ClassName.CONTROL_SIDEBAR_OPEN);
|
|
|
|
}
|
2019-08-26 08:39:29 +00:00
|
|
|
|
2020-01-17 08:05:37 +00:00
|
|
|
var expandedEvent = $.Event(Event.EXPANDED);
|
|
|
|
$(this._element).trigger(expandedEvent);
|
2019-07-15 13:32:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
_proto.toggle = function toggle() {
|
2020-01-17 08:05:37 +00:00
|
|
|
var shouldClose = $('body').hasClass(ClassName.CONTROL_SIDEBAR_OPEN) || $('body').hasClass(ClassName.CONTROL_SIDEBAR_SLIDE);
|
2019-07-15 13:32:00 +00:00
|
|
|
|
2020-01-17 08:05:37 +00:00
|
|
|
if (shouldClose) {
|
2019-07-15 13:32:00 +00:00
|
|
|
// Close the control sidebar
|
|
|
|
this.collapse();
|
2020-01-17 08:05:37 +00:00
|
|
|
} else {
|
|
|
|
// Open the control sidebar
|
|
|
|
this.show();
|
2019-07-15 13:32:00 +00:00
|
|
|
}
|
|
|
|
} // Private
|
|
|
|
;
|
|
|
|
|
2019-09-01 13:16:39 +00:00
|
|
|
_proto._init = function _init() {
|
|
|
|
var _this = this;
|
|
|
|
|
|
|
|
this._fixHeight();
|
|
|
|
|
|
|
|
this._fixScrollHeight();
|
|
|
|
|
|
|
|
$(window).resize(function () {
|
|
|
|
_this._fixHeight();
|
|
|
|
|
|
|
|
_this._fixScrollHeight();
|
|
|
|
});
|
|
|
|
$(window).scroll(function () {
|
|
|
|
if ($('body').hasClass(ClassName.CONTROL_SIDEBAR_OPEN) || $('body').hasClass(ClassName.CONTROL_SIDEBAR_SLIDE)) {
|
|
|
|
_this._fixScrollHeight();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
|
|
|
_proto._fixScrollHeight = function _fixScrollHeight() {
|
|
|
|
var heights = {
|
|
|
|
scroll: $(document).height(),
|
|
|
|
window: $(window).height(),
|
|
|
|
header: $(Selector.HEADER).outerHeight(),
|
|
|
|
footer: $(Selector.FOOTER).outerHeight()
|
|
|
|
};
|
|
|
|
var positions = {
|
|
|
|
bottom: Math.abs(heights.window + $(window).scrollTop() - heights.scroll),
|
|
|
|
top: $(window).scrollTop()
|
|
|
|
};
|
|
|
|
var navbarFixed = false;
|
|
|
|
var footerFixed = false;
|
|
|
|
|
|
|
|
if ($('body').hasClass(ClassName.LAYOUT_FIXED)) {
|
|
|
|
if ($('body').hasClass(ClassName.NAVBAR_FIXED) || $('body').hasClass(ClassName.NAVBAR_SM_FIXED) || $('body').hasClass(ClassName.NAVBAR_MD_FIXED) || $('body').hasClass(ClassName.NAVBAR_LG_FIXED) || $('body').hasClass(ClassName.NAVBAR_XL_FIXED)) {
|
|
|
|
if ($(Selector.HEADER).css("position") === "fixed") {
|
|
|
|
navbarFixed = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($('body').hasClass(ClassName.FOOTER_FIXED) || $('body').hasClass(ClassName.FOOTER_SM_FIXED) || $('body').hasClass(ClassName.FOOTER_MD_FIXED) || $('body').hasClass(ClassName.FOOTER_LG_FIXED) || $('body').hasClass(ClassName.FOOTER_XL_FIXED)) {
|
|
|
|
if ($(Selector.FOOTER).css("position") === "fixed") {
|
|
|
|
footerFixed = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (positions.top === 0 && positions.bottom === 0) {
|
|
|
|
$(Selector.CONTROL_SIDEBAR).css('bottom', heights.footer);
|
|
|
|
$(Selector.CONTROL_SIDEBAR).css('top', heights.header);
|
|
|
|
$(Selector.CONTROL_SIDEBAR + ', ' + Selector.CONTROL_SIDEBAR + ' ' + Selector.CONTROL_SIDEBAR_CONTENT).css('height', heights.window - (heights.header + heights.footer));
|
|
|
|
} else if (positions.bottom <= heights.footer) {
|
|
|
|
if (footerFixed === false) {
|
|
|
|
$(Selector.CONTROL_SIDEBAR).css('bottom', heights.footer - positions.bottom);
|
|
|
|
$(Selector.CONTROL_SIDEBAR + ', ' + Selector.CONTROL_SIDEBAR + ' ' + Selector.CONTROL_SIDEBAR_CONTENT).css('height', heights.window - (heights.footer - positions.bottom));
|
|
|
|
} else {
|
|
|
|
$(Selector.CONTROL_SIDEBAR).css('bottom', heights.footer);
|
|
|
|
}
|
|
|
|
} else if (positions.top <= heights.header) {
|
|
|
|
if (navbarFixed === false) {
|
|
|
|
$(Selector.CONTROL_SIDEBAR).css('top', heights.header - positions.top);
|
|
|
|
$(Selector.CONTROL_SIDEBAR + ', ' + Selector.CONTROL_SIDEBAR + ' ' + Selector.CONTROL_SIDEBAR_CONTENT).css('height', heights.window - (heights.header - positions.top));
|
|
|
|
} else {
|
|
|
|
$(Selector.CONTROL_SIDEBAR).css('top', heights.header);
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
if (navbarFixed === false) {
|
|
|
|
$(Selector.CONTROL_SIDEBAR).css('top', 0);
|
|
|
|
$(Selector.CONTROL_SIDEBAR + ', ' + Selector.CONTROL_SIDEBAR + ' ' + Selector.CONTROL_SIDEBAR_CONTENT).css('height', heights.window);
|
|
|
|
} else {
|
|
|
|
$(Selector.CONTROL_SIDEBAR).css('top', heights.header);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
_proto._fixHeight = function _fixHeight() {
|
|
|
|
var heights = {
|
|
|
|
window: $(window).height(),
|
|
|
|
header: $(Selector.HEADER).outerHeight(),
|
|
|
|
footer: $(Selector.FOOTER).outerHeight()
|
|
|
|
};
|
|
|
|
|
|
|
|
if ($('body').hasClass(ClassName.LAYOUT_FIXED)) {
|
|
|
|
var sidebarHeight = heights.window - heights.header;
|
|
|
|
|
|
|
|
if ($('body').hasClass(ClassName.FOOTER_FIXED) || $('body').hasClass(ClassName.FOOTER_SM_FIXED) || $('body').hasClass(ClassName.FOOTER_MD_FIXED) || $('body').hasClass(ClassName.FOOTER_LG_FIXED) || $('body').hasClass(ClassName.FOOTER_XL_FIXED)) {
|
|
|
|
if ($(Selector.FOOTER).css("position") === "fixed") {
|
|
|
|
sidebarHeight = heights.window - heights.header - heights.footer;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
$(Selector.CONTROL_SIDEBAR + ' ' + Selector.CONTROL_SIDEBAR_CONTENT).css('height', sidebarHeight);
|
|
|
|
|
|
|
|
if (typeof $.fn.overlayScrollbars !== 'undefined') {
|
|
|
|
$(Selector.CONTROL_SIDEBAR + ' ' + Selector.CONTROL_SIDEBAR_CONTENT).overlayScrollbars({
|
|
|
|
className: this._config.scrollbarTheme,
|
|
|
|
sizeAutoCapable: true,
|
|
|
|
scrollbars: {
|
|
|
|
autoHide: this._config.scrollbarAutoHide,
|
|
|
|
clickScrolling: true
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
2019-07-15 13:32:00 +00:00
|
|
|
} // Static
|
|
|
|
;
|
|
|
|
|
|
|
|
ControlSidebar._jQueryInterface = function _jQueryInterface(operation) {
|
|
|
|
return this.each(function () {
|
|
|
|
var data = $(this).data(DATA_KEY);
|
|
|
|
|
2019-11-20 08:41:28 +00:00
|
|
|
var _options = $.extend({}, Default, $(this).data());
|
|
|
|
|
2019-07-15 13:32:00 +00:00
|
|
|
if (!data) {
|
2019-11-20 08:41:28 +00:00
|
|
|
data = new ControlSidebar(this, _options);
|
2019-07-15 13:32:00 +00:00
|
|
|
$(this).data(DATA_KEY, data);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (data[operation] === 'undefined') {
|
|
|
|
throw new Error(operation + " is not a function");
|
|
|
|
}
|
|
|
|
|
|
|
|
data[operation]();
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
|
|
|
return ControlSidebar;
|
|
|
|
}();
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
* Data Api implementation
|
|
|
|
* ====================================================
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
$(document).on('click', Selector.DATA_TOGGLE, function (event) {
|
|
|
|
event.preventDefault();
|
|
|
|
|
|
|
|
ControlSidebar._jQueryInterface.call($(this), 'toggle');
|
|
|
|
});
|
|
|
|
/**
|
|
|
|
* jQuery API
|
|
|
|
* ====================================================
|
|
|
|
*/
|
|
|
|
|
|
|
|
$.fn[NAME] = ControlSidebar._jQueryInterface;
|
|
|
|
$.fn[NAME].Constructor = ControlSidebar;
|
|
|
|
|
|
|
|
$.fn[NAME].noConflict = function () {
|
|
|
|
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
|
|
|
return ControlSidebar._jQueryInterface;
|
|
|
|
};
|
|
|
|
|
|
|
|
return ControlSidebar;
|
|
|
|
}(jQuery);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* --------------------------------------------
|
|
|
|
* AdminLTE Layout.js
|
|
|
|
* License MIT
|
|
|
|
* --------------------------------------------
|
|
|
|
*/
|
|
|
|
var Layout = function ($) {
|
|
|
|
/**
|
|
|
|
* Constants
|
|
|
|
* ====================================================
|
|
|
|
*/
|
|
|
|
var NAME = 'Layout';
|
|
|
|
var DATA_KEY = 'lte.layout';
|
|
|
|
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
|
|
|
var Selector = {
|
|
|
|
HEADER: '.main-header',
|
|
|
|
MAIN_SIDEBAR: '.main-sidebar',
|
|
|
|
SIDEBAR: '.main-sidebar .sidebar',
|
|
|
|
CONTENT: '.content-wrapper',
|
|
|
|
BRAND: '.brand-link',
|
|
|
|
CONTENT_HEADER: '.content-header',
|
|
|
|
WRAPPER: '.wrapper',
|
|
|
|
CONTROL_SIDEBAR: '.control-sidebar',
|
2020-01-17 08:05:37 +00:00
|
|
|
CONTROL_SIDEBAR_CONTENT: '.control-sidebar-content',
|
|
|
|
CONTROL_SIDEBAR_BTN: '[data-widget="control-sidebar"]',
|
2019-07-15 13:32:00 +00:00
|
|
|
LAYOUT_FIXED: '.layout-fixed',
|
2019-10-19 09:38:03 +00:00
|
|
|
FOOTER: '.main-footer',
|
2019-10-29 08:39:22 +00:00
|
|
|
PUSHMENU_BTN: '[data-widget="pushmenu"]',
|
2019-10-19 09:38:03 +00:00
|
|
|
LOGIN_BOX: '.login-box',
|
|
|
|
REGISTER_BOX: '.register-box'
|
2019-07-15 13:32:00 +00:00
|
|
|
};
|
|
|
|
var ClassName = {
|
|
|
|
HOLD: 'hold-transition',
|
|
|
|
SIDEBAR: 'main-sidebar',
|
|
|
|
CONTENT_FIXED: 'content-fixed',
|
|
|
|
SIDEBAR_FOCUSED: 'sidebar-focused',
|
|
|
|
LAYOUT_FIXED: 'layout-fixed',
|
|
|
|
NAVBAR_FIXED: 'layout-navbar-fixed',
|
2019-10-19 09:38:03 +00:00
|
|
|
FOOTER_FIXED: 'layout-footer-fixed',
|
|
|
|
LOGIN_PAGE: 'login-page',
|
2020-01-17 08:05:37 +00:00
|
|
|
REGISTER_PAGE: 'register-page',
|
|
|
|
CONTROL_SIDEBAR_SLIDE_OPEN: 'control-sidebar-slide-open',
|
|
|
|
CONTROL_SIDEBAR_OPEN: 'control-sidebar-open'
|
2019-07-15 13:32:00 +00:00
|
|
|
};
|
|
|
|
var Default = {
|
|
|
|
scrollbarTheme: 'os-theme-light',
|
2020-04-01 13:20:05 +00:00
|
|
|
scrollbarAutoHide: 'l',
|
|
|
|
panelAutoHeight: true,
|
|
|
|
loginRegisterAutoHeight: true
|
2019-07-15 13:32:00 +00:00
|
|
|
};
|
2019-10-02 10:44:03 +00:00
|
|
|
/**
|
|
|
|
* Class Definition
|
|
|
|
* ====================================================
|
|
|
|
*/
|
2019-07-15 13:32:00 +00:00
|
|
|
|
|
|
|
var Layout =
|
|
|
|
/*#__PURE__*/
|
|
|
|
function () {
|
|
|
|
function Layout(element, config) {
|
|
|
|
this._config = config;
|
|
|
|
this._element = element;
|
|
|
|
|
|
|
|
this._init();
|
|
|
|
} // Public
|
|
|
|
|
|
|
|
|
|
|
|
var _proto = Layout.prototype;
|
|
|
|
|
2020-01-17 08:05:37 +00:00
|
|
|
_proto.fixLayoutHeight = function fixLayoutHeight(extra) {
|
|
|
|
if (extra === void 0) {
|
|
|
|
extra = null;
|
|
|
|
}
|
|
|
|
|
|
|
|
var control_sidebar = 0;
|
|
|
|
|
|
|
|
if ($('body').hasClass(ClassName.CONTROL_SIDEBAR_SLIDE_OPEN) || $('body').hasClass(ClassName.CONTROL_SIDEBAR_OPEN) || extra == 'control_sidebar') {
|
|
|
|
control_sidebar = $(Selector.CONTROL_SIDEBAR_CONTENT).height();
|
|
|
|
}
|
|
|
|
|
2019-07-15 13:32:00 +00:00
|
|
|
var heights = {
|
|
|
|
window: $(window).height(),
|
2019-10-02 10:44:03 +00:00
|
|
|
header: $(Selector.HEADER).length !== 0 ? $(Selector.HEADER).outerHeight() : 0,
|
|
|
|
footer: $(Selector.FOOTER).length !== 0 ? $(Selector.FOOTER).outerHeight() : 0,
|
2020-01-17 08:05:37 +00:00
|
|
|
sidebar: $(Selector.SIDEBAR).length !== 0 ? $(Selector.SIDEBAR).height() : 0,
|
|
|
|
control_sidebar: control_sidebar
|
2019-07-15 13:32:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
var max = this._max(heights);
|
|
|
|
|
2020-04-01 13:20:05 +00:00
|
|
|
var offset = this._config.panelAutoHeight;
|
|
|
|
|
|
|
|
if (offset === true) {
|
|
|
|
offset = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (offset !== false) {
|
|
|
|
if (max == heights.control_sidebar) {
|
|
|
|
$(Selector.CONTENT).css('min-height', max + offset);
|
|
|
|
} else if (max == heights.window) {
|
|
|
|
$(Selector.CONTENT).css('min-height', max + offset - heights.header - heights.footer);
|
|
|
|
} else {
|
|
|
|
$(Selector.CONTENT).css('min-height', max + offset - heights.header);
|
|
|
|
}
|
2019-10-19 09:38:03 +00:00
|
|
|
}
|
2019-07-15 13:32:00 +00:00
|
|
|
|
2019-10-02 10:44:03 +00:00
|
|
|
if ($('body').hasClass(ClassName.LAYOUT_FIXED)) {
|
2020-04-01 13:20:05 +00:00
|
|
|
if (offset !== false) {
|
|
|
|
$(Selector.CONTENT).css('min-height', max + offset - heights.header - heights.footer);
|
|
|
|
}
|
2019-10-19 09:38:03 +00:00
|
|
|
|
2019-07-15 13:32:00 +00:00
|
|
|
if (typeof $.fn.overlayScrollbars !== 'undefined') {
|
|
|
|
$(Selector.SIDEBAR).overlayScrollbars({
|
|
|
|
className: this._config.scrollbarTheme,
|
|
|
|
sizeAutoCapable: true,
|
|
|
|
scrollbars: {
|
|
|
|
autoHide: this._config.scrollbarAutoHide,
|
|
|
|
clickScrolling: true
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
2020-04-01 13:20:05 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
_proto.fixLoginRegisterHeight = function fixLoginRegisterHeight() {
|
|
|
|
if ($(Selector.LOGIN_BOX + ', ' + Selector.REGISTER_BOX).length === 0) {
|
|
|
|
$('body, html').css('height', 'auto');
|
|
|
|
} else if ($(Selector.LOGIN_BOX + ', ' + Selector.REGISTER_BOX).length !== 0) {
|
|
|
|
var box_height = $(Selector.LOGIN_BOX + ', ' + Selector.REGISTER_BOX).height();
|
|
|
|
|
|
|
|
if ($('body').css('min-height') !== box_height) {
|
|
|
|
$('body').css('min-height', box_height);
|
|
|
|
}
|
|
|
|
}
|
2019-07-15 13:32:00 +00:00
|
|
|
} // Private
|
|
|
|
;
|
|
|
|
|
|
|
|
_proto._init = function _init() {
|
|
|
|
var _this = this;
|
|
|
|
|
2019-10-02 10:44:03 +00:00
|
|
|
// Activate layout height watcher
|
2019-07-15 13:32:00 +00:00
|
|
|
this.fixLayoutHeight();
|
2020-04-01 13:20:05 +00:00
|
|
|
|
|
|
|
if (this._config.loginRegisterAutoHeight === true) {
|
|
|
|
this.fixLoginRegisterHeight();
|
|
|
|
} else if (Number.isInteger(this._config.loginRegisterAutoHeight)) {
|
|
|
|
setInterval(this.fixLoginRegisterHeight, this._config.loginRegisterAutoHeight);
|
|
|
|
}
|
|
|
|
|
2019-10-29 08:39:22 +00:00
|
|
|
$(Selector.SIDEBAR).on('collapsed.lte.treeview expanded.lte.treeview', function () {
|
|
|
|
_this.fixLayoutHeight();
|
|
|
|
});
|
|
|
|
$(Selector.PUSHMENU_BTN).on('collapsed.lte.pushmenu shown.lte.pushmenu', function () {
|
2019-07-15 13:32:00 +00:00
|
|
|
_this.fixLayoutHeight();
|
|
|
|
});
|
2020-01-17 08:05:37 +00:00
|
|
|
$(Selector.CONTROL_SIDEBAR_BTN).on('collapsed.lte.controlsidebar', function () {
|
|
|
|
_this.fixLayoutHeight();
|
|
|
|
}).on('expanded.lte.controlsidebar', function () {
|
|
|
|
_this.fixLayoutHeight('control_sidebar');
|
|
|
|
});
|
2019-07-15 13:32:00 +00:00
|
|
|
$(window).resize(function () {
|
|
|
|
_this.fixLayoutHeight();
|
|
|
|
});
|
2019-10-02 10:44:03 +00:00
|
|
|
$('body.hold-transition').removeClass('hold-transition');
|
2019-07-15 13:32:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
_proto._max = function _max(numbers) {
|
|
|
|
// Calculate the maximum number in a list
|
|
|
|
var max = 0;
|
|
|
|
Object.keys(numbers).forEach(function (key) {
|
|
|
|
if (numbers[key] > max) {
|
|
|
|
max = numbers[key];
|
|
|
|
}
|
|
|
|
});
|
|
|
|
return max;
|
|
|
|
} // Static
|
|
|
|
;
|
|
|
|
|
|
|
|
Layout._jQueryInterface = function _jQueryInterface(config) {
|
2020-01-17 08:05:37 +00:00
|
|
|
if (config === void 0) {
|
|
|
|
config = '';
|
|
|
|
}
|
|
|
|
|
2019-07-15 13:32:00 +00:00
|
|
|
return this.each(function () {
|
|
|
|
var data = $(this).data(DATA_KEY);
|
|
|
|
|
2019-11-20 08:41:28 +00:00
|
|
|
var _options = $.extend({}, Default, $(this).data());
|
2019-07-15 13:32:00 +00:00
|
|
|
|
|
|
|
if (!data) {
|
2019-11-20 08:41:28 +00:00
|
|
|
data = new Layout($(this), _options);
|
2019-07-15 13:32:00 +00:00
|
|
|
$(this).data(DATA_KEY, data);
|
|
|
|
}
|
|
|
|
|
2020-01-17 08:05:37 +00:00
|
|
|
if (config === 'init' || config === '') {
|
|
|
|
data['_init']();
|
2020-04-01 13:20:05 +00:00
|
|
|
} else if (config === 'fixLayoutHeight' || config === 'fixLoginRegisterHeight') {
|
|
|
|
data[config]();
|
2019-07-15 13:32:00 +00:00
|
|
|
}
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
|
|
|
return Layout;
|
|
|
|
}();
|
|
|
|
/**
|
|
|
|
* Data API
|
|
|
|
* ====================================================
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
$(window).on('load', function () {
|
|
|
|
Layout._jQueryInterface.call($('body'));
|
|
|
|
});
|
|
|
|
$(Selector.SIDEBAR + ' a').on('focusin', function () {
|
|
|
|
$(Selector.MAIN_SIDEBAR).addClass(ClassName.SIDEBAR_FOCUSED);
|
|
|
|
});
|
|
|
|
$(Selector.SIDEBAR + ' a').on('focusout', function () {
|
|
|
|
$(Selector.MAIN_SIDEBAR).removeClass(ClassName.SIDEBAR_FOCUSED);
|
|
|
|
});
|
|
|
|
/**
|
|
|
|
* jQuery API
|
|
|
|
* ====================================================
|
|
|
|
*/
|
|
|
|
|
|
|
|
$.fn[NAME] = Layout._jQueryInterface;
|
|
|
|
$.fn[NAME].Constructor = Layout;
|
|
|
|
|
|
|
|
$.fn[NAME].noConflict = function () {
|
|
|
|
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
|
|
|
return Layout._jQueryInterface;
|
|
|
|
};
|
|
|
|
|
|
|
|
return Layout;
|
|
|
|
}(jQuery);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* --------------------------------------------
|
|
|
|
* AdminLTE PushMenu.js
|
|
|
|
* License MIT
|
|
|
|
* --------------------------------------------
|
|
|
|
*/
|
|
|
|
var PushMenu = function ($) {
|
|
|
|
/**
|
|
|
|
* Constants
|
|
|
|
* ====================================================
|
|
|
|
*/
|
|
|
|
var NAME = 'PushMenu';
|
|
|
|
var DATA_KEY = 'lte.pushmenu';
|
|
|
|
var EVENT_KEY = "." + DATA_KEY;
|
|
|
|
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
|
|
|
var Event = {
|
|
|
|
COLLAPSED: "collapsed" + EVENT_KEY,
|
|
|
|
SHOWN: "shown" + EVENT_KEY
|
|
|
|
};
|
|
|
|
var Default = {
|
2019-10-19 09:38:03 +00:00
|
|
|
autoCollapseSize: 992,
|
2019-08-26 08:39:29 +00:00
|
|
|
enableRemember: false,
|
|
|
|
noTransitionAfterReload: true
|
2019-07-15 13:32:00 +00:00
|
|
|
};
|
|
|
|
var Selector = {
|
|
|
|
TOGGLE_BUTTON: '[data-widget="pushmenu"]',
|
|
|
|
SIDEBAR_MINI: '.sidebar-mini',
|
|
|
|
SIDEBAR_COLLAPSED: '.sidebar-collapse',
|
|
|
|
BODY: 'body',
|
|
|
|
OVERLAY: '#sidebar-overlay',
|
|
|
|
WRAPPER: '.wrapper'
|
|
|
|
};
|
|
|
|
var ClassName = {
|
|
|
|
SIDEBAR_OPEN: 'sidebar-open',
|
|
|
|
COLLAPSED: 'sidebar-collapse',
|
2019-10-19 09:38:03 +00:00
|
|
|
OPEN: 'sidebar-open'
|
2019-07-15 13:32:00 +00:00
|
|
|
};
|
2019-10-02 10:44:03 +00:00
|
|
|
/**
|
|
|
|
* Class Definition
|
|
|
|
* ====================================================
|
|
|
|
*/
|
2019-07-15 13:32:00 +00:00
|
|
|
|
|
|
|
var PushMenu =
|
|
|
|
/*#__PURE__*/
|
|
|
|
function () {
|
|
|
|
function PushMenu(element, options) {
|
|
|
|
this._element = element;
|
|
|
|
this._options = $.extend({}, Default, options);
|
|
|
|
|
|
|
|
if (!$(Selector.OVERLAY).length) {
|
|
|
|
this._addOverlay();
|
|
|
|
}
|
2019-10-19 09:38:03 +00:00
|
|
|
|
|
|
|
this._init();
|
2019-07-15 13:32:00 +00:00
|
|
|
} // Public
|
|
|
|
|
|
|
|
|
|
|
|
var _proto = PushMenu.prototype;
|
|
|
|
|
2019-11-20 08:41:28 +00:00
|
|
|
_proto.expand = function expand() {
|
2019-10-19 09:38:03 +00:00
|
|
|
if (this._options.autoCollapseSize) {
|
|
|
|
if ($(window).width() <= this._options.autoCollapseSize) {
|
|
|
|
$(Selector.BODY).addClass(ClassName.OPEN);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
$(Selector.BODY).removeClass(ClassName.COLLAPSED);
|
2019-08-26 08:39:29 +00:00
|
|
|
|
|
|
|
if (this._options.enableRemember) {
|
|
|
|
localStorage.setItem("remember" + EVENT_KEY, ClassName.OPEN);
|
|
|
|
}
|
|
|
|
|
2019-07-15 13:32:00 +00:00
|
|
|
var shownEvent = $.Event(Event.SHOWN);
|
|
|
|
$(this._element).trigger(shownEvent);
|
|
|
|
};
|
|
|
|
|
|
|
|
_proto.collapse = function collapse() {
|
2019-10-19 09:38:03 +00:00
|
|
|
if (this._options.autoCollapseSize) {
|
|
|
|
if ($(window).width() <= this._options.autoCollapseSize) {
|
|
|
|
$(Selector.BODY).removeClass(ClassName.OPEN);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
$(Selector.BODY).addClass(ClassName.COLLAPSED);
|
2019-08-26 08:39:29 +00:00
|
|
|
|
|
|
|
if (this._options.enableRemember) {
|
|
|
|
localStorage.setItem("remember" + EVENT_KEY, ClassName.COLLAPSED);
|
|
|
|
}
|
|
|
|
|
2019-07-15 13:32:00 +00:00
|
|
|
var collapsedEvent = $.Event(Event.COLLAPSED);
|
|
|
|
$(this._element).trigger(collapsedEvent);
|
|
|
|
};
|
|
|
|
|
|
|
|
_proto.toggle = function toggle() {
|
2019-10-19 09:38:03 +00:00
|
|
|
if (!$(Selector.BODY).hasClass(ClassName.COLLAPSED)) {
|
2019-07-15 13:32:00 +00:00
|
|
|
this.collapse();
|
|
|
|
} else {
|
2019-11-20 08:41:28 +00:00
|
|
|
this.expand();
|
2019-07-15 13:32:00 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2019-10-29 08:39:22 +00:00
|
|
|
_proto.autoCollapse = function autoCollapse(resize) {
|
|
|
|
if (resize === void 0) {
|
|
|
|
resize = false;
|
|
|
|
}
|
|
|
|
|
2019-07-15 13:32:00 +00:00
|
|
|
if (this._options.autoCollapseSize) {
|
|
|
|
if ($(window).width() <= this._options.autoCollapseSize) {
|
2019-10-19 09:38:03 +00:00
|
|
|
if (!$(Selector.BODY).hasClass(ClassName.OPEN)) {
|
|
|
|
this.collapse();
|
2019-07-15 13:32:00 +00:00
|
|
|
}
|
2019-10-29 08:39:22 +00:00
|
|
|
} else if (resize == true) {
|
|
|
|
if ($(Selector.BODY).hasClass(ClassName.OPEN)) {
|
2019-10-19 09:38:03 +00:00
|
|
|
$(Selector.BODY).removeClass(ClassName.OPEN);
|
2019-07-15 13:32:00 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-08-26 08:39:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
_proto.remember = function remember() {
|
|
|
|
if (this._options.enableRemember) {
|
|
|
|
var toggleState = localStorage.getItem("remember" + EVENT_KEY);
|
|
|
|
|
|
|
|
if (toggleState == ClassName.COLLAPSED) {
|
|
|
|
if (this._options.noTransitionAfterReload) {
|
2019-10-02 10:44:03 +00:00
|
|
|
$("body").addClass('hold-transition').addClass(ClassName.COLLAPSED).delay(50).queue(function () {
|
2019-08-26 08:39:29 +00:00
|
|
|
$(this).removeClass('hold-transition');
|
|
|
|
$(this).dequeue();
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
$("body").addClass(ClassName.COLLAPSED);
|
|
|
|
}
|
2019-10-02 10:44:03 +00:00
|
|
|
} 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);
|
|
|
|
}
|
2019-08-26 08:39:29 +00:00
|
|
|
}
|
|
|
|
}
|
2019-07-15 13:32:00 +00:00
|
|
|
} // Private
|
|
|
|
;
|
|
|
|
|
|
|
|
_proto._init = function _init() {
|
|
|
|
var _this = this;
|
|
|
|
|
2019-08-26 08:39:29 +00:00
|
|
|
this.remember();
|
2019-07-15 13:32:00 +00:00
|
|
|
this.autoCollapse();
|
|
|
|
$(window).resize(function () {
|
2019-10-29 08:39:22 +00:00
|
|
|
_this.autoCollapse(true);
|
2019-07-15 13:32:00 +00:00
|
|
|
});
|
|
|
|
};
|
|
|
|
|
|
|
|
_proto._addOverlay = function _addOverlay() {
|
|
|
|
var _this2 = this;
|
|
|
|
|
|
|
|
var overlay = $('<div />', {
|
|
|
|
id: 'sidebar-overlay'
|
|
|
|
});
|
|
|
|
overlay.on('click', function () {
|
|
|
|
_this2.collapse();
|
|
|
|
});
|
|
|
|
$(Selector.WRAPPER).append(overlay);
|
|
|
|
} // Static
|
|
|
|
;
|
|
|
|
|
|
|
|
PushMenu._jQueryInterface = function _jQueryInterface(operation) {
|
|
|
|
return this.each(function () {
|
|
|
|
var data = $(this).data(DATA_KEY);
|
|
|
|
|
|
|
|
var _options = $.extend({}, Default, $(this).data());
|
|
|
|
|
|
|
|
if (!data) {
|
|
|
|
data = new PushMenu(this, _options);
|
|
|
|
$(this).data(DATA_KEY, data);
|
|
|
|
}
|
|
|
|
|
2019-11-20 08:41:28 +00:00
|
|
|
if (typeof operation === 'string' && operation.match(/collapse|expand|toggle/)) {
|
2019-07-15 13:32:00 +00:00
|
|
|
data[operation]();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
|
|
|
return PushMenu;
|
|
|
|
}();
|
|
|
|
/**
|
|
|
|
* Data API
|
|
|
|
* ====================================================
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
$(document).on('click', Selector.TOGGLE_BUTTON, function (event) {
|
|
|
|
event.preventDefault();
|
|
|
|
var button = event.currentTarget;
|
|
|
|
|
|
|
|
if ($(button).data('widget') !== 'pushmenu') {
|
|
|
|
button = $(button).closest(Selector.TOGGLE_BUTTON);
|
|
|
|
}
|
|
|
|
|
|
|
|
PushMenu._jQueryInterface.call($(button), 'toggle');
|
|
|
|
});
|
|
|
|
$(window).on('load', function () {
|
|
|
|
PushMenu._jQueryInterface.call($(Selector.TOGGLE_BUTTON));
|
|
|
|
});
|
|
|
|
/**
|
|
|
|
* jQuery API
|
|
|
|
* ====================================================
|
|
|
|
*/
|
|
|
|
|
|
|
|
$.fn[NAME] = PushMenu._jQueryInterface;
|
|
|
|
$.fn[NAME].Constructor = PushMenu;
|
|
|
|
|
|
|
|
$.fn[NAME].noConflict = function () {
|
|
|
|
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
|
|
|
return PushMenu._jQueryInterface;
|
|
|
|
};
|
|
|
|
|
|
|
|
return PushMenu;
|
|
|
|
}(jQuery);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* --------------------------------------------
|
|
|
|
* AdminLTE Treeview.js
|
|
|
|
* License MIT
|
|
|
|
* --------------------------------------------
|
|
|
|
*/
|
|
|
|
var Treeview = function ($) {
|
|
|
|
/**
|
|
|
|
* Constants
|
|
|
|
* ====================================================
|
|
|
|
*/
|
|
|
|
var NAME = 'Treeview';
|
|
|
|
var DATA_KEY = 'lte.treeview';
|
|
|
|
var EVENT_KEY = "." + DATA_KEY;
|
|
|
|
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
|
|
|
var Event = {
|
|
|
|
SELECTED: "selected" + EVENT_KEY,
|
|
|
|
EXPANDED: "expanded" + EVENT_KEY,
|
|
|
|
COLLAPSED: "collapsed" + EVENT_KEY,
|
|
|
|
LOAD_DATA_API: "load" + EVENT_KEY
|
|
|
|
};
|
|
|
|
var Selector = {
|
|
|
|
LI: '.nav-item',
|
|
|
|
LINK: '.nav-link',
|
|
|
|
TREEVIEW_MENU: '.nav-treeview',
|
|
|
|
OPEN: '.menu-open',
|
|
|
|
DATA_WIDGET: '[data-widget="treeview"]'
|
|
|
|
};
|
|
|
|
var ClassName = {
|
|
|
|
LI: 'nav-item',
|
|
|
|
LINK: 'nav-link',
|
|
|
|
TREEVIEW_MENU: 'nav-treeview',
|
2019-11-20 08:41:28 +00:00
|
|
|
OPEN: 'menu-open',
|
|
|
|
SIDEBAR_COLLAPSED: 'sidebar-collapse'
|
2019-07-15 13:32:00 +00:00
|
|
|
};
|
|
|
|
var Default = {
|
|
|
|
trigger: Selector.DATA_WIDGET + " " + Selector.LINK,
|
|
|
|
animationSpeed: 300,
|
2019-11-20 08:41:28 +00:00
|
|
|
accordion: true,
|
|
|
|
expandSidebar: false,
|
|
|
|
sidebarButtonSelector: '[data-widget="pushmenu"]'
|
2019-07-15 13:32:00 +00:00
|
|
|
};
|
2019-10-02 10:44:03 +00:00
|
|
|
/**
|
|
|
|
* Class Definition
|
|
|
|
* ====================================================
|
|
|
|
*/
|
2019-07-15 13:32:00 +00:00
|
|
|
|
|
|
|
var Treeview =
|
|
|
|
/*#__PURE__*/
|
|
|
|
function () {
|
|
|
|
function Treeview(element, config) {
|
|
|
|
this._config = config;
|
|
|
|
this._element = element;
|
|
|
|
} // Public
|
|
|
|
|
|
|
|
|
|
|
|
var _proto = Treeview.prototype;
|
|
|
|
|
|
|
|
_proto.init = function init() {
|
|
|
|
this._setupListeners();
|
|
|
|
};
|
|
|
|
|
|
|
|
_proto.expand = function expand(treeviewMenu, parentLi) {
|
|
|
|
var _this = this;
|
|
|
|
|
|
|
|
var expandedEvent = $.Event(Event.EXPANDED);
|
|
|
|
|
|
|
|
if (this._config.accordion) {
|
|
|
|
var openMenuLi = parentLi.siblings(Selector.OPEN).first();
|
|
|
|
var openTreeview = openMenuLi.find(Selector.TREEVIEW_MENU).first();
|
|
|
|
this.collapse(openTreeview, openMenuLi);
|
|
|
|
}
|
|
|
|
|
2019-08-26 08:39:29 +00:00
|
|
|
treeviewMenu.stop().slideDown(this._config.animationSpeed, function () {
|
2019-07-15 13:32:00 +00:00
|
|
|
parentLi.addClass(ClassName.OPEN);
|
|
|
|
$(_this._element).trigger(expandedEvent);
|
|
|
|
});
|
2019-11-20 08:41:28 +00:00
|
|
|
|
|
|
|
if (this._config.expandSidebar) {
|
|
|
|
this._expandSidebar();
|
|
|
|
}
|
2019-07-15 13:32:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
_proto.collapse = function collapse(treeviewMenu, parentLi) {
|
|
|
|
var _this2 = this;
|
|
|
|
|
|
|
|
var collapsedEvent = $.Event(Event.COLLAPSED);
|
2019-08-26 08:39:29 +00:00
|
|
|
treeviewMenu.stop().slideUp(this._config.animationSpeed, function () {
|
2019-07-15 13:32:00 +00:00
|
|
|
parentLi.removeClass(ClassName.OPEN);
|
|
|
|
$(_this2._element).trigger(collapsedEvent);
|
|
|
|
treeviewMenu.find(Selector.OPEN + " > " + Selector.TREEVIEW_MENU).slideUp();
|
|
|
|
treeviewMenu.find(Selector.OPEN).removeClass(ClassName.OPEN);
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
|
|
|
_proto.toggle = function toggle(event) {
|
|
|
|
var $relativeTarget = $(event.currentTarget);
|
2019-10-19 09:38:03 +00:00
|
|
|
var $parent = $relativeTarget.parent();
|
|
|
|
var treeviewMenu = $parent.find('> ' + Selector.TREEVIEW_MENU);
|
2019-07-15 13:32:00 +00:00
|
|
|
|
|
|
|
if (!treeviewMenu.is(Selector.TREEVIEW_MENU)) {
|
2019-10-19 09:38:03 +00:00
|
|
|
if (!$parent.is(Selector.LI)) {
|
|
|
|
treeviewMenu = $parent.parent().find('> ' + Selector.TREEVIEW_MENU);
|
|
|
|
}
|
2019-10-02 10:44:03 +00:00
|
|
|
|
|
|
|
if (!treeviewMenu.is(Selector.TREEVIEW_MENU)) {
|
|
|
|
return;
|
|
|
|
}
|
2019-07-15 13:32:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
event.preventDefault();
|
|
|
|
var parentLi = $relativeTarget.parents(Selector.LI).first();
|
|
|
|
var isOpen = parentLi.hasClass(ClassName.OPEN);
|
|
|
|
|
|
|
|
if (isOpen) {
|
|
|
|
this.collapse($(treeviewMenu), parentLi);
|
|
|
|
} else {
|
|
|
|
this.expand($(treeviewMenu), parentLi);
|
|
|
|
}
|
|
|
|
} // Private
|
|
|
|
;
|
|
|
|
|
|
|
|
_proto._setupListeners = function _setupListeners() {
|
|
|
|
var _this3 = this;
|
|
|
|
|
|
|
|
$(document).on('click', this._config.trigger, function (event) {
|
|
|
|
_this3.toggle(event);
|
|
|
|
});
|
2019-11-20 08:41:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
_proto._expandSidebar = function _expandSidebar() {
|
|
|
|
if ($('body').hasClass(ClassName.SIDEBAR_COLLAPSED)) {
|
|
|
|
$(this._config.sidebarButtonSelector).PushMenu('expand');
|
|
|
|
}
|
2019-07-15 13:32:00 +00:00
|
|
|
} // Static
|
|
|
|
;
|
|
|
|
|
|
|
|
Treeview._jQueryInterface = function _jQueryInterface(config) {
|
|
|
|
return this.each(function () {
|
|
|
|
var data = $(this).data(DATA_KEY);
|
|
|
|
|
2019-11-20 08:41:28 +00:00
|
|
|
var _options = $.extend({}, Default, $(this).data());
|
2019-07-15 13:32:00 +00:00
|
|
|
|
|
|
|
if (!data) {
|
2019-11-20 08:41:28 +00:00
|
|
|
data = new Treeview($(this), _options);
|
2019-07-15 13:32:00 +00:00
|
|
|
$(this).data(DATA_KEY, data);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (config === 'init') {
|
|
|
|
data[config]();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
|
|
|
return Treeview;
|
|
|
|
}();
|
|
|
|
/**
|
|
|
|
* Data API
|
|
|
|
* ====================================================
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
$(window).on(Event.LOAD_DATA_API, function () {
|
|
|
|
$(Selector.DATA_WIDGET).each(function () {
|
|
|
|
Treeview._jQueryInterface.call($(this), 'init');
|
|
|
|
});
|
|
|
|
});
|
|
|
|
/**
|
|
|
|
* jQuery API
|
|
|
|
* ====================================================
|
|
|
|
*/
|
|
|
|
|
|
|
|
$.fn[NAME] = Treeview._jQueryInterface;
|
|
|
|
$.fn[NAME].Constructor = Treeview;
|
|
|
|
|
|
|
|
$.fn[NAME].noConflict = function () {
|
|
|
|
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
|
|
|
return Treeview._jQueryInterface;
|
|
|
|
};
|
|
|
|
|
|
|
|
return Treeview;
|
|
|
|
}(jQuery);
|
|
|
|
|
2019-07-28 20:33:54 +00:00
|
|
|
/**
|
|
|
|
* --------------------------------------------
|
|
|
|
* AdminLTE DirectChat.js
|
|
|
|
* License MIT
|
|
|
|
* --------------------------------------------
|
|
|
|
*/
|
|
|
|
var DirectChat = function ($) {
|
|
|
|
/**
|
|
|
|
* Constants
|
|
|
|
* ====================================================
|
|
|
|
*/
|
|
|
|
var NAME = 'DirectChat';
|
|
|
|
var DATA_KEY = 'lte.directchat';
|
|
|
|
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
2019-08-26 08:39:29 +00:00
|
|
|
var Event = {
|
|
|
|
TOGGLED: "toggled{EVENT_KEY}"
|
|
|
|
};
|
2019-07-28 20:33:54 +00:00
|
|
|
var Selector = {
|
|
|
|
DATA_TOGGLE: '[data-widget="chat-pane-toggle"]',
|
|
|
|
DIRECT_CHAT: '.direct-chat'
|
|
|
|
};
|
|
|
|
var ClassName = {
|
|
|
|
DIRECT_CHAT_OPEN: 'direct-chat-contacts-open'
|
|
|
|
};
|
|
|
|
/**
|
|
|
|
* Class Definition
|
|
|
|
* ====================================================
|
|
|
|
*/
|
|
|
|
|
|
|
|
var DirectChat =
|
|
|
|
/*#__PURE__*/
|
|
|
|
function () {
|
|
|
|
function DirectChat(element, config) {
|
|
|
|
this._element = element;
|
|
|
|
}
|
|
|
|
|
|
|
|
var _proto = DirectChat.prototype;
|
|
|
|
|
|
|
|
_proto.toggle = function toggle() {
|
|
|
|
$(this._element).parents(Selector.DIRECT_CHAT).first().toggleClass(ClassName.DIRECT_CHAT_OPEN);
|
2019-08-26 08:39:29 +00:00
|
|
|
var toggledEvent = $.Event(Event.TOGGLED);
|
|
|
|
$(this._element).trigger(toggledEvent);
|
2019-07-28 20:33:54 +00:00
|
|
|
} // Static
|
|
|
|
;
|
|
|
|
|
|
|
|
DirectChat._jQueryInterface = function _jQueryInterface(config) {
|
|
|
|
return this.each(function () {
|
|
|
|
var data = $(this).data(DATA_KEY);
|
|
|
|
|
|
|
|
if (!data) {
|
|
|
|
data = new DirectChat($(this));
|
|
|
|
$(this).data(DATA_KEY, data);
|
|
|
|
}
|
|
|
|
|
|
|
|
data[config]();
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
|
|
|
return DirectChat;
|
|
|
|
}();
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
* Data Api implementation
|
|
|
|
* ====================================================
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
$(document).on('click', Selector.DATA_TOGGLE, function (event) {
|
|
|
|
if (event) event.preventDefault();
|
|
|
|
|
|
|
|
DirectChat._jQueryInterface.call($(this), 'toggle');
|
|
|
|
});
|
|
|
|
/**
|
|
|
|
* jQuery API
|
|
|
|
* ====================================================
|
|
|
|
*/
|
|
|
|
|
|
|
|
$.fn[NAME] = DirectChat._jQueryInterface;
|
|
|
|
$.fn[NAME].Constructor = DirectChat;
|
|
|
|
|
|
|
|
$.fn[NAME].noConflict = function () {
|
|
|
|
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
|
|
|
return DirectChat._jQueryInterface;
|
|
|
|
};
|
|
|
|
|
|
|
|
return DirectChat;
|
|
|
|
}(jQuery);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* --------------------------------------------
|
|
|
|
* AdminLTE TodoList.js
|
|
|
|
* License MIT
|
|
|
|
* --------------------------------------------
|
|
|
|
*/
|
|
|
|
var TodoList = function ($) {
|
|
|
|
/**
|
|
|
|
* Constants
|
|
|
|
* ====================================================
|
|
|
|
*/
|
|
|
|
var NAME = 'TodoList';
|
|
|
|
var DATA_KEY = 'lte.todolist';
|
|
|
|
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
|
|
|
var Selector = {
|
|
|
|
DATA_TOGGLE: '[data-widget="todo-list"]'
|
|
|
|
};
|
|
|
|
var ClassName = {
|
|
|
|
TODO_LIST_DONE: 'done'
|
|
|
|
};
|
|
|
|
var Default = {
|
|
|
|
onCheck: function onCheck(item) {
|
|
|
|
return item;
|
|
|
|
},
|
|
|
|
onUnCheck: function onUnCheck(item) {
|
|
|
|
return item;
|
|
|
|
}
|
|
|
|
};
|
2019-10-02 10:44:03 +00:00
|
|
|
/**
|
|
|
|
* Class Definition
|
|
|
|
* ====================================================
|
|
|
|
*/
|
2019-07-28 20:33:54 +00:00
|
|
|
|
|
|
|
var TodoList =
|
|
|
|
/*#__PURE__*/
|
|
|
|
function () {
|
|
|
|
function TodoList(element, config) {
|
|
|
|
this._config = config;
|
|
|
|
this._element = element;
|
|
|
|
|
|
|
|
this._init();
|
|
|
|
} // Public
|
|
|
|
|
|
|
|
|
|
|
|
var _proto = TodoList.prototype;
|
|
|
|
|
|
|
|
_proto.toggle = function toggle(item) {
|
|
|
|
item.parents('li').toggleClass(ClassName.TODO_LIST_DONE);
|
|
|
|
|
|
|
|
if (!$(item).prop('checked')) {
|
|
|
|
this.unCheck($(item));
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
this.check(item);
|
|
|
|
};
|
|
|
|
|
|
|
|
_proto.check = function check(item) {
|
|
|
|
this._config.onCheck.call(item);
|
|
|
|
};
|
|
|
|
|
|
|
|
_proto.unCheck = function unCheck(item) {
|
|
|
|
this._config.onUnCheck.call(item);
|
|
|
|
} // Private
|
|
|
|
;
|
|
|
|
|
|
|
|
_proto._init = function _init() {
|
|
|
|
var that = this;
|
|
|
|
$(Selector.DATA_TOGGLE).find('input:checkbox:checked').parents('li').toggleClass(ClassName.TODO_LIST_DONE);
|
|
|
|
$(Selector.DATA_TOGGLE).on('change', 'input:checkbox', function (event) {
|
|
|
|
that.toggle($(event.target));
|
|
|
|
});
|
|
|
|
} // Static
|
|
|
|
;
|
|
|
|
|
|
|
|
TodoList._jQueryInterface = function _jQueryInterface(config) {
|
|
|
|
return this.each(function () {
|
|
|
|
var data = $(this).data(DATA_KEY);
|
|
|
|
|
2019-11-20 08:41:28 +00:00
|
|
|
var _options = $.extend({}, Default, $(this).data());
|
2019-07-28 20:33:54 +00:00
|
|
|
|
|
|
|
if (!data) {
|
2019-11-20 08:41:28 +00:00
|
|
|
data = new TodoList($(this), _options);
|
2019-07-28 20:33:54 +00:00
|
|
|
$(this).data(DATA_KEY, data);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (config === 'init') {
|
|
|
|
data[config]();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
|
|
|
return TodoList;
|
|
|
|
}();
|
|
|
|
/**
|
|
|
|
* Data API
|
|
|
|
* ====================================================
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
$(window).on('load', function () {
|
|
|
|
TodoList._jQueryInterface.call($(Selector.DATA_TOGGLE));
|
|
|
|
});
|
|
|
|
/**
|
|
|
|
* jQuery API
|
|
|
|
* ====================================================
|
|
|
|
*/
|
|
|
|
|
|
|
|
$.fn[NAME] = TodoList._jQueryInterface;
|
|
|
|
$.fn[NAME].Constructor = TodoList;
|
|
|
|
|
|
|
|
$.fn[NAME].noConflict = function () {
|
|
|
|
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
|
|
|
return TodoList._jQueryInterface;
|
|
|
|
};
|
|
|
|
|
|
|
|
return TodoList;
|
|
|
|
}(jQuery);
|
|
|
|
|
2019-07-15 13:32:00 +00:00
|
|
|
/**
|
|
|
|
* --------------------------------------------
|
2019-08-26 08:39:29 +00:00
|
|
|
* AdminLTE CardWidget.js
|
2019-07-15 13:32:00 +00:00
|
|
|
* License MIT
|
|
|
|
* --------------------------------------------
|
|
|
|
*/
|
2019-08-26 08:39:29 +00:00
|
|
|
var CardWidget = function ($) {
|
2019-07-15 13:32:00 +00:00
|
|
|
/**
|
|
|
|
* Constants
|
|
|
|
* ====================================================
|
|
|
|
*/
|
2019-08-26 08:39:29 +00:00
|
|
|
var NAME = 'CardWidget';
|
|
|
|
var DATA_KEY = 'lte.cardwidget';
|
2019-07-15 13:32:00 +00:00
|
|
|
var EVENT_KEY = "." + DATA_KEY;
|
|
|
|
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
|
|
|
var Event = {
|
|
|
|
EXPANDED: "expanded" + EVENT_KEY,
|
|
|
|
COLLAPSED: "collapsed" + EVENT_KEY,
|
|
|
|
MAXIMIZED: "maximized" + EVENT_KEY,
|
|
|
|
MINIMIZED: "minimized" + EVENT_KEY,
|
|
|
|
REMOVED: "removed" + EVENT_KEY
|
|
|
|
};
|
2019-08-26 08:39:29 +00:00
|
|
|
var ClassName = {
|
|
|
|
CARD: 'card',
|
|
|
|
COLLAPSED: 'collapsed-card',
|
2020-04-01 13:20:05 +00:00
|
|
|
COLLAPSING: 'collapsing-card',
|
|
|
|
EXPANDING: 'expanding-card',
|
2019-08-26 08:39:29 +00:00
|
|
|
WAS_COLLAPSED: 'was-collapsed',
|
|
|
|
MAXIMIZED: 'maximized-card'
|
|
|
|
};
|
2019-07-15 13:32:00 +00:00
|
|
|
var Selector = {
|
2019-08-26 08:39:29 +00:00
|
|
|
DATA_REMOVE: '[data-card-widget="remove"]',
|
|
|
|
DATA_COLLAPSE: '[data-card-widget="collapse"]',
|
|
|
|
DATA_MAXIMIZE: '[data-card-widget="maximize"]',
|
|
|
|
CARD: "." + ClassName.CARD,
|
2019-07-15 13:32:00 +00:00
|
|
|
CARD_HEADER: '.card-header',
|
|
|
|
CARD_BODY: '.card-body',
|
|
|
|
CARD_FOOTER: '.card-footer',
|
2019-08-26 08:39:29 +00:00
|
|
|
COLLAPSED: "." + ClassName.COLLAPSED
|
2019-07-15 13:32:00 +00:00
|
|
|
};
|
|
|
|
var Default = {
|
|
|
|
animationSpeed: 'normal',
|
|
|
|
collapseTrigger: Selector.DATA_COLLAPSE,
|
2019-08-26 08:39:29 +00:00
|
|
|
removeTrigger: Selector.DATA_REMOVE,
|
|
|
|
maximizeTrigger: Selector.DATA_MAXIMIZE,
|
|
|
|
collapseIcon: 'fa-minus',
|
|
|
|
expandIcon: 'fa-plus',
|
|
|
|
maximizeIcon: 'fa-expand',
|
|
|
|
minimizeIcon: 'fa-compress'
|
2019-07-15 13:32:00 +00:00
|
|
|
};
|
|
|
|
|
2019-08-26 08:39:29 +00:00
|
|
|
var CardWidget =
|
2019-07-15 13:32:00 +00:00
|
|
|
/*#__PURE__*/
|
|
|
|
function () {
|
2019-08-26 08:39:29 +00:00
|
|
|
function CardWidget(element, settings) {
|
2019-07-15 13:32:00 +00:00
|
|
|
this._element = element;
|
|
|
|
this._parent = element.parents(Selector.CARD).first();
|
2019-08-26 08:39:29 +00:00
|
|
|
|
|
|
|
if (element.hasClass(ClassName.CARD)) {
|
|
|
|
this._parent = element;
|
|
|
|
}
|
|
|
|
|
2019-07-15 13:32:00 +00:00
|
|
|
this._settings = $.extend({}, Default, settings);
|
|
|
|
}
|
|
|
|
|
2019-08-26 08:39:29 +00:00
|
|
|
var _proto = CardWidget.prototype;
|
2019-07-15 13:32:00 +00:00
|
|
|
|
|
|
|
_proto.collapse = function collapse() {
|
|
|
|
var _this = this;
|
|
|
|
|
2020-04-01 13:20:05 +00:00
|
|
|
this._parent.addClass(ClassName.COLLAPSING).children(Selector.CARD_BODY + ", " + Selector.CARD_FOOTER).slideUp(this._settings.animationSpeed, function () {
|
|
|
|
_this._parent.addClass(ClassName.COLLAPSED).removeClass(ClassName.COLLAPSING);
|
2019-07-15 13:32:00 +00:00
|
|
|
});
|
|
|
|
|
2020-01-17 08:05:37 +00:00
|
|
|
this._parent.find('> ' + Selector.CARD_HEADER + ' ' + this._settings.collapseTrigger + ' .' + this._settings.collapseIcon).addClass(this._settings.expandIcon).removeClass(this._settings.collapseIcon);
|
2019-07-15 13:32:00 +00:00
|
|
|
|
|
|
|
var collapsed = $.Event(Event.COLLAPSED);
|
|
|
|
|
|
|
|
this._element.trigger(collapsed, this._parent);
|
|
|
|
};
|
|
|
|
|
|
|
|
_proto.expand = function expand() {
|
|
|
|
var _this2 = this;
|
|
|
|
|
2020-04-01 13:20:05 +00:00
|
|
|
this._parent.addClass(ClassName.EXPANDING).children(Selector.CARD_BODY + ", " + Selector.CARD_FOOTER).slideDown(this._settings.animationSpeed, function () {
|
|
|
|
_this2._parent.removeClass(ClassName.COLLAPSED).removeClass(ClassName.EXPANDING);
|
2019-07-15 13:32:00 +00:00
|
|
|
});
|
|
|
|
|
2020-01-17 08:05:37 +00:00
|
|
|
this._parent.find('> ' + Selector.CARD_HEADER + ' ' + this._settings.collapseTrigger + ' .' + this._settings.expandIcon).addClass(this._settings.collapseIcon).removeClass(this._settings.expandIcon);
|
2019-07-15 13:32:00 +00:00
|
|
|
|
|
|
|
var expanded = $.Event(Event.EXPANDED);
|
|
|
|
|
|
|
|
this._element.trigger(expanded, this._parent);
|
|
|
|
};
|
|
|
|
|
|
|
|
_proto.remove = function remove() {
|
|
|
|
this._parent.slideUp();
|
|
|
|
|
|
|
|
var removed = $.Event(Event.REMOVED);
|
|
|
|
|
|
|
|
this._element.trigger(removed, this._parent);
|
|
|
|
};
|
|
|
|
|
|
|
|
_proto.toggle = function toggle() {
|
|
|
|
if (this._parent.hasClass(ClassName.COLLAPSED)) {
|
|
|
|
this.expand();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
this.collapse();
|
|
|
|
};
|
|
|
|
|
2019-08-26 08:39:29 +00:00
|
|
|
_proto.maximize = function maximize() {
|
2019-09-01 13:16:39 +00:00
|
|
|
this._parent.find(this._settings.maximizeTrigger + ' .' + this._settings.maximizeIcon).addClass(this._settings.minimizeIcon).removeClass(this._settings.maximizeIcon);
|
2019-07-15 13:32:00 +00:00
|
|
|
|
2019-08-26 08:39:29 +00:00
|
|
|
this._parent.css({
|
|
|
|
'height': this._parent.height(),
|
|
|
|
'width': this._parent.width(),
|
|
|
|
'transition': 'all .15s'
|
|
|
|
}).delay(150).queue(function () {
|
|
|
|
$(this).addClass(ClassName.MAXIMIZED);
|
|
|
|
$('html').addClass(ClassName.MAXIMIZED);
|
2019-07-15 13:32:00 +00:00
|
|
|
|
2019-08-26 08:39:29 +00:00
|
|
|
if ($(this).hasClass(ClassName.COLLAPSED)) {
|
|
|
|
$(this).addClass(ClassName.WAS_COLLAPSED);
|
|
|
|
}
|
2019-07-15 13:32:00 +00:00
|
|
|
|
2019-08-26 08:39:29 +00:00
|
|
|
$(this).dequeue();
|
|
|
|
});
|
2019-07-15 13:32:00 +00:00
|
|
|
|
2019-08-26 08:39:29 +00:00
|
|
|
var maximized = $.Event(Event.MAXIMIZED);
|
|
|
|
|
|
|
|
this._element.trigger(maximized, this._parent);
|
|
|
|
};
|
|
|
|
|
|
|
|
_proto.minimize = function minimize() {
|
2019-09-01 13:16:39 +00:00
|
|
|
this._parent.find(this._settings.maximizeTrigger + ' .' + this._settings.minimizeIcon).addClass(this._settings.maximizeIcon).removeClass(this._settings.minimizeIcon);
|
2019-08-26 08:39:29 +00:00
|
|
|
|
|
|
|
this._parent.css('cssText', 'height:' + this._parent[0].style.height + ' !important;' + 'width:' + this._parent[0].style.width + ' !important; transition: all .15s;').delay(10).queue(function () {
|
|
|
|
$(this).removeClass(ClassName.MAXIMIZED);
|
|
|
|
$('html').removeClass(ClassName.MAXIMIZED);
|
|
|
|
$(this).css({
|
|
|
|
'height': 'inherit',
|
|
|
|
'width': 'inherit'
|
2019-07-15 13:32:00 +00:00
|
|
|
});
|
2019-08-26 08:39:29 +00:00
|
|
|
|
|
|
|
if ($(this).hasClass(ClassName.WAS_COLLAPSED)) {
|
|
|
|
$(this).removeClass(ClassName.WAS_COLLAPSED);
|
|
|
|
}
|
|
|
|
|
|
|
|
$(this).dequeue();
|
|
|
|
});
|
|
|
|
|
|
|
|
var MINIMIZED = $.Event(Event.MINIMIZED);
|
|
|
|
|
|
|
|
this._element.trigger(MINIMIZED, this._parent);
|
|
|
|
};
|
|
|
|
|
|
|
|
_proto.toggleMaximize = function toggleMaximize() {
|
|
|
|
if (this._parent.hasClass(ClassName.MAXIMIZED)) {
|
|
|
|
this.minimize();
|
|
|
|
return;
|
2019-07-15 13:32:00 +00:00
|
|
|
}
|
2019-08-26 08:39:29 +00:00
|
|
|
|
|
|
|
this.maximize();
|
2019-07-15 13:32:00 +00:00
|
|
|
} // Private
|
|
|
|
;
|
|
|
|
|
|
|
|
_proto._init = function _init(card) {
|
|
|
|
var _this3 = this;
|
|
|
|
|
|
|
|
this._parent = card;
|
|
|
|
$(this).find(this._settings.collapseTrigger).click(function () {
|
|
|
|
_this3.toggle();
|
|
|
|
});
|
2019-08-26 08:39:29 +00:00
|
|
|
$(this).find(this._settings.maximizeTrigger).click(function () {
|
|
|
|
_this3.toggleMaximize();
|
|
|
|
});
|
2019-07-15 13:32:00 +00:00
|
|
|
$(this).find(this._settings.removeTrigger).click(function () {
|
|
|
|
_this3.remove();
|
|
|
|
});
|
|
|
|
} // Static
|
|
|
|
;
|
|
|
|
|
2019-08-26 08:39:29 +00:00
|
|
|
CardWidget._jQueryInterface = function _jQueryInterface(config) {
|
|
|
|
var data = $(this).data(DATA_KEY);
|
2019-07-15 13:32:00 +00:00
|
|
|
|
2019-11-20 08:41:28 +00:00
|
|
|
var _options = $.extend({}, Default, $(this).data());
|
|
|
|
|
2019-08-26 08:39:29 +00:00
|
|
|
if (!data) {
|
2019-11-20 08:41:28 +00:00
|
|
|
data = new CardWidget($(this), _options);
|
2019-08-26 08:39:29 +00:00
|
|
|
$(this).data(DATA_KEY, typeof config === 'string' ? data : config);
|
|
|
|
}
|
2019-07-15 13:32:00 +00:00
|
|
|
|
2019-08-26 08:39:29 +00:00
|
|
|
if (typeof config === 'string' && config.match(/collapse|expand|remove|toggle|maximize|minimize|toggleMaximize/)) {
|
|
|
|
data[config]();
|
|
|
|
} else if (typeof config === 'object') {
|
|
|
|
data._init($(this));
|
|
|
|
}
|
2019-07-15 13:32:00 +00:00
|
|
|
};
|
|
|
|
|
2019-08-26 08:39:29 +00:00
|
|
|
return CardWidget;
|
2019-07-15 13:32:00 +00:00
|
|
|
}();
|
|
|
|
/**
|
|
|
|
* Data API
|
|
|
|
* ====================================================
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
$(document).on('click', Selector.DATA_COLLAPSE, function (event) {
|
|
|
|
if (event) {
|
|
|
|
event.preventDefault();
|
|
|
|
}
|
|
|
|
|
2019-08-26 08:39:29 +00:00
|
|
|
CardWidget._jQueryInterface.call($(this), 'toggle');
|
2019-07-15 13:32:00 +00:00
|
|
|
});
|
|
|
|
$(document).on('click', Selector.DATA_REMOVE, function (event) {
|
|
|
|
if (event) {
|
|
|
|
event.preventDefault();
|
|
|
|
}
|
|
|
|
|
2019-08-26 08:39:29 +00:00
|
|
|
CardWidget._jQueryInterface.call($(this), 'remove');
|
2019-07-15 13:32:00 +00:00
|
|
|
});
|
|
|
|
$(document).on('click', Selector.DATA_MAXIMIZE, function (event) {
|
|
|
|
if (event) {
|
|
|
|
event.preventDefault();
|
|
|
|
}
|
|
|
|
|
2019-08-26 08:39:29 +00:00
|
|
|
CardWidget._jQueryInterface.call($(this), 'toggleMaximize');
|
|
|
|
});
|
|
|
|
/**
|
|
|
|
* jQuery API
|
|
|
|
* ====================================================
|
|
|
|
*/
|
|
|
|
|
|
|
|
$.fn[NAME] = CardWidget._jQueryInterface;
|
|
|
|
$.fn[NAME].Constructor = CardWidget;
|
|
|
|
|
|
|
|
$.fn[NAME].noConflict = function () {
|
|
|
|
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
|
|
|
return CardWidget._jQueryInterface;
|
|
|
|
};
|
|
|
|
|
|
|
|
return CardWidget;
|
|
|
|
}(jQuery);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* --------------------------------------------
|
|
|
|
* AdminLTE CardRefresh.js
|
|
|
|
* License MIT
|
|
|
|
* --------------------------------------------
|
|
|
|
*/
|
|
|
|
var CardRefresh = function ($) {
|
|
|
|
/**
|
|
|
|
* Constants
|
|
|
|
* ====================================================
|
|
|
|
*/
|
|
|
|
var NAME = 'CardRefresh';
|
|
|
|
var DATA_KEY = 'lte.cardrefresh';
|
|
|
|
var EVENT_KEY = "." + DATA_KEY;
|
|
|
|
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
|
|
|
var Event = {
|
|
|
|
LOADED: "loaded" + EVENT_KEY,
|
|
|
|
OVERLAY_ADDED: "overlay.added" + EVENT_KEY,
|
|
|
|
OVERLAY_REMOVED: "overlay.removed" + EVENT_KEY
|
|
|
|
};
|
|
|
|
var ClassName = {
|
|
|
|
CARD: 'card'
|
|
|
|
};
|
|
|
|
var Selector = {
|
|
|
|
CARD: "." + ClassName.CARD,
|
|
|
|
DATA_REFRESH: '[data-card-widget="card-refresh"]'
|
|
|
|
};
|
|
|
|
var Default = {
|
|
|
|
source: '',
|
|
|
|
sourceSelector: '',
|
|
|
|
params: {},
|
|
|
|
trigger: Selector.DATA_REFRESH,
|
|
|
|
content: '.card-body',
|
|
|
|
loadInContent: true,
|
|
|
|
loadOnInit: true,
|
|
|
|
responseType: '',
|
|
|
|
overlayTemplate: '<div class="overlay"><i class="fas fa-2x fa-sync-alt fa-spin"></i></div>',
|
|
|
|
onLoadStart: function onLoadStart() {},
|
|
|
|
onLoadDone: function onLoadDone(response) {
|
|
|
|
return response;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
var CardRefresh =
|
|
|
|
/*#__PURE__*/
|
|
|
|
function () {
|
|
|
|
function CardRefresh(element, settings) {
|
|
|
|
this._element = element;
|
|
|
|
this._parent = element.parents(Selector.CARD).first();
|
|
|
|
this._settings = $.extend({}, Default, settings);
|
|
|
|
this._overlay = $(this._settings.overlayTemplate);
|
|
|
|
|
|
|
|
if (element.hasClass(ClassName.CARD)) {
|
|
|
|
this._parent = element;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (this._settings.source === '') {
|
|
|
|
throw new Error('Source url was not defined. Please specify a url in your CardRefresh source option.');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
var _proto = CardRefresh.prototype;
|
|
|
|
|
|
|
|
_proto.load = function load() {
|
|
|
|
this._addOverlay();
|
|
|
|
|
|
|
|
this._settings.onLoadStart.call($(this));
|
|
|
|
|
|
|
|
$.get(this._settings.source, this._settings.params, function (response) {
|
|
|
|
if (this._settings.loadInContent) {
|
|
|
|
if (this._settings.sourceSelector != '') {
|
|
|
|
response = $(response).find(this._settings.sourceSelector).html();
|
|
|
|
}
|
|
|
|
|
|
|
|
this._parent.find(this._settings.content).html(response);
|
|
|
|
}
|
|
|
|
|
|
|
|
this._settings.onLoadDone.call($(this), response);
|
|
|
|
|
|
|
|
this._removeOverlay();
|
|
|
|
}.bind(this), this._settings.responseType !== '' && this._settings.responseType);
|
|
|
|
var loadedEvent = $.Event(Event.LOADED);
|
|
|
|
$(this._element).trigger(loadedEvent);
|
|
|
|
};
|
|
|
|
|
|
|
|
_proto._addOverlay = function _addOverlay() {
|
|
|
|
this._parent.append(this._overlay);
|
|
|
|
|
|
|
|
var overlayAddedEvent = $.Event(Event.OVERLAY_ADDED);
|
|
|
|
$(this._element).trigger(overlayAddedEvent);
|
|
|
|
};
|
|
|
|
|
|
|
|
_proto._removeOverlay = function _removeOverlay() {
|
|
|
|
this._parent.find(this._overlay).remove();
|
|
|
|
|
|
|
|
var overlayRemovedEvent = $.Event(Event.OVERLAY_REMOVED);
|
|
|
|
$(this._element).trigger(overlayRemovedEvent);
|
|
|
|
};
|
|
|
|
|
|
|
|
// Private
|
|
|
|
_proto._init = function _init(card) {
|
|
|
|
var _this = this;
|
|
|
|
|
|
|
|
$(this).find(this._settings.trigger).on('click', function () {
|
|
|
|
_this.load();
|
|
|
|
});
|
2020-04-01 13:20:05 +00:00
|
|
|
|
|
|
|
if (this._settings.loadOnInit) {
|
|
|
|
this.load();
|
|
|
|
}
|
2019-08-26 08:39:29 +00:00
|
|
|
} // Static
|
|
|
|
;
|
|
|
|
|
|
|
|
CardRefresh._jQueryInterface = function _jQueryInterface(config) {
|
|
|
|
var data = $(this).data(DATA_KEY);
|
2019-11-20 08:41:28 +00:00
|
|
|
|
|
|
|
var _options = $.extend({}, Default, $(this).data());
|
2019-08-26 08:39:29 +00:00
|
|
|
|
|
|
|
if (!data) {
|
2019-11-20 08:41:28 +00:00
|
|
|
data = new CardRefresh($(this), _options);
|
2019-08-26 08:39:29 +00:00
|
|
|
$(this).data(DATA_KEY, typeof config === 'string' ? data : config);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (typeof config === 'string' && config.match(/load/)) {
|
|
|
|
data[config]();
|
2020-04-01 13:20:05 +00:00
|
|
|
} else {
|
2019-08-26 08:39:29 +00:00
|
|
|
data._init($(this));
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
return CardRefresh;
|
|
|
|
}();
|
|
|
|
/**
|
|
|
|
* Data API
|
|
|
|
* ====================================================
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
$(document).on('click', Selector.DATA_REFRESH, function (event) {
|
|
|
|
if (event) {
|
|
|
|
event.preventDefault();
|
|
|
|
}
|
|
|
|
|
|
|
|
CardRefresh._jQueryInterface.call($(this), 'load');
|
2019-07-15 13:32:00 +00:00
|
|
|
});
|
2020-04-01 13:20:05 +00:00
|
|
|
$(document).ready(function () {
|
|
|
|
$(Selector.DATA_REFRESH).each(function () {
|
|
|
|
CardRefresh._jQueryInterface.call($(this));
|
|
|
|
});
|
|
|
|
});
|
2019-07-15 13:32:00 +00:00
|
|
|
/**
|
|
|
|
* jQuery API
|
|
|
|
* ====================================================
|
|
|
|
*/
|
|
|
|
|
2019-08-26 08:39:29 +00:00
|
|
|
$.fn[NAME] = CardRefresh._jQueryInterface;
|
|
|
|
$.fn[NAME].Constructor = CardRefresh;
|
2019-07-15 13:32:00 +00:00
|
|
|
|
|
|
|
$.fn[NAME].noConflict = function () {
|
|
|
|
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
2019-08-26 08:39:29 +00:00
|
|
|
return CardRefresh._jQueryInterface;
|
2019-07-15 13:32:00 +00:00
|
|
|
};
|
|
|
|
|
2019-08-26 08:39:29 +00:00
|
|
|
return CardRefresh;
|
2019-07-15 13:32:00 +00:00
|
|
|
}(jQuery);
|
|
|
|
|
2019-09-01 13:16:39 +00:00
|
|
|
/**
|
|
|
|
* --------------------------------------------
|
|
|
|
* AdminLTE Dropdown.js
|
|
|
|
* License MIT
|
|
|
|
* --------------------------------------------
|
|
|
|
*/
|
|
|
|
var Dropdown = function ($) {
|
|
|
|
/**
|
|
|
|
* Constants
|
|
|
|
* ====================================================
|
|
|
|
*/
|
|
|
|
var NAME = 'Dropdown';
|
|
|
|
var DATA_KEY = 'lte.dropdown';
|
|
|
|
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
|
|
|
var Selector = {
|
2020-04-01 13:20:05 +00:00
|
|
|
NAVBAR: '.navbar',
|
|
|
|
DROPDOWN_MENU: '.dropdown-menu',
|
|
|
|
DROPDOWN_MENU_ACTIVE: '.dropdown-menu.show',
|
2019-09-01 13:16:39 +00:00
|
|
|
DROPDOWN_TOGGLE: '[data-toggle="dropdown"]'
|
|
|
|
};
|
2020-04-01 13:20:05 +00:00
|
|
|
var ClassName = {
|
|
|
|
DROPDOWN_HOVER: 'dropdown-hover',
|
|
|
|
DROPDOWN_RIGHT: 'dropdown-menu-right'
|
|
|
|
};
|
2019-09-01 13:16:39 +00:00
|
|
|
var Default = {};
|
|
|
|
/**
|
|
|
|
* Class Definition
|
|
|
|
* ====================================================
|
|
|
|
*/
|
|
|
|
|
|
|
|
var Dropdown =
|
|
|
|
/*#__PURE__*/
|
|
|
|
function () {
|
|
|
|
function Dropdown(element, config) {
|
|
|
|
this._config = config;
|
|
|
|
this._element = element;
|
|
|
|
} // Public
|
|
|
|
|
|
|
|
|
|
|
|
var _proto = Dropdown.prototype;
|
|
|
|
|
|
|
|
_proto.toggleSubmenu = function toggleSubmenu() {
|
|
|
|
this._element.siblings().show().toggleClass("show");
|
|
|
|
|
|
|
|
if (!this._element.next().hasClass('show')) {
|
|
|
|
this._element.parents('.dropdown-menu').first().find('.show').removeClass("show").hide();
|
|
|
|
}
|
|
|
|
|
|
|
|
this._element.parents('li.nav-item.dropdown.show').on('hidden.bs.dropdown', function (e) {
|
|
|
|
$('.dropdown-submenu .show').removeClass("show").hide();
|
|
|
|
});
|
2020-04-01 13:20:05 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
_proto.fixPosition = function fixPosition() {
|
|
|
|
var elm = $(Selector.DROPDOWN_MENU_ACTIVE);
|
|
|
|
|
|
|
|
if (elm.length !== 0) {
|
|
|
|
if (elm.hasClass(ClassName.DROPDOWN_RIGHT)) {
|
|
|
|
elm.css('left', 'inherit');
|
|
|
|
elm.css('right', 0);
|
|
|
|
} else {
|
|
|
|
elm.css('left', 0);
|
|
|
|
elm.css('right', 'inherit');
|
|
|
|
}
|
|
|
|
|
|
|
|
var offset = elm.offset();
|
|
|
|
var width = elm.width();
|
|
|
|
var windowWidth = $(window).width();
|
|
|
|
var visiblePart = windowWidth - offset.left;
|
|
|
|
|
|
|
|
if (offset.left < 0) {
|
|
|
|
elm.css('left', 'inherit');
|
|
|
|
elm.css('right', offset.left - 5);
|
|
|
|
} else {
|
|
|
|
if (visiblePart < width) {
|
|
|
|
elm.css('left', 'inherit');
|
|
|
|
elm.css('right', 0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-09-01 13:16:39 +00:00
|
|
|
} // Static
|
|
|
|
;
|
|
|
|
|
|
|
|
Dropdown._jQueryInterface = function _jQueryInterface(config) {
|
|
|
|
return this.each(function () {
|
|
|
|
var data = $(this).data(DATA_KEY);
|
|
|
|
|
|
|
|
var _config = $.extend({}, Default, $(this).data());
|
|
|
|
|
|
|
|
if (!data) {
|
|
|
|
data = new Dropdown($(this), _config);
|
|
|
|
$(this).data(DATA_KEY, data);
|
|
|
|
}
|
|
|
|
|
2020-04-01 13:20:05 +00:00
|
|
|
if (config === 'toggleSubmenu' || config == 'fixPosition') {
|
2019-09-01 13:16:39 +00:00
|
|
|
data[config]();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
|
|
|
return Dropdown;
|
|
|
|
}();
|
|
|
|
/**
|
|
|
|
* Data API
|
|
|
|
* ====================================================
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
$(Selector.DROPDOWN_MENU + ' ' + Selector.DROPDOWN_TOGGLE).on("click", function (event) {
|
|
|
|
event.preventDefault();
|
|
|
|
event.stopPropagation();
|
|
|
|
|
|
|
|
Dropdown._jQueryInterface.call($(this), 'toggleSubmenu');
|
2020-04-01 13:20:05 +00:00
|
|
|
});
|
|
|
|
$(Selector.NAVBAR + ' ' + Selector.DROPDOWN_TOGGLE).on("click", function (event) {
|
|
|
|
event.preventDefault();
|
|
|
|
setTimeout(function () {
|
|
|
|
Dropdown._jQueryInterface.call($(this), 'fixPosition');
|
|
|
|
}, 1);
|
|
|
|
});
|
2019-09-01 13:16:39 +00:00
|
|
|
/**
|
|
|
|
* jQuery API
|
|
|
|
* ====================================================
|
|
|
|
*/
|
|
|
|
|
|
|
|
$.fn[NAME] = Dropdown._jQueryInterface;
|
|
|
|
$.fn[NAME].Constructor = Dropdown;
|
|
|
|
|
|
|
|
$.fn[NAME].noConflict = function () {
|
|
|
|
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
|
|
|
return Dropdown._jQueryInterface;
|
|
|
|
};
|
|
|
|
|
|
|
|
return Dropdown;
|
|
|
|
}(jQuery);
|
|
|
|
|
2019-10-02 10:44:03 +00:00
|
|
|
/**
|
|
|
|
* --------------------------------------------
|
|
|
|
* 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">×</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 () {
|
2019-11-20 08:41:28 +00:00
|
|
|
var _options = $.extend({}, Default, config);
|
2019-10-02 10:44:03 +00:00
|
|
|
|
2019-11-20 08:41:28 +00:00
|
|
|
var toast = new Toasts($(this), _options);
|
2019-10-02 10:44:03 +00:00
|
|
|
|
|
|
|
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);
|
|
|
|
|
2019-08-26 08:39:29 +00:00
|
|
|
exports.CardRefresh = CardRefresh;
|
|
|
|
exports.CardWidget = CardWidget;
|
2019-07-15 13:32:00 +00:00
|
|
|
exports.ControlSidebar = ControlSidebar;
|
2019-07-28 20:33:54 +00:00
|
|
|
exports.DirectChat = DirectChat;
|
2019-09-01 13:16:39 +00:00
|
|
|
exports.Dropdown = Dropdown;
|
2019-07-15 13:32:00 +00:00
|
|
|
exports.Layout = Layout;
|
|
|
|
exports.PushMenu = PushMenu;
|
2019-10-02 10:44:03 +00:00
|
|
|
exports.Toasts = Toasts;
|
2019-07-28 20:33:54 +00:00
|
|
|
exports.TodoList = TodoList;
|
2019-07-15 13:32:00 +00:00
|
|
|
exports.Treeview = Treeview;
|
|
|
|
|
|
|
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
|
|
2019-11-20 08:41:28 +00:00
|
|
|
})));
|
2019-07-15 13:32:00 +00:00
|
|
|
//# sourceMappingURL=adminlte.js.map
|