123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272 |
- /*!
- * AdminLTE v3.0.0-alpha (https://almsaeedstudio.com)
- * Copyright 2014-2015 Abdullah Almsaeed <abdullah@almsaeedstudio.com>
- * Project website Almsaeed Studio (https://almsaeedstudio.com)
- * Licensed under MIT (https://github.com/almasaeed2010/AdminLTE/blob/master/LICENSE)
- */
- 'use strict';
- var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- /**
- * --------------------------------------------
- * 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
- };
- var Selector = {
- LI: '.nav-item',
- LINK: '.nav-link',
- DATA_WIDGET: '[data-widget="treeview"]'
- };
- /**
- * Class Definition
- * ====================================================
- */
- var Treeview = (function () {
- function Treeview(element, config) {
- _classCallCheck(this, Treeview);
- this._config = config;
- this._element = element;
- }
- // Public
- // Private
- // Static
- _createClass(Treeview, null, [{
- key: '_jQueryInterface',
- value: function _jQueryInterface(config) {
- return this.each(function () {
- this._config = config;
- });
- }
- }]);
- return Treeview;
- })();
- /**
- * 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);
- //# sourceMappingURL=Treeview.js.map
- 'use strict';
- var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- /**
- * --------------------------------------------
- * AdminLTE PushMenu.js
- * License MIT
- * --------------------------------------------
- */
- var PushMenu = (function ($) {
- 'use strict';
- /**
- * 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' + DATA_KEY
- };
- var Selector = {
- COLLAPSED: 'sidebar-collapse',
- TOGGLE_BUTTON: '[data-widget="pushmenu"]'
- };
- /**
- * Class Definition
- * ====================================================
- */
- var PushMenu = (function () {
- function PushMenu() {
- _classCallCheck(this, PushMenu);
- }
- _createClass(PushMenu, [{
- key: 'Constructor',
- value: function Constructor(element) {
- this._element = element;
- this._isShown;
- }
- // Public
- }, {
- key: 'show',
- value: function show() {
- $('body').removeClass(Selector.COLLAPSED);
- this._isShown = true;
- var shownEvent = $.Event(Event.SHOWN);
- $(this._element).trigger(shownEvent);
- }
- }, {
- key: 'collapse',
- value: function collapse() {
- $('body').addClass(Selector.COLLAPSED);
- this._isShown = false;
- var collapsedEvent = $.Event(Event.COLLAPSED);
- $(this._element).trigger(collapsedEvent);
- }
- }, {
- key: 'toggle',
- value: function toggle() {
- if (typeof this._isShown === 'undefined') {
- this._isShown = !$('body').hasClass(Selector.COLLAPSED);
- }
- if (this._isShown) {
- this.collapse();
- } else {
- this.show();
- }
- }
- // Static
- }], [{
- key: '_jQueryInterface',
- value: function _jQueryInterface(operation) {
- return this.each(function () {
- var data = $(this).data(DATA_KEY);
- if (!data) {
- data = new PushMenu(this);
- $(this).data(DATA_KEY, data);
- }
- if (operation) {
- data[operation]();
- }
- });
- }
- }]);
- return PushMenu;
- })();
- /**
- * Data API
- * ====================================================
- */
- $(document).on('click', Selector.TOGGLE_BUTTON, function (event) {
- event.preventDefault();
- var button = event.target;
- if ($(button).data('widget') !== 'pushmenu') {
- button = $(button).closest(Selector.TOGGLE_BUTTON);
- }
- PushMenu._jQueryInterface.call($(button), 'toggle');
- });
- /**
- * 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);
- //# sourceMappingURL=PushMenu.js.map
- 'use strict';
- var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- /**
- * --------------------------------------------
- * AdminLTE Widget.js
- * License MIT
- * --------------------------------------------
- */
- var Widget = (function ($) {
- 'use strict';
- var Widget = (function () {
- function Widget() {
- _classCallCheck(this, Widget);
- }
- _createClass(Widget, [{
- key: 'Constructor',
- value: function Constructor(element) {
- this._element = element;
- }
- }], [{
- key: '_jQueryInterface',
- value: function _jQueryInterface(element) {
- var $this = $(element);
- $this.show();
- }
- }]);
- return Widget;
- })();
- return Widget;
- })(jQuery);
- //# sourceMappingURL=Widget.js.map
|