Create PushMenu.js

This commit is contained in:
Abdullah Almsaeed 2015-11-11 14:29:54 -05:00
parent 4ab0cc8b78
commit c4ac73688b
23 changed files with 1377 additions and 325 deletions

View file

@ -2,14 +2,33 @@
module.exports = function (grunt) {
'use strict';
'use strict'
grunt.initConfig({
// Metadata.
pkg: grunt.file.readJSON('package.json'),
banner: '/*!\n' +
' * AdminLTE v<%= pkg.version %> (<%= pkg.homepage %>)\n' +
' * Copyright 2014-<%= grunt.template.today("yyyy") %> <%= pkg.author %>\n' +
' * Project website Almsaeed Studio (https://almsaeedstudio.com)\n' +
' * Licensed under MIT (https://github.com/almasaeed2010/AdminLTE/blob/master/LICENSE)\n' +
' */\n',
// Watch files for changes and invoke appropriate compiler
watch: {
// If any .less file changes in directory "build/less/" run the "less"-task.
// files: ["build/less/*.less", "build/less/skins/*.less", "dist/js/app.js"],
files: ["build/scss/*.scss", "build/scss/skins/*.scss", "dist/js/app.js"],
tasks: ["sass", "uglify"]
sass: {
files: ['build/scss/*.scss', 'build/scss/skins/*.scss'],
tasks: ['sass']
},
es6: {
files: ['build/js/src/*.js'],
tasks: ['babel']
},
js: {
files: ['dist/js/AdminLTE.js', 'dist/js/app.js'],
tasks: ['uglify']
}
},
// SASS compiler
@ -27,25 +46,26 @@ module.exports = function (grunt) {
style: 'compressed'
},
files: {
'dist/css/AdminLTE.min.css': 'build/scss/AdminLTE.scss'
'dist/css/adminlte.min.css': 'build/scss/AdminLTE.scss'
}
}
},
// Uglify task info. Compress the js files.
// Compress the js files.
uglify: {
options: {
mangle: true,
preserveComments: 'some'
},
my_target: {
target: {
files: {
'dist/js/adminlte.min.js': ['dist/js/adminlte.js'],
'dist/js/app.min.js': ['dist/js/app.js']
}
}
},
// Compile ECMA6 to ECMA5
// Compile ES6
babel: {
options: {
sourceMap: true,
@ -53,11 +73,29 @@ module.exports = function (grunt) {
},
dist: {
files: {
'dist/js/AdminLTE.js': 'build/js/AdminLTE.js'
'build/js/dist/Treeview.js': 'build/js/src/Treeview.js',
'build/js/dist/PushMenu.js': 'build/js/src/PushMenu.js',
'build/js/dist/Widget.js': 'build/js/src/Widget.js'
}
}
},
// Concat compiled JS files
concat: {
options: {
stripBanners: true,
banner: '<%= banner %>'
},
adminlte: {
src: [
'build/js/dist/Treeview.js',
'build/js/dist/PushMenu.js',
'build/js/dist/Widget.js'
],
dest: 'dist/js/adminlte.js'
}
},
// Build the documentation files
includes: {
build: {
@ -75,29 +113,38 @@ module.exports = function (grunt) {
// Optimize images
image: {
dynamic: {
files: [{
expand: true,
cwd: 'build/img/',
src: ['**/*.{png,jpg,gif,svg,jpeg}'],
dest: 'dist/img/'
}]
files: [
{
expand: true,
cwd: 'build/img/',
src: ['**/*.{png,jpg,gif,svg,jpeg}'],
dest: 'dist/img/'
}
]
}
},
// Validate JS code
jshint: {
eslint: {
options: {
jshintrc: '.jshintrc'
configFile: 'build/js/.eslintrc'
},
target: 'build/js/src/*.js'
},
// Lint JS code
jscs: {
options: {
config: 'build/js/.jscsrc'
},
grunt: {
src: ['Gruntfile.js']
},
core: {
src: 'dist/js/app.js'
},
demo: {
src: 'dist/js/demo.js'
},
pages: {
src: 'dist/js/pages/*.js'
src: 'js/src/*.js'
}
/*app: {
src: 'dist/js/app.js'
}*/
},
// Validate CSS files
@ -106,7 +153,7 @@ module.exports = function (grunt) {
csslintrc: 'build/scss/.csslintrc'
},
dist: [
'dist/tmp/AdminLTE.css',
'dist/css/AdminLTE.css'
]
},
@ -122,38 +169,42 @@ module.exports = function (grunt) {
// After compressing the images in the build/img dir, there is no need
// for them
clean: {
build: ["build/img/*"]
build: ['build/img/*']
}
});
})
// Load all grunt tasks
// LESS Compiler
grunt.loadNpmTasks('grunt-contrib-less');
// SASS compiler
grunt.loadNpmTasks('grunt-sass');
grunt.loadNpmTasks('grunt-sass')
// Watch File Changes
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-watch')
// Compress JS Files
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-uglify')
// Include Files Within HTML
grunt.loadNpmTasks('grunt-includes');
grunt.loadNpmTasks('grunt-includes')
// Optimize images
grunt.loadNpmTasks('grunt-image');
// Validate JS code
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-image')
// Delete not needed files
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-clean')
// Lint JS code
grunt.loadNpmTasks('grunt-jscs')
// Lint ECMA6 code
grunt.loadNpmTasks('grunt-eslint')
// Lint CSS
grunt.loadNpmTasks('grunt-contrib-csslint');
grunt.loadNpmTasks('grunt-contrib-csslint')
// Lint Bootstrap
grunt.loadNpmTasks('grunt-bootlint');
grunt.loadNpmTasks('grunt-bootlint')
// Grunt Babel to compile ECMA6 to ECMA5
grunt.loadNpmTasks('grunt-babel');
grunt.loadNpmTasks('grunt-babel')
// Concat files
grunt.loadNpmTasks('grunt-contrib-concat')
// Linting task
grunt.registerTask('lint', ['jshint', 'csslint', 'bootlint']);
grunt.registerTask('lint', ['jscs', 'eslint', 'csslint', 'bootlint'])
// JS Build Task
grunt.registerTask('build-js', ['babel', 'concat', 'uglify'])
// The default task (running "grunt" in console) is "watch"
grunt.registerTask('default', ['watch']);
};
// The default task (running 'grunt' in console) is 'watch'
grunt.registerTask('default', ['watch'])
}

178
build/js/.eslintrc Normal file
View file

@ -0,0 +1,178 @@
{
"root": true,
"parser": "babel-eslint",
"env": {
"browser": true,
"jquery": true
},
"rules": {
// Possible Errors
"comma-dangle": [2, "never"],
"no-cond-assign": 2,
"no-console": 2,
"no-constant-condition": 2,
"no-control-regex": 2,
"no-debugger": 2,
"no-dupe-args": 2,
"no-dupe-keys": 2,
"no-duplicate-case": 2,
"no-empty": 2,
"no-empty-character-class": 2,
"no-ex-assign": 2,
"no-extra-boolean-cast": 2,
"no-extra-parens": 0,
"no-extra-semi": 2,
"no-func-assign": 2,
"no-inner-declarations": 2,
"no-invalid-regexp": 2,
"no-irregular-whitespace": 0,
"no-negated-in-lhs": 2,
"no-obj-calls": 2,
"no-regex-spaces": 2,
"no-sparse-arrays": 2,
"no-unexpected-multiline": 2,
"no-unreachable": 2,
"use-isnan": 2,
"valid-jsdoc": 0,
"valid-typeof": 2,
//Best Practices
"accessor-pairs": 2,
"block-scoped-var": 2,
"consistent-return": 2,
"curly": 2,
"default-case": 2,
"dot-location": 0,
"dot-notation": 0,
"eqeqeq": 2,
"guard-for-in": 2,
"no-alert": 2,
"no-caller": 2,
"no-div-regex": 2,
"no-else-return": 2,
"no-empty-label": 2,
"no-eq-null": 2,
"no-eval": 2,
"no-extend-native": 2,
"no-extra-bind": 2,
"no-fallthrough": 2,
"no-floating-decimal": 2,
"no-implicit-coercion": 2,
"no-implied-eval": 2,
"no-invalid-this": 0,
"no-iterator": 2,
"no-labels": 2,
"no-lone-blocks": 2,
"no-loop-func": 2,
"no-multi-spaces": 0,
"no-multi-str": 0,
"no-native-reassign": 2,
"no-new": 2,
"no-new-func": 0,
"no-new-wrappers": 2,
"no-octal": 2,
"no-octal-escape": 2,
"no-param-reassign": 0,
"no-process-env": 2,
"no-proto": 2,
"no-redeclare": 2,
"no-return-assign": 2,
"no-script-url": 2,
"no-self-compare": 2,
"no-sequences": 2,
"no-throw-literal": 2,
"no-unused-expressions": 2,
"no-useless-call": 2,
"no-void": 2,
"no-warning-comments": 0,
"no-with": 2,
"radix": 2,
"vars-on-top": 0,
"wrap-iife": 2,
"yoda": 2,
// Variables
"init-declarations": 0,
"no-catch-shadow": 2,
"no-delete-var": 2,
"no-label-var": 2,
"no-shadow": 0,
"no-shadow-restricted-names": 2,
"no-undef": 2,
"no-undefined": 0,
"no-undef-init": 2,
"no-unused-vars": 2,
"no-use-before-define": 0,
// Stylistic
"array-bracket-spacing": 2,
"block-spacing": 2,
"brace-style": 2,
"camelcase": 2,
"comma-spacing": 2,
"comma-style": 2,
"computed-property-spacing": 2,
"consistent-this": 2,
"eol-last": 2,
"func-names": 0,
"func-style": 0,
"indent": 0,
"key-spacing": 0,
"linebreak-style": 2,
"lines-around-comment": 0,
"new-cap": 0,
"newline-after-var": 0,
"new-parens": 2,
"no-array-constructor": 2,
"no-continue": 0,
"no-inline-comments": 0,
"no-lonely-if": 2,
"no-mixed-spaces-and-tabs": 2,
"no-multiple-empty-lines": 2,
"no-nested-ternary": 0,
"no-new-object": 2,
"no-spaced-func": 2,
"no-ternary": 0,
"no-trailing-spaces": 2,
"no-underscore-dangle": 0,
"no-unneeded-ternary": 2,
"object-curly-spacing": [1, "always"],
"one-var": 0,
"operator-assignment": 2,
"operator-linebreak": 0,
"padded-blocks": 0,
"quote-props": 0,
"quotes": 0,
"semi": [2, "never"],
"semi-spacing": 0,
"sort-vars": 2,
"space-after-keywords": 2,
"space-before-blocks": 2,
"space-before-function-paren": 0,
"spaced-comment": 2,
"space-infix-ops": 2,
"space-in-parens": 2,
"space-return-throw-case": 2,
"space-unary-ops": 2,
// es6
"arrow-parens": 2,
"arrow-spacing": 2,
"constructor-super": 2,
"generator-star-spacing": 2,
"no-class-assign": 2,
"no-const-assign": 2,
"no-dupe-class-members": 2,
"no-this-before-super": 2,
"no-var": 2,
"object-shorthand": 2,
"prefer-arrow-callback": 2,
"prefer-const": 0,
"prefer-reflect": 0,
"prefer-spread": 2,
"prefer-template": 2,
"require-yield": 2
}
}

44
build/js/.jscsrc Normal file
View file

@ -0,0 +1,44 @@
{
"esnext": true,
"verbose": true,
"disallowEmptyBlocks": true,
"disallowKeywords": ["with"],
"disallowMixedSpacesAndTabs": true,
"disallowMultipleLineStrings": true,
"disallowMultipleVarDecl": true,
"disallowQuotedKeysInObjects": "allButReserved",
"disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"],
"disallowSpaceBeforeBinaryOperators": [","],
"disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
"disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true },
"disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true },
"disallowSpacesInsideArrayBrackets": true,
"disallowSpacesInsideParentheses": true,
"disallowTrailingComma": true,
"disallowTrailingWhitespace": true,
"requireCamelCaseOrUpperCaseIdentifiers": true,
"requireCapitalizedConstructors": true,
"requireCommaBeforeLineBreak": true,
"requireDollarBeforejQueryAssignment": true,
"requireDotNotation": true,
"requireLineFeedAtFileEnd": true,
"requirePaddingNewLinesAfterUseStrict": true,
"requirePaddingNewLinesBeforeExport": true,
"requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", "<", ">=", "<="],
"requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch"],
"requireSpaceAfterLineComment": true,
"requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", "<", ">=", "<="],
"requireSpaceBetweenArguments": true,
"requireSpacesInAnonymousFunctionExpression": { "beforeOpeningCurlyBrace": true, "beforeOpeningRoundBrace": true, "allExcept": ["shorthand"] },
"requireSpacesInConditionalExpression": true,
"requireSpacesInForStatement": true,
"requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true },
"requireSpacesInFunctionExpression": { "beforeOpeningCurlyBrace": true },
"requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true },
"requireSpacesInsideObjectBrackets": "allButNested",
"validateAlignedFunctionParameters": true,
"validateIndentation": 2,
"validateLineBreaks": "LF",
"validateNewlineAfterArrayElements": true,
"validateQuoteMarks": "'"
}

View file

@ -1,8 +0,0 @@
(function ($) {
"use strict";
class treeview {
_do() {
alert("Good");
}
}
})(jQuery);

143
build/js/dist/PushMenu.js vendored Normal file
View file

@ -0,0 +1,143 @@
'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

1
build/js/dist/PushMenu.js.map vendored Normal file

File diff suppressed because one or more lines are too long

81
build/js/dist/Treeview.js vendored Normal file
View file

@ -0,0 +1,81 @@
'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

1
build/js/dist/Treeview.js.map vendored Normal file
View file

@ -0,0 +1 @@
{"version":3,"sources":["../src/Treeview.js"],"names":[],"mappings":";;;;;;;;;;;;;AAOA,IAAM,QAAQ,GAAG,CAAC,UAAC,CAAC,EAAK;;;;;;;AAOvB,MAAM,IAAI,GAAiB,UAAU,CAAA;AACrC,MAAM,QAAQ,GAAa,cAAc,CAAA;AACzC,MAAM,SAAS,SAAgB,QAAQ,AAAE,CAAA;AACzC,MAAM,kBAAkB,GAAG,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAA;;AAErC,MAAM,KAAK,GAAG;AACZ,YAAQ,eAAa,SAAS,AAAE;GACjC,CAAA;;AAED,MAAM,QAAQ,GAAG;AACf,MAAE,EAAE,WAAW;AACf,QAAI,EAAE,WAAW;AACjB,eAAW,EAAE,0BAA0B;GACxC;;;;;;AAAA;MAMK,QAAQ;AAEZ,aAFI,QAAQ,CAEA,OAAO,EAAE,MAAM,EAAE;4BAFzB,QAAQ;;AAGV,UAAI,CAAC,OAAO,GAAI,MAAM,CAAA;AACtB,UAAI,CAAC,QAAQ,GAAG,OAAO,CAAA;KACxB;;;;;;;AAAA;iBALG,QAAQ;;uCAYY,MAAM,EAAE;AAC9B,eAAO,IAAI,CAAC,IAAI,CAAC,YAAY;AAC3B,cAAI,CAAC,OAAO,GAAG,MAAM,CAAA;SAEtB,CAAC,CAAA;OACH;;;WAjBG,QAAQ;;;;;;;;AA0Bd,GAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAe,QAAQ,CAAC,gBAAgB,CAAA;AAClD,GAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,WAAW,GAAG,QAAQ,CAAA;AACjC,GAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,UAAU,GAAI,YAAY;AACnC,KAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,kBAAkB,CAAA;AAC/B,WAAO,QAAQ,CAAC,gBAAgB,CAAA;GACjC,CAAA;;AAED,SAAO,QAAQ,CAAA;CAEhB,CAAA,CAAE,MAAM,CAAC,CAAA","file":"Treeview.js","sourcesContent":["/**\n * --------------------------------------------\n * AdminLTE Treeview.js\n * License MIT\n * --------------------------------------------\n */\n\nconst Treeview = (($) => {\n\n /**\n * Constants\n * ====================================================\n */\n\n const NAME = 'Treeview'\n const DATA_KEY = 'lte.treeview'\n const EVENT_KEY = `.${DATA_KEY}`\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n\n const EVENT = {\n SELECTED: `selected${EVENT_KEY}`\n }\n\n const Selector = {\n LI: '.nav-item',\n LINK: '.nav-link',\n DATA_WIDGET: '[data-widget=\"treeview\"]'\n }\n\n /**\n * Class Definition\n * ====================================================\n */\n class Treeview {\n\n constructor(element, config) {\n this._config = config\n this._element = element\n }\n\n // Public\n\n // Private\n\n // Static\n static _jQueryInterface(config) {\n return this.each(function () {\n this._config = config\n\n })\n }\n\n }\n\n /**\n * jQuery API\n * ====================================================\n */\n\n $.fn[NAME] = Treeview._jQueryInterface\n $.fn[NAME].Constructor = Treeview\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Treeview._jQueryInterface\n }\n\n return Treeview\n\n})(jQuery)\n"]}

40
build/js/dist/Widget.js vendored Normal file
View file

@ -0,0 +1,40 @@
'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

1
build/js/dist/Widget.js.map vendored Normal file
View file

@ -0,0 +1 @@
{"version":3,"sources":["../src/Widget.js"],"names":[],"mappings":";;;;;;;;;;;;;AAOA,IAAM,MAAM,GAAG,CAAC,UAAC,CAAC,EAAK;AACrB,cAAY,CAAA;;MAEN,MAAM;aAAN,MAAM;4BAAN,MAAM;;;iBAAN,MAAM;;kCAEE,OAAO,EAAE;AACnB,YAAI,CAAC,QAAQ,GAAG,OAAO,CAAA;OACxB;;;uCAEuB,OAAO,EAAE;AAC/B,YAAI,KAAK,GAAG,CAAC,CAAC,OAAO,CAAC,CAAA;AACtB,aAAK,CAAC,IAAI,EAAE,CAAA;OACb;;;WATG,MAAM;;;AAYZ,SAAO,MAAM,CAAA;CAEd,CAAA,CAAE,MAAM,CAAC,CAAA","file":"Widget.js","sourcesContent":["/**\n * --------------------------------------------\n * AdminLTE Widget.js\n * License MIT\n * --------------------------------------------\n */\n\nconst Widget = (($) => {\n 'use strict'\n\n class Widget {\n\n Constructor(element) {\n this._element = element\n }\n\n static _jQueryInterface(element) {\n let $this = $(element)\n $this.show()\n }\n }\n\n return Widget\n\n})(jQuery)\n"]}

123
build/js/src/PushMenu.js Normal file
View file

@ -0,0 +1,123 @@
/**
* --------------------------------------------
* AdminLTE PushMenu.js
* License MIT
* --------------------------------------------
*/
const PushMenu = (($) => {
'use strict'
/**
* Constants
* ====================================================
*/
const NAME = 'PushMenu'
const DATA_KEY = 'lte.pushmenu'
const EVENT_KEY = `.${DATA_KEY}`
const JQUERY_NO_CONFLICT = $.fn[NAME]
const Event = {
COLLAPSED: `collapsed${EVENT_KEY}`,
SHOWN: `shown${DATA_KEY}`
}
const Selector = {
COLLAPSED: 'sidebar-collapse',
TOGGLE_BUTTON: '[data-widget="pushmenu"]'
}
/**
* Class Definition
* ====================================================
*/
class PushMenu {
Constructor(element) {
this._element = element
this._isShown
}
// Public
show() {
$('body').removeClass(Selector.COLLAPSED)
this._isShown = true
let shownEvent = $.Event(Event.SHOWN)
$(this._element).trigger(shownEvent)
}
collapse() {
$('body').addClass(Selector.COLLAPSED)
this._isShown = false
let collapsedEvent = $.Event(Event.COLLAPSED)
$(this._element).trigger(collapsedEvent)
}
toggle() {
if (typeof this._isShown === 'undefined') {
this._isShown = !$('body').hasClass(Selector.COLLAPSED)
}
if (this._isShown) {
this.collapse()
} else {
this.show()
}
}
// Static
static _jQueryInterface(operation) {
return this.each(function () {
let data = $(this).data(DATA_KEY)
if (!data) {
data = new PushMenu(this)
$(this).data(DATA_KEY, data)
}
if (operation) {
data[operation]()
}
})
}
}
/**
* Data API
* ====================================================
*/
$(document).on('click', Selector.TOGGLE_BUTTON, (event) => {
event.preventDefault()
let 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)

25
build/js/src/Widget.js Normal file
View file

@ -0,0 +1,25 @@
/**
* --------------------------------------------
* AdminLTE Widget.js
* License MIT
* --------------------------------------------
*/
const Widget = (($) => {
'use strict'
class Widget {
Constructor(element) {
this._element = element
}
static _jQueryInterface(element) {
let $this = $(element)
$this.show()
}
}
return Widget
})(jQuery)

69
build/js/src/treeview.js Normal file
View file

@ -0,0 +1,69 @@
/**
* --------------------------------------------
* AdminLTE Treeview.js
* License MIT
* --------------------------------------------
*/
const Treeview = (($) => {
/**
* Constants
* ====================================================
*/
const NAME = 'Treeview'
const DATA_KEY = 'lte.treeview'
const EVENT_KEY = `.${DATA_KEY}`
const JQUERY_NO_CONFLICT = $.fn[NAME]
const EVENT = {
SELECTED: `selected${EVENT_KEY}`
}
const Selector = {
LI: '.nav-item',
LINK: '.nav-link',
DATA_WIDGET: '[data-widget="treeview"]'
}
/**
* Class Definition
* ====================================================
*/
class Treeview {
constructor(element, config) {
this._config = config
this._element = element
}
// Public
// Private
// Static
static _jQueryInterface(config) {
return this.each(function () {
this._config = config
})
}
}
/**
* 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)

View file

@ -1,11 +0,0 @@
/**
* Treeview.js
* Version 1.0
* Author Abdullah Almsaeed
* Website Almsaeed Studio <https://almsaeedstudio.com>
*/
(function($){
"use strict";
})(jQuery);

View file

@ -5,7 +5,7 @@
//This is a hack to make the background visible while scrolling
.control-sidebar-bg {
position: fixed;
z-index: 1000;
z-index: 820;
bottom: 0;
}
@ -13,6 +13,7 @@
.control-sidebar-bg,
.control-sidebar {
top: 0;
bottom: 0;
right: -$control-sidebar-width;
width: $control-sidebar-width;
transition: right $transition-speed ease-in-out
@ -21,12 +22,10 @@
//The sidebar
.control-sidebar {
position: absolute;
//padding-top: $navbar-height;
z-index: 1010;
//Fix position after header collapse
@media (max-width: map-get($grid-breakpoints, sm)) {
//padding-top: $navbar-height + 50;
}
padding-top: 55px; //$navbar-height;
z-index: 830;
height: 100%;
overflow: auto;
//Tab panes
> .tab-content {
padding: 10px 15px;
@ -57,15 +56,19 @@
//Control sidebar tabs
.nav-tabs.control-sidebar-tabs {
> li {
&:first-of-type > a {
//display: table;
//width: 100%;
> .nav-item {
//display: table-cell;
//width: auto;
&:first-of-type > .nav-link {
&,
&:hover,
&:focus {
border-left-width: 0;
}
}
> a {
> .nav-link {
@include border-radius(0);
//Hover and active states
@ -82,7 +85,7 @@
}
//Active state
&.active {
> a {
> .nav-link {
&,
&:hover,
&:focus,
@ -95,7 +98,7 @@
}
}
//Remove responsiveness on small screens
@media (max-width: map-get($grid-breakpoints, sm)) {
@media (max-width: map-get($grid-breakpoints, md)) {
display: table;
> li {
display: table-cell;

20
dist/css/AdminLTE.css vendored
View file

@ -4841,19 +4841,23 @@ a:focus {
*/
.control-sidebar-bg {
position: fixed;
z-index: 1000;
z-index: 820;
bottom: 0; }
.control-sidebar-bg,
.control-sidebar {
top: 0;
bottom: 0;
right: -230px;
width: 230px;
transition: right 0.3s ease-in-out; }
.control-sidebar {
position: absolute;
z-index: 1010; }
padding-top: 55px;
z-index: 830;
height: 100%;
overflow: auto; }
.control-sidebar > .tab-content {
padding: 10px 15px; }
.control-sidebar.control-sidebar-open,
@ -4870,25 +4874,25 @@ a:focus {
.control-sidebar-open .main-footer {
margin-right: 230px; } }
.nav-tabs.control-sidebar-tabs > li:first-of-type > a, .nav-tabs.control-sidebar-tabs > li:first-of-type > a:hover, .nav-tabs.control-sidebar-tabs > li:first-of-type > a:focus {
.nav-tabs.control-sidebar-tabs > .nav-item:first-of-type > .nav-link, .nav-tabs.control-sidebar-tabs > .nav-item:first-of-type > .nav-link:hover, .nav-tabs.control-sidebar-tabs > .nav-item:first-of-type > .nav-link:focus {
border-left-width: 0; }
.nav-tabs.control-sidebar-tabs > li > a {
.nav-tabs.control-sidebar-tabs > .nav-item > .nav-link {
border-radius: 0; }
.nav-tabs.control-sidebar-tabs > li > a, .nav-tabs.control-sidebar-tabs > li > a:hover {
.nav-tabs.control-sidebar-tabs > .nav-item > .nav-link, .nav-tabs.control-sidebar-tabs > .nav-item > .nav-link:hover {
border-top: none;
border-right: none;
border-left: 1px solid transparent;
border-bottom: 1px solid transparent; }
.nav-tabs.control-sidebar-tabs > li > a .icon {
.nav-tabs.control-sidebar-tabs > .nav-item > .nav-link .icon {
font-size: 16px; }
.nav-tabs.control-sidebar-tabs > li.active > a, .nav-tabs.control-sidebar-tabs > li.active > a:hover, .nav-tabs.control-sidebar-tabs > li.active > a:focus, .nav-tabs.control-sidebar-tabs > li.active > a:active {
.nav-tabs.control-sidebar-tabs > .nav-item.active > .nav-link, .nav-tabs.control-sidebar-tabs > .nav-item.active > .nav-link:hover, .nav-tabs.control-sidebar-tabs > .nav-item.active > .nav-link:focus, .nav-tabs.control-sidebar-tabs > .nav-item.active > .nav-link:active {
border-top: none;
border-right: none;
border-bottom: none; }
@media (max-width: 34em) {
@media (max-width: 48em) {
.nav-tabs.control-sidebar-tabs {
display: table; }
.nav-tabs.control-sidebar-tabs > li {

View file

@ -4841,19 +4841,23 @@ a:focus {
*/
.control-sidebar-bg {
position: fixed;
z-index: 1000;
z-index: 820;
bottom: 0; }
.control-sidebar-bg,
.control-sidebar {
top: 0;
bottom: 0;
right: -230px;
width: 230px;
transition: right 0.3s ease-in-out; }
.control-sidebar {
position: absolute;
z-index: 1010; }
padding-top: 55px;
z-index: 830;
height: 100%;
overflow: auto; }
.control-sidebar > .tab-content {
padding: 10px 15px; }
.control-sidebar.control-sidebar-open,
@ -4870,25 +4874,25 @@ a:focus {
.control-sidebar-open .main-footer {
margin-right: 230px; } }
.nav-tabs.control-sidebar-tabs > li:first-of-type > a, .nav-tabs.control-sidebar-tabs > li:first-of-type > a:hover, .nav-tabs.control-sidebar-tabs > li:first-of-type > a:focus {
.nav-tabs.control-sidebar-tabs > .nav-item:first-of-type > .nav-link, .nav-tabs.control-sidebar-tabs > .nav-item:first-of-type > .nav-link:hover, .nav-tabs.control-sidebar-tabs > .nav-item:first-of-type > .nav-link:focus {
border-left-width: 0; }
.nav-tabs.control-sidebar-tabs > li > a {
.nav-tabs.control-sidebar-tabs > .nav-item > .nav-link {
border-radius: 0; }
.nav-tabs.control-sidebar-tabs > li > a, .nav-tabs.control-sidebar-tabs > li > a:hover {
.nav-tabs.control-sidebar-tabs > .nav-item > .nav-link, .nav-tabs.control-sidebar-tabs > .nav-item > .nav-link:hover {
border-top: none;
border-right: none;
border-left: 1px solid transparent;
border-bottom: 1px solid transparent; }
.nav-tabs.control-sidebar-tabs > li > a .icon {
.nav-tabs.control-sidebar-tabs > .nav-item > .nav-link .icon {
font-size: 16px; }
.nav-tabs.control-sidebar-tabs > li.active > a, .nav-tabs.control-sidebar-tabs > li.active > a:hover, .nav-tabs.control-sidebar-tabs > li.active > a:focus, .nav-tabs.control-sidebar-tabs > li.active > a:active {
.nav-tabs.control-sidebar-tabs > .nav-item.active > .nav-link, .nav-tabs.control-sidebar-tabs > .nav-item.active > .nav-link:hover, .nav-tabs.control-sidebar-tabs > .nav-item.active > .nav-link:focus, .nav-tabs.control-sidebar-tabs > .nav-item.active > .nav-link:active {
border-top: none;
border-right: none;
border-bottom: none; }
@media (max-width: 34em) {
@media (max-width: 48em) {
.nav-tabs.control-sidebar-tabs {
display: table; }
.nav-tabs.control-sidebar-tabs > li {

272
dist/js/adminlte.js vendored Normal file
View file

@ -0,0 +1,272 @@
/*!
* 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

7
dist/js/adminlte.min.js vendored Normal file
View file

@ -0,0 +1,7 @@
/*!
* 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";function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var _createClass=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),Treeview=function(a){var b="Treeview",c=a.fn[b],d=function(){function a(b,c){_classCallCheck(this,a),this._config=c,this._element=b}return _createClass(a,null,[{key:"_jQueryInterface",value:function(a){return this.each(function(){this._config=a})}}]),a}();return a.fn[b]=d._jQueryInterface,a.fn[b].Constructor=d,a.fn[b].noConflict=function(){return a.fn[b]=c,d._jQueryInterface},d}(jQuery),_createClass=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),PushMenu=function(a){var b="PushMenu",c="lte.pushmenu",d="."+c,e=a.fn[b],f={COLLAPSED:"collapsed"+d,SHOWN:"shown"+c},g={COLLAPSED:"sidebar-collapse",TOGGLE_BUTTON:'[data-widget="pushmenu"]'},h=function(){function b(){_classCallCheck(this,b)}return _createClass(b,[{key:"Constructor",value:function(a){this._element=a,this._isShown}},{key:"show",value:function(){a("body").removeClass(g.COLLAPSED),this._isShown=!0;var b=a.Event(f.SHOWN);a(this._element).trigger(b)}},{key:"collapse",value:function(){a("body").addClass(g.COLLAPSED),this._isShown=!1;var b=a.Event(f.COLLAPSED);a(this._element).trigger(b)}},{key:"toggle",value:function(){"undefined"==typeof this._isShown&&(this._isShown=!a("body").hasClass(g.COLLAPSED)),this._isShown?this.collapse():this.show()}}],[{key:"_jQueryInterface",value:function(d){return this.each(function(){var e=a(this).data(c);e||(e=new b(this),a(this).data(c,e)),d&&e[d]()})}}]),b}();return a(document).on("click",g.TOGGLE_BUTTON,function(b){b.preventDefault();var c=b.target;"pushmenu"!==a(c).data("widget")&&(c=a(c).closest(g.TOGGLE_BUTTON)),h._jQueryInterface.call(a(c),"toggle")}),a.fn[b]=h._jQueryInterface,a.fn[b].Constructor=h,a.fn[b].noConflict=function(){return a.fn[b]=e,h._jQueryInterface},h}(jQuery),_createClass=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),Widget=function(a){var b=function(){function b(){_classCallCheck(this,b)}return _createClass(b,[{key:"Constructor",value:function(a){this._element=a}}],[{key:"_jQueryInterface",value:function(b){var c=a(b);c.show()}}]),b}();return b}(jQuery);

443
dist/js/app.js vendored
View file

@ -5,15 +5,15 @@
* options and implements exclusive AdminLTE plugins.
*
* @Author Almsaeed Studio
* @Support <http://www.almsaeedstudio.com>
* @Support <http:// www.almsaeedstudio.com>
* @Email <support@almsaeedstudio.com>
* @version 2.3.2
* @license MIT <http://opensource.org/licenses/MIT>
* @license MIT <http:// opensource.org/licenses/MIT>
*/
//Make sure jQuery has been loaded before app.js
if (typeof jQuery === "undefined") {
throw new Error("AdminLTE requires jQuery");
// Make sure jQuery has been loaded before app.js
if (typeof jQuery === 'undefined') {
throw new Error('AdminLTE requires jQuery');
}
/* AdminLTE
@ -33,95 +33,96 @@ $.AdminLTE = {};
* Modify these options to suit your implementation
*/
$.AdminLTE.options = {
//Add slimscroll to navbar menus
//This requires you to load the slimscroll plugin
//in every page before app.js
// Add slimscroll to navbar menus
// This requires you to load the slimscroll plugin
// in every page before app.js
navbarMenuSlimscroll: true,
navbarMenuSlimscrollWidth: "3px", //The width of the scroll bar
navbarMenuHeight: "200px", //The height of the inner menu
//General animation speed for JS animated elements such as box collapse/expand and
//sidebar treeview slide up/down. This options accepts an integer as milliseconds,
//'fast', 'normal', or 'slow'
navbarMenuSlimscrollWidth: '3px', // The width of the scroll bar
navbarMenuHeight: '200px', // The height of the inner menu
// General animation speed for JS animated elements such as box collapse/expand and
// sidebar treeview slide up/down. This options accepts an integer as milliseconds,
// 'fast', 'normal', or 'slow'
animationSpeed: 500,
//Sidebar push menu toggle button selector
sidebarToggleSelector: "[data-toggle='offcanvas']",
//Activate sidebar push menu
// Sidebar push menu toggle button selector
sidebarToggleSelector: '[data-toggle="offcanvas"]',
// Activate sidebar push menu
sidebarPushMenu: true,
//Activate sidebar slimscroll if the fixed layout is set (requires SlimScroll Plugin)
// Activate sidebar slimscroll if the fixed layout is set (requires SlimScroll Plugin)
sidebarSlimScroll: true,
//Enable sidebar expand on hover effect for sidebar mini
//This option is forced to true if both the fixed layout and sidebar mini
//are used together
// Enable sidebar expand on hover effect for sidebar mini
// This option is forced to true if both the fixed layout and sidebar mini
// are used together
// are used together
sidebarExpandOnHover: false,
//BoxRefresh Plugin
// BoxRefresh Plugin
enableBoxRefresh: true,
//Bootstrap.js tooltip
// Bootstrap.js tooltip
enableBSToppltip: true,
BSTooltipSelector: "[data-toggle='tooltip']",
//Enable Fast Click. Fastclick.js creates a more
//native touch experience with touch devices. If you
//choose to enable the plugin, make sure you load the script
//before AdminLTE's app.js
BSTooltipSelector: '[data-toggle="tooltip"]',
// Enable Fast Click. Fastclick.js creates a more
// native touch experience with touch devices. If you
// choose to enable the plugin, make sure you load the script
// before AdminLTE's app.js
enableFastclick: true,
//Control Sidebar Options
// Control Sidebar Options
enableControlSidebar: true,
controlSidebarOptions: {
//Which button should trigger the open/close event
toggleBtnSelector: "[data-toggle='control-sidebar']",
//The sidebar selector
selector: ".control-sidebar",
//Enable slide over content
// Which button should trigger the open/close event
toggleBtnSelector: '[data-toggle="control-sidebar"]',
// The sidebar selector
selector: '.control-sidebar',
// Enable slide over content
slide: true
},
//Box Widget Plugin. Enable this plugin
//to allow boxes to be collapsed and/or removed
// Box Widget Plugin. Enable this plugin
// to allow boxes to be collapsed and/or removed
enableBoxWidget: true,
//Box Widget plugin options
// Box Widget plugin options
boxWidgetOptions: {
boxWidgetIcons: {
//Collapse icon
// Collapse icon
collapse: 'fa-minus',
//Open icon
// Open icon
open: 'fa-plus',
//Remove icon
// Remove icon
remove: 'fa-times'
},
boxWidgetSelectors: {
//Remove button selector
// Remove button selector
remove: '[data-widget="remove"]',
//Collapse button selector
// Collapse button selector
collapse: '[data-widget="collapse"]'
}
},
//Direct Chat plugin options
// Direct Chat plugin options
directChat: {
//Enable direct chat by default
// Enable direct chat by default
enable: true,
//The button to open and close the chat contacts pane
// The button to open and close the chat contacts pane
contactToggleSelector: '[data-widget="chat-pane-toggle"]'
},
//Define the set of colors to use globally around the website
// Define the set of colors to use globally around the website
colors: {
lightBlue: "#3c8dbc",
red: "#f56954",
green: "#00a65a",
aqua: "#00c0ef",
yellow: "#f39c12",
blue: "#0073b7",
navy: "#001F3F",
teal: "#39CCCC",
olive: "#3D9970",
lime: "#01FF70",
orange: "#FF851B",
fuchsia: "#F012BE",
purple: "#8E24AA",
maroon: "#D81B60",
black: "#222222",
gray: "#d2d6de"
lightBlue: '#3c8dbc',
red: '#f56954',
green: '#00a65a',
aqua: '#00c0ef',
yellow: '#f39c12',
blue: '#0073b7',
navy: '#001F3F',
teal: '#39CCCC',
olive: '#3D9970',
lime: '#01FF70',
orange: '#FF851B',
fuchsia: '#F012BE',
purple: '#8E24AA',
maroon: '#D81B60',
black: '#222222',
gray: '#d2d6de'
},
//The standard screen sizes that bootstrap uses.
//If you change these in the variables.less file, change
//them here too.
// The standard screen sizes that bootstrap uses.
// If you change these in the variables.less file, change
// them here too.
screenSizes: {
xs: 480,
sm: 768,
@ -138,67 +139,67 @@ $.AdminLTE.options = {
* options above.
*/
$(function () {
"use strict";
'use strict';
//Fix for IE page transitions
$("body").removeClass("hold-transition");
// Fix for IE page transitions
$('body').removeClass('hold-transition');
//Extend options if external options exist
if (typeof AdminLTEOptions !== "undefined") {
// Extend options if external options exist
if (typeof AdminLTEOptions !== 'undefined') {
$.extend(true,
$.AdminLTE.options,
AdminLTEOptions);
}
//Easy access to options
// Easy access to options
var o = $.AdminLTE.options;
//Set up the object
// Set up the object
_init();
//Activate the layout maker
// Activate the layout maker
$.AdminLTE.layout.activate();
//Enable sidebar tree view controls
// Enable sidebar tree view controls
$.AdminLTE.tree('.sidebar');
//Enable control sidebar
// Enable control sidebar
if (o.enableControlSidebar) {
$.AdminLTE.controlSidebar.activate();
}
//Add slimscroll to navbar dropdown
// Add slimscroll to navbar dropdown
if (o.navbarMenuSlimscroll && typeof $.fn.slimscroll != 'undefined') {
$(".navbar .menu").slimscroll({
$('.navbar .menu').slimscroll({
height: o.navbarMenuHeight,
alwaysVisible: false,
size: o.navbarMenuSlimscrollWidth
}).css("width", "100%");
}).css('width', '100%');
}
//Activate sidebar push menu
// Activate sidebar push menu
if (o.sidebarPushMenu) {
$.AdminLTE.pushMenu.activate(o.sidebarToggleSelector);
}
//Activate Bootstrap tooltip
// Activate Bootstrap tooltip
if (o.enableBSToppltip) {
$('body').tooltip({
selector: o.BSTooltipSelector
});
}
//Activate box widget
// Activate box widget
if (o.enableBoxWidget) {
$.AdminLTE.boxWidget.activate();
}
//Activate fast click
// Activate fast click
if (o.enableFastclick && typeof FastClick != 'undefined') {
FastClick.attach(document.body);
}
//Activate direct chat widget
// Activate direct chat widget
if (o.directChat.enable) {
$(document).on('click', o.directChat.contactToggleSelector, function () {
var box = $(this).parents('.direct-chat').first();
@ -212,9 +213,9 @@ $(function () {
*/
$('.btn-group[data-toggle="btn-toggle"]').each(function () {
var group = $(this);
$(this).find(".btn").on('click', function (e) {
group.find(".btn.active").removeClass("active");
$(this).addClass("active");
$(this).find('.btn').on('click', function (e) {
group.find('.btn.active').removeClass('active');
$(this).addClass('active');
e.preventDefault();
});
@ -242,59 +243,59 @@ function _init() {
var _this = this;
_this.fix();
_this.fixSidebar();
$(window, ".wrapper").resize(function () {
$(window, '.wrapper').resize(function () {
_this.fix();
_this.fixSidebar();
});
},
fix: function () {
//Get window height and the wrapper height
// Get window height and the wrapper height
var neg = $('.main-header').outerHeight() + $('.main-footer').outerHeight();
var window_height = $(window).height();
var sidebar_height = $(".sidebar").height();
//Set the min-height of the content and sidebar based on the
//the height of the document.
if ($("body").hasClass("fixed")) {
$(".content-wrapper, .right-side").css('min-height', window_height - $('.main-footer').outerHeight());
var sidebar_height = $('.sidebar').height();
// Set the min-height of the content and sidebar based on the
// the height of the document.
if ($('body').hasClass('fixed')) {
$('.content-wrapper, .right-side').css('min-height', window_height - $('.main-footer').outerHeight());
} else {
var postSetWidth;
if (window_height >= sidebar_height) {
$(".content-wrapper, .right-side").css('min-height', window_height - neg);
$('.content-wrapper, .right-side').css('min-height', window_height - neg);
postSetWidth = window_height - neg;
} else {
$(".content-wrapper, .right-side").css('min-height', sidebar_height);
$('.content-wrapper, .right-side').css('min-height', sidebar_height);
postSetWidth = sidebar_height;
}
//Fix for the control sidebar height
// Fix for the control sidebar height
var controlSidebar = $($.AdminLTE.options.controlSidebarOptions.selector);
if (typeof controlSidebar !== "undefined") {
if (typeof controlSidebar !== 'undefined') {
if (controlSidebar.height() > postSetWidth)
$(".content-wrapper, .right-side").css('min-height', controlSidebar.height());
$('.content-wrapper, .right-side').css('min-height', controlSidebar.height());
}
}
},
fixSidebar: function () {
//Make sure the body tag has the .fixed class
if (!$("body").hasClass("fixed")) {
// Make sure the body tag has the .fixed class
if (!$('body').hasClass('fixed')) {
if (typeof $.fn.slimScroll != 'undefined') {
$(".sidebar").slimScroll({destroy: true}).height("auto");
$('.sidebar').slimScroll({destroy: true}).height('auto');
}
return;
} else if (typeof $.fn.slimScroll == 'undefined' && window.console) {
window.console.error("Error: the fixed layout requires the slimscroll plugin!");
window.console.error('Error: the fixed layout requires the slimscroll plugin!');
}
//Enable slimscroll for fixed layout
// Enable slimscroll for fixed layout
if ($.AdminLTE.options.sidebarSlimScroll) {
if (typeof $.fn.slimScroll != 'undefined') {
//Destroy if it exists
$(".sidebar").slimScroll({destroy: true}).height("auto");
//Add slimscroll
$(".sidebar").slimscroll({
height: ($(window).height() - $(".main-header").height()) + "px",
color: "rgba(0,0,0,0.2)",
size: "3px"
// Destroy if it exists
$('.sidebar').slimScroll({destroy: true}).height('auto');
// Add slimscroll
$('.sidebar').slimscroll({
height: ($(window).height() - $('.main-header').height()) + 'px',
color: 'rgba(0,0,0,0.2)',
size: '3px'
});
}
}
@ -306,43 +307,43 @@ function _init() {
* Adds the push menu functionality to the sidebar.
*
* @type Function
* @usage: $.AdminLTE.pushMenu("[data-toggle='offcanvas']")
* @usage: $.AdminLTE.pushMenu('[data-toggle="offcanvas']')
*/
$.AdminLTE.pushMenu = {
activate: function (toggleBtn) {
//Get the screen sizes
// Get the screen sizes
var screenSizes = $.AdminLTE.options.screenSizes;
//Enable sidebar toggle
// Enable sidebar toggle
$(document).on('click', toggleBtn, function (e) {
e.preventDefault();
//Enable sidebar push menu
// Enable sidebar push menu
if ($(window).width() > (screenSizes.sm - 1)) {
if ($("body").hasClass('sidebar-collapse')) {
$("body").removeClass('sidebar-collapse').trigger('expanded.pushMenu');
if ($('body').hasClass('sidebar-collapse')) {
$('body').removeClass('sidebar-collapse').trigger('expanded.pushMenu');
} else {
$("body").addClass('sidebar-collapse').trigger('collapsed.pushMenu');
$('body').addClass('sidebar-collapse').trigger('collapsed.pushMenu');
}
}
//Handle sidebar push menu for small screens
// Handle sidebar push menu for small screens
else {
if ($("body").hasClass('sidebar-open')) {
$("body").removeClass('sidebar-open').removeClass('sidebar-collapse').trigger('collapsed.pushMenu');
if ($('body').hasClass('sidebar-open')) {
$('body').removeClass('sidebar-open').removeClass('sidebar-collapse').trigger('collapsed.pushMenu');
} else {
$("body").addClass('sidebar-open').trigger('expanded.pushMenu');
$('body').addClass('sidebar-open').trigger('expanded.pushMenu');
}
}
});
$(".content-wrapper").click(function () {
//Enable hide menu when clicking on the content-wrapper on small screens
if ($(window).width() <= (screenSizes.sm - 1) && $("body").hasClass("sidebar-open")) {
$("body").removeClass('sidebar-open');
$('.content-wrapper').click(function () {
// Enable hide menu when clicking on the content-wrapper on small screens
if ($(window).width() <= (screenSizes.sm - 1) && $('body').hasClass('sidebar-open')) {
$('body').removeClass('sidebar-open');
}
});
//Enable expand on hover for sidebar mini
// Enable expand on hover for sidebar mini
if ($.AdminLTE.options.sidebarExpandOnHover
|| ($('body').hasClass('fixed')
&& $('body').hasClass('sidebar-mini'))) {
@ -352,10 +353,10 @@ function _init() {
expandOnHover: function () {
var _this = this;
var screenWidth = $.AdminLTE.options.screenSizes.sm - 1;
//Expand sidebar on hover
// Expand sidebar on hover
$('.main-sidebar').hover(function () {
if ($('body').hasClass('sidebar-mini')
&& $("body").hasClass('sidebar-collapse')
&& $('body').hasClass('sidebar-collapse')
&& $(window).width() > screenWidth) {
_this.expand();
}
@ -368,7 +369,7 @@ function _init() {
});
},
expand: function () {
$("body").removeClass('sidebar-collapse').addClass('sidebar-expanded-on-hover');
$('body').removeClass('sidebar-collapse').addClass('sidebar-expanded-on-hover');
},
collapse: function () {
if ($('body').hasClass('sidebar-expanded-on-hover')) {
@ -389,42 +390,42 @@ function _init() {
var _this = this;
var animationSpeed = $.AdminLTE.options.animationSpeed;
$(menu).on('click', 'li a', function (e) {
//Get the clicked link and the next element
// Get the clicked link and the next element
var $this = $(this);
var checkElement = $this.next();
//Check if the next element is a menu and is visible
// Check if the next element is a menu and is visible
if ((checkElement.is('.treeview-menu')) && (checkElement.is(':visible')) && (!$('body').hasClass('sidebar-collapse'))) {
//Close the menu
// Close the menu
checkElement.slideUp(animationSpeed, function () {
checkElement.removeClass('menu-open');
//Fix the layout in case the sidebar stretches over the height of the window
//_this.layout.fix();
// Fix the layout in case the sidebar stretches over the height of the window
// _this.layout.fix();
});
checkElement.parent("li").removeClass("active");
checkElement.parent('li').removeClass('active');
}
//If the menu is not visible
// If the menu is not visible
else if ((checkElement.is('.treeview-menu')) && (!checkElement.is(':visible'))) {
//Get the parent menu
// Get the parent menu
var parent = $this.parents('ul').first();
//Close all open menus within the parent
// Close all open menus within the parent
var ul = parent.find('ul:visible').slideUp(animationSpeed);
//Remove the menu-open class from the parent
// Remove the menu-open class from the parent
ul.removeClass('menu-open');
//Get the parent li
var parent_li = $this.parent("li");
// Get the parent li
var parent_li = $this.parent('li');
//Open the target menu and add the menu-open class
// Open the target menu and add the menu-open class
checkElement.slideDown(animationSpeed, function () {
//Add the class active to the parent li
// Add the class active to the parent li
checkElement.addClass('menu-open');
parent.find('li.active').removeClass('active');
parent_li.addClass('active');
//Fix the layout in case the sidebar stretches over the height of the window
// Fix the layout in case the sidebar stretches over the height of the window
_this.layout.fix();
});
}
//if this isn't a link, prevent the page from being redirected
// if this isn't a link, prevent the page from being redirected
if (checkElement.is('.treeview-menu')) {
e.preventDefault();
}
@ -439,56 +440,56 @@ function _init() {
* @usage $.AdminLTE.controlSidebar.activate(options)
*/
$.AdminLTE.controlSidebar = {
//instantiate the object
// instantiate the object
activate: function () {
//Get the object
// Get the object
var _this = this;
//Update options
// Update options
var o = $.AdminLTE.options.controlSidebarOptions;
//Get the sidebar
// Get the sidebar
var sidebar = $(o.selector);
//The toggle button
// The toggle button
var btn = $(o.toggleBtnSelector);
//Listen to the click event
// Listen to the click event
btn.on('click', function (e) {
e.preventDefault();
//If the sidebar is not open
// If the sidebar is not open
if (!sidebar.hasClass('control-sidebar-open')
&& !$('body').hasClass('control-sidebar-open')) {
//Open the sidebar
// Open the sidebar
_this.open(sidebar, o.slide);
} else {
_this.close(sidebar, o.slide);
}
});
//If the body has a boxed layout, fix the sidebar bg position
var bg = $(".control-sidebar-bg");
// If the body has a boxed layout, fix the sidebar bg position
var bg = $('.control-sidebar-bg');
_this._fix(bg);
//If the body has a fixed layout, make the control sidebar fixed
// If the body has a fixed layout, make the control sidebar fixed
if ($('body').hasClass('fixed')) {
_this._fixForFixed(sidebar);
} else {
//If the content height is less than the sidebar's height, force max height
// If the content height is less than the sidebar's height, force max height
if ($('.content-wrapper, .right-side').height() < sidebar.height()) {
_this._fixForContent(sidebar);
}
}
},
//Open the control sidebar
// Open the control sidebar
open: function (sidebar, slide) {
//Slide over content
// Slide over content
if (slide) {
sidebar.addClass('control-sidebar-open');
} else {
//Push the content by adding the open class to the body instead
//of the sidebar itself
// Push the content by adding the open class to the body instead
// of the sidebar itself
$('body').addClass('control-sidebar-open');
}
},
//Close the control sidebar
// Close the control sidebar
close: function (sidebar, slide) {
if (slide) {
sidebar.removeClass('control-sidebar-open');
@ -498,9 +499,9 @@ function _init() {
},
_fix: function (sidebar) {
var _this = this;
if ($("body").hasClass('layout-boxed')) {
if ($('body').hasClass('layout-boxed')) {
sidebar.css('position', 'absolute');
sidebar.height($(".wrapper").height());
sidebar.height($('.wrapper').height());
$(window).resize(function () {
_this._fix(sidebar);
});
@ -520,7 +521,7 @@ function _init() {
});
},
_fixForContent: function (sidebar) {
$(".content-wrapper, .right-side").css('min-height', sidebar.height());
$('.content-wrapper, .right-side').css('min-height', sidebar.height());
}
};
@ -540,15 +541,15 @@ function _init() {
activate: function (_box) {
var _this = this;
if (!_box) {
_box = document; // activate all boxes per default
_box = document; // activate all boxes per default
}
//Listen for collapse event triggers
// Listen for collapse event triggers
$(_box).on('click', _this.selectors.collapse, function (e) {
e.preventDefault();
_this.collapse($(this));
});
//Listen for remove event triggers
// Listen for remove event triggers
$(_box).on('click', _this.selectors.remove, function (e) {
e.preventDefault();
_this.remove($(this));
@ -556,33 +557,33 @@ function _init() {
},
collapse: function (element) {
var _this = this;
//Find the box parent
var box = element.parents(".box").first();
//Find the body and the footer
var box_content = box.find("> .box-body, > .box-footer, > form >.box-body, > form > .box-footer");
if (!box.hasClass("collapsed-box")) {
//Convert minus into plus
element.children(":first")
// Find the box parent
var box = element.parents('.box').first();
// Find the body and the footer
var box_content = box.find('> .box-body, > .box-footer, > form >.box-body, > form > .box-footer');
if (!box.hasClass('collapsed-box')) {
// Convert minus into plus
element.children(':first')
.removeClass(_this.icons.collapse)
.addClass(_this.icons.open);
//Hide the content
// Hide the content
box_content.slideUp(_this.animationSpeed, function () {
box.addClass("collapsed-box");
box.addClass('collapsed-box');
});
} else {
//Convert plus into minus
element.children(":first")
// Convert plus into minus
element.children(':first')
.removeClass(_this.icons.open)
.addClass(_this.icons.collapse);
//Show the content
// Show the content
box_content.slideDown(_this.animationSpeed, function () {
box.removeClass("collapsed-box");
box.removeClass('collapsed-box');
});
}
},
remove: function (element) {
//Find the box parent
var box = element.parents(".box").first();
// Find the box parent
var box = element.parents('.box').first();
box.slideUp(this.animationSpeed);
}
};
@ -601,68 +602,68 @@ function _init() {
* a refresh button to the box. It converts the box's state to a loading state.
*
* @type plugin
* @usage $("#box-widget").boxRefresh( options );
* @usage $('#box-widget').boxRefresh( options );
*/
(function ($) {
"use strict";
'use strict';
$.fn.boxRefresh = function (options) {
// Render options
// Render options
var settings = $.extend({
//Refresh button selector
trigger: ".refresh-btn",
//File source to be loaded (e.g: ajax/src.php)
source: "",
//Callbacks
// Refresh button selector
trigger: '.refresh-btn',
// File source to be loaded (e.g: ajax/src.php)
source: '',
// Callbacks
onLoadStart: function (box) {
return box;
}, //Right after the button has been clicked
}, // Right after the button has been clicked
onLoadDone: function (box) {
return box;
} //When the source has been loaded
} // When the source has been loaded
}, options);
//The overlay
// The overlay
var overlay = $('<div class="overlay"><div class="fa fa-refresh fa-spin"></div></div>');
return this.each(function () {
//if a source is specified
if (settings.source === "") {
// if a source is specified
if (settings.source === '') {
if (window.console) {
window.console.log("Please specify a source first - boxRefresh()");
window.console.log('Please specify a source first - boxRefresh()');
}
return;
}
//the box
// the box
var box = $(this);
//the button
// the button
var rBtn = box.find(settings.trigger).first();
//On trigger click
// On trigger click
rBtn.on('click', function (e) {
e.preventDefault();
//Add loading overlay
// Add loading overlay
start(box);
//Perform ajax call
box.find(".box-body").load(settings.source, function () {
// Perform ajax call
box.find('.box-body').load(settings.source, function () {
done(box);
});
});
});
function start(box) {
//Add overlay and loading img
// Add overlay and loading img
box.append(overlay);
settings.onLoadStart.call(box);
}
function done(box) {
//Remove overlay and loading img
// Remove overlay and loading img
box.find(overlay).remove();
settings.onLoadDone.call(box);
@ -679,9 +680,9 @@ function _init() {
* a box inserted in the DOM after the app.js was loaded, toggle and remove box.
*
* @type plugin
* @usage $("#box-widget").activateBox();
* @usage $("#box-widget").toggleBox();
* @usage $("#box-widget").removeBox();
* @usage $('#box-widget').activateBox();
* @usage $('#box-widget').toggleBox();
* @usage $('#box-widget').removeBox();
*/
(function ($) {
@ -691,12 +692,12 @@ function _init() {
$.AdminLTE.boxWidget.activate(this);
};
$.fn.toggleBox = function(){
$.fn.toggleBox = function() {
var button = $($.AdminLTE.boxWidget.selectors.collapse, this);
$.AdminLTE.boxWidget.collapse(button);
};
$.fn.removeBox = function(){
$.fn.removeBox = function() {
var button = $($.AdminLTE.boxWidget.selectors.remove, this);
$.AdminLTE.boxWidget.remove(button);
};
@ -709,20 +710,20 @@ function _init() {
* This plugin depends on iCheck plugin for checkbox and radio inputs
*
* @type plugin
* @usage $("#todo-widget").todolist( options );
* @usage $('#todo-widget').todolist( options );
*/
(function ($) {
'use strict';
$.fn.todolist = function (options) {
// Render options
// Render options
var settings = $.extend({
//When the user checks the input
// When the user checks the input
onCheck: function (ele) {
return ele;
},
//When the user unchecks the input
// When the user unchecks the input
onUncheck: function (ele) {
return ele;
}
@ -732,21 +733,21 @@ function _init() {
if (typeof $.fn.iCheck != 'undefined') {
$('input', this).on('ifChecked', function () {
var ele = $(this).parents("li").first();
ele.toggleClass("done");
var ele = $(this).parents('li').first();
ele.toggleClass('done');
settings.onCheck.call(ele);
});
$('input', this).on('ifUnchecked', function () {
var ele = $(this).parents("li").first();
ele.toggleClass("done");
var ele = $(this).parents('li').first();
ele.toggleClass('done');
settings.onUncheck.call(ele);
});
} else {
$('input', this).on('change', function () {
var ele = $(this).parents("li").first();
ele.toggleClass("done");
if ($('input', ele).is(":checked")) {
var ele = $(this).parents('li').first();
ele.toggleClass('done');
if ($('input', ele).is(':checked')) {
settings.onCheck.call(ele);
} else {
settings.onUncheck.call(ele);
@ -755,4 +756,4 @@ function _init() {
}
});
};
}(jQuery));
}(jQuery));

6
dist/js/app.min.js vendored

File diff suppressed because one or more lines are too long

6
dist/js/demo.js vendored
View file

@ -31,12 +31,12 @@
//Create the new tab
var tab_pane = $("<div />", {
"id": "control-sidebar-theme-demo-options-tab",
"class": "tab-pane active"
"class": "tab-pane"
});
//Create the tab button
var tab_button = $("<li />", {"class": "active"})
.html("<a href='#control-sidebar-theme-demo-options-tab' data-toggle='tab'>"
var tab_button = $("<li />", {"class": "nav-item"})
.html("<a href='#control-sidebar-theme-demo-options-tab' data-toggle='tab' class='nav-link'>"
+ "<i class='fa fa-wrench'></i>"
+ "</a>");

View file

@ -1,18 +1,38 @@
{
"name": "admin-lte",
"version": "2.3.2",
"description": "Responsive open source admin dashboard and control panel.",
"version": "3.0.0-alpha",
"license": "MIT",
"author": "Abdullah Almsaeed <abdullah@almsaeedstudio.com>",
"keywords": [
"css",
"sass",
"responsive",
"admin",
"template",
"theme",
"framework",
"control-panel",
"dashboard"
],
"homepage": "https://almsaeedstudio.com",
"style": "dist/css/AdminLTE.css",
"sass": "build/scss/AdminLTE.scss",
"repository": {
"type": "git",
"url": "git://github.com/almasaeed2010/AdminLTE.git"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/almasaeed2010/AdminLTE/issues"
},
"devDependencies": {
"R2": "^1.4.3",
"babel-preset-es2015": "^6.0.15",
"babel-eslint": "^4.1.4",
"babel-preset-es2015": "^6.1.4",
"grunt": "~0.4.5",
"grunt-babel": "^6.0.0",
"grunt-bootlint": "^0.9.1",
"grunt-contrib-clean": "^0.6.0",
"grunt-contrib-concat": "^0.5.1",
"grunt-contrib-csslint": "^0.5.0",
"grunt-contrib-cssmin": "^0.12.2",
"grunt-contrib-jshint": "^0.11.2",
@ -20,8 +40,11 @@
"grunt-contrib-uglify": "^0.7.0",
"grunt-contrib-watch": "~0.6.1",
"grunt-cssjanus": "^0.2.4",
"grunt-eslint": "^17.3.1",
"grunt-image": "^1.0.5",
"grunt-includes": "^0.4.5",
"grunt-sass": "^1.1.0"
"grunt-jscs": "^2.3.0",
"grunt-sass": "^1.1.0",
"grunt-scss-lint": "^0.3.8"
}
}