mirror of https://github.com/ColorlibHQ/AdminLTE
Create PushMenu.js
parent
4ab0cc8b78
commit
c4ac73688b
143
Gruntfile.js
143
Gruntfile.js
|
@ -2,14 +2,33 @@
|
||||||
|
|
||||||
module.exports = function (grunt) {
|
module.exports = function (grunt) {
|
||||||
|
|
||||||
'use strict';
|
'use strict'
|
||||||
|
|
||||||
grunt.initConfig({
|
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: {
|
watch: {
|
||||||
// If any .less file changes in directory "build/less/" run the "less"-task.
|
sass: {
|
||||||
// files: ["build/less/*.less", "build/less/skins/*.less", "dist/js/app.js"],
|
files: ['build/scss/*.scss', 'build/scss/skins/*.scss'],
|
||||||
files: ["build/scss/*.scss", "build/scss/skins/*.scss", "dist/js/app.js"],
|
tasks: ['sass']
|
||||||
tasks: ["sass", "uglify"]
|
},
|
||||||
|
es6: {
|
||||||
|
files: ['build/js/src/*.js'],
|
||||||
|
tasks: ['babel']
|
||||||
|
},
|
||||||
|
js: {
|
||||||
|
files: ['dist/js/AdminLTE.js', 'dist/js/app.js'],
|
||||||
|
tasks: ['uglify']
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// SASS compiler
|
// SASS compiler
|
||||||
|
@ -27,25 +46,26 @@ module.exports = function (grunt) {
|
||||||
style: 'compressed'
|
style: 'compressed'
|
||||||
},
|
},
|
||||||
files: {
|
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: {
|
uglify: {
|
||||||
options: {
|
options: {
|
||||||
mangle: true,
|
mangle: true,
|
||||||
preserveComments: 'some'
|
preserveComments: 'some'
|
||||||
},
|
},
|
||||||
my_target: {
|
target: {
|
||||||
files: {
|
files: {
|
||||||
|
'dist/js/adminlte.min.js': ['dist/js/adminlte.js'],
|
||||||
'dist/js/app.min.js': ['dist/js/app.js']
|
'dist/js/app.min.js': ['dist/js/app.js']
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// Compile ECMA6 to ECMA5
|
// Compile ES6
|
||||||
babel: {
|
babel: {
|
||||||
options: {
|
options: {
|
||||||
sourceMap: true,
|
sourceMap: true,
|
||||||
|
@ -53,11 +73,29 @@ module.exports = function (grunt) {
|
||||||
},
|
},
|
||||||
dist: {
|
dist: {
|
||||||
files: {
|
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
|
// Build the documentation files
|
||||||
includes: {
|
includes: {
|
||||||
build: {
|
build: {
|
||||||
|
@ -75,29 +113,38 @@ module.exports = function (grunt) {
|
||||||
// Optimize images
|
// Optimize images
|
||||||
image: {
|
image: {
|
||||||
dynamic: {
|
dynamic: {
|
||||||
files: [{
|
files: [
|
||||||
expand: true,
|
{
|
||||||
cwd: 'build/img/',
|
expand: true,
|
||||||
src: ['**/*.{png,jpg,gif,svg,jpeg}'],
|
cwd: 'build/img/',
|
||||||
dest: 'dist/img/'
|
src: ['**/*.{png,jpg,gif,svg,jpeg}'],
|
||||||
}]
|
dest: 'dist/img/'
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// Validate JS code
|
eslint: {
|
||||||
jshint: {
|
|
||||||
options: {
|
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: {
|
core: {
|
||||||
src: 'dist/js/app.js'
|
src: 'js/src/*.js'
|
||||||
},
|
|
||||||
demo: {
|
|
||||||
src: 'dist/js/demo.js'
|
|
||||||
},
|
|
||||||
pages: {
|
|
||||||
src: 'dist/js/pages/*.js'
|
|
||||||
}
|
}
|
||||||
|
/*app: {
|
||||||
|
src: 'dist/js/app.js'
|
||||||
|
}*/
|
||||||
},
|
},
|
||||||
|
|
||||||
// Validate CSS files
|
// Validate CSS files
|
||||||
|
@ -106,7 +153,7 @@ module.exports = function (grunt) {
|
||||||
csslintrc: 'build/scss/.csslintrc'
|
csslintrc: 'build/scss/.csslintrc'
|
||||||
},
|
},
|
||||||
dist: [
|
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
|
// After compressing the images in the build/img dir, there is no need
|
||||||
// for them
|
// for them
|
||||||
clean: {
|
clean: {
|
||||||
build: ["build/img/*"]
|
build: ['build/img/*']
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
|
|
||||||
// Load all grunt tasks
|
// Load all grunt tasks
|
||||||
|
|
||||||
// LESS Compiler
|
|
||||||
grunt.loadNpmTasks('grunt-contrib-less');
|
|
||||||
// SASS compiler
|
// SASS compiler
|
||||||
grunt.loadNpmTasks('grunt-sass');
|
grunt.loadNpmTasks('grunt-sass')
|
||||||
// Watch File Changes
|
// Watch File Changes
|
||||||
grunt.loadNpmTasks('grunt-contrib-watch');
|
grunt.loadNpmTasks('grunt-contrib-watch')
|
||||||
// Compress JS Files
|
// Compress JS Files
|
||||||
grunt.loadNpmTasks('grunt-contrib-uglify');
|
grunt.loadNpmTasks('grunt-contrib-uglify')
|
||||||
// Include Files Within HTML
|
// Include Files Within HTML
|
||||||
grunt.loadNpmTasks('grunt-includes');
|
grunt.loadNpmTasks('grunt-includes')
|
||||||
// Optimize images
|
// Optimize images
|
||||||
grunt.loadNpmTasks('grunt-image');
|
grunt.loadNpmTasks('grunt-image')
|
||||||
// Validate JS code
|
|
||||||
grunt.loadNpmTasks('grunt-contrib-jshint');
|
|
||||||
// Delete not needed files
|
// 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
|
// Lint CSS
|
||||||
grunt.loadNpmTasks('grunt-contrib-csslint');
|
grunt.loadNpmTasks('grunt-contrib-csslint')
|
||||||
// Lint Bootstrap
|
// Lint Bootstrap
|
||||||
grunt.loadNpmTasks('grunt-bootlint');
|
grunt.loadNpmTasks('grunt-bootlint')
|
||||||
// Grunt Babel to compile ECMA6 to ECMA5
|
// Grunt Babel to compile ECMA6 to ECMA5
|
||||||
grunt.loadNpmTasks('grunt-babel');
|
grunt.loadNpmTasks('grunt-babel')
|
||||||
|
// Concat files
|
||||||
|
grunt.loadNpmTasks('grunt-contrib-concat')
|
||||||
|
|
||||||
// Linting task
|
// 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"
|
// The default task (running 'grunt' in console) is 'watch'
|
||||||
grunt.registerTask('default', ['watch']);
|
grunt.registerTask('default', ['watch'])
|
||||||
};
|
}
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -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": "'"
|
||||||
|
}
|
|
@ -1,8 +0,0 @@
|
||||||
(function ($) {
|
|
||||||
"use strict";
|
|
||||||
class treeview {
|
|
||||||
_do() {
|
|
||||||
alert("Good");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})(jQuery);
|
|
|
@ -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
|
File diff suppressed because one or more lines are too long
|
@ -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
|
|
@ -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"]}
|
|
@ -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
|
|
@ -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"]}
|
|
@ -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)
|
|
@ -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)
|
|
@ -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)
|
|
@ -1,11 +0,0 @@
|
||||||
/**
|
|
||||||
* Treeview.js
|
|
||||||
* Version 1.0
|
|
||||||
* Author Abdullah Almsaeed
|
|
||||||
* Website Almsaeed Studio <https://almsaeedstudio.com>
|
|
||||||
*/
|
|
||||||
|
|
||||||
(function($){
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
})(jQuery);
|
|
|
@ -5,7 +5,7 @@
|
||||||
//This is a hack to make the background visible while scrolling
|
//This is a hack to make the background visible while scrolling
|
||||||
.control-sidebar-bg {
|
.control-sidebar-bg {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
z-index: 1000;
|
z-index: 820;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,6 +13,7 @@
|
||||||
.control-sidebar-bg,
|
.control-sidebar-bg,
|
||||||
.control-sidebar {
|
.control-sidebar {
|
||||||
top: 0;
|
top: 0;
|
||||||
|
bottom: 0;
|
||||||
right: -$control-sidebar-width;
|
right: -$control-sidebar-width;
|
||||||
width: $control-sidebar-width;
|
width: $control-sidebar-width;
|
||||||
transition: right $transition-speed ease-in-out
|
transition: right $transition-speed ease-in-out
|
||||||
|
@ -21,12 +22,10 @@
|
||||||
//The sidebar
|
//The sidebar
|
||||||
.control-sidebar {
|
.control-sidebar {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
//padding-top: $navbar-height;
|
padding-top: 55px; //$navbar-height;
|
||||||
z-index: 1010;
|
z-index: 830;
|
||||||
//Fix position after header collapse
|
height: 100%;
|
||||||
@media (max-width: map-get($grid-breakpoints, sm)) {
|
overflow: auto;
|
||||||
//padding-top: $navbar-height + 50;
|
|
||||||
}
|
|
||||||
//Tab panes
|
//Tab panes
|
||||||
> .tab-content {
|
> .tab-content {
|
||||||
padding: 10px 15px;
|
padding: 10px 15px;
|
||||||
|
@ -57,15 +56,19 @@
|
||||||
|
|
||||||
//Control sidebar tabs
|
//Control sidebar tabs
|
||||||
.nav-tabs.control-sidebar-tabs {
|
.nav-tabs.control-sidebar-tabs {
|
||||||
> li {
|
//display: table;
|
||||||
&:first-of-type > a {
|
//width: 100%;
|
||||||
|
> .nav-item {
|
||||||
|
//display: table-cell;
|
||||||
|
//width: auto;
|
||||||
|
&:first-of-type > .nav-link {
|
||||||
&,
|
&,
|
||||||
&:hover,
|
&:hover,
|
||||||
&:focus {
|
&:focus {
|
||||||
border-left-width: 0;
|
border-left-width: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
> a {
|
> .nav-link {
|
||||||
@include border-radius(0);
|
@include border-radius(0);
|
||||||
|
|
||||||
//Hover and active states
|
//Hover and active states
|
||||||
|
@ -82,7 +85,7 @@
|
||||||
}
|
}
|
||||||
//Active state
|
//Active state
|
||||||
&.active {
|
&.active {
|
||||||
> a {
|
> .nav-link {
|
||||||
&,
|
&,
|
||||||
&:hover,
|
&:hover,
|
||||||
&:focus,
|
&:focus,
|
||||||
|
@ -95,7 +98,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//Remove responsiveness on small screens
|
//Remove responsiveness on small screens
|
||||||
@media (max-width: map-get($grid-breakpoints, sm)) {
|
@media (max-width: map-get($grid-breakpoints, md)) {
|
||||||
display: table;
|
display: table;
|
||||||
> li {
|
> li {
|
||||||
display: table-cell;
|
display: table-cell;
|
||||||
|
|
|
@ -4841,19 +4841,23 @@ a:focus {
|
||||||
*/
|
*/
|
||||||
.control-sidebar-bg {
|
.control-sidebar-bg {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
z-index: 1000;
|
z-index: 820;
|
||||||
bottom: 0; }
|
bottom: 0; }
|
||||||
|
|
||||||
.control-sidebar-bg,
|
.control-sidebar-bg,
|
||||||
.control-sidebar {
|
.control-sidebar {
|
||||||
top: 0;
|
top: 0;
|
||||||
|
bottom: 0;
|
||||||
right: -230px;
|
right: -230px;
|
||||||
width: 230px;
|
width: 230px;
|
||||||
transition: right 0.3s ease-in-out; }
|
transition: right 0.3s ease-in-out; }
|
||||||
|
|
||||||
.control-sidebar {
|
.control-sidebar {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 1010; }
|
padding-top: 55px;
|
||||||
|
z-index: 830;
|
||||||
|
height: 100%;
|
||||||
|
overflow: auto; }
|
||||||
.control-sidebar > .tab-content {
|
.control-sidebar > .tab-content {
|
||||||
padding: 10px 15px; }
|
padding: 10px 15px; }
|
||||||
.control-sidebar.control-sidebar-open,
|
.control-sidebar.control-sidebar-open,
|
||||||
|
@ -4870,25 +4874,25 @@ a:focus {
|
||||||
.control-sidebar-open .main-footer {
|
.control-sidebar-open .main-footer {
|
||||||
margin-right: 230px; } }
|
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; }
|
border-left-width: 0; }
|
||||||
|
|
||||||
.nav-tabs.control-sidebar-tabs > li > a {
|
.nav-tabs.control-sidebar-tabs > .nav-item > .nav-link {
|
||||||
border-radius: 0; }
|
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-top: none;
|
||||||
border-right: none;
|
border-right: none;
|
||||||
border-left: 1px solid transparent;
|
border-left: 1px solid transparent;
|
||||||
border-bottom: 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; }
|
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-top: none;
|
||||||
border-right: none;
|
border-right: none;
|
||||||
border-bottom: none; }
|
border-bottom: none; }
|
||||||
|
|
||||||
@media (max-width: 34em) {
|
@media (max-width: 48em) {
|
||||||
.nav-tabs.control-sidebar-tabs {
|
.nav-tabs.control-sidebar-tabs {
|
||||||
display: table; }
|
display: table; }
|
||||||
.nav-tabs.control-sidebar-tabs > li {
|
.nav-tabs.control-sidebar-tabs > li {
|
||||||
|
|
|
@ -4841,19 +4841,23 @@ a:focus {
|
||||||
*/
|
*/
|
||||||
.control-sidebar-bg {
|
.control-sidebar-bg {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
z-index: 1000;
|
z-index: 820;
|
||||||
bottom: 0; }
|
bottom: 0; }
|
||||||
|
|
||||||
.control-sidebar-bg,
|
.control-sidebar-bg,
|
||||||
.control-sidebar {
|
.control-sidebar {
|
||||||
top: 0;
|
top: 0;
|
||||||
|
bottom: 0;
|
||||||
right: -230px;
|
right: -230px;
|
||||||
width: 230px;
|
width: 230px;
|
||||||
transition: right 0.3s ease-in-out; }
|
transition: right 0.3s ease-in-out; }
|
||||||
|
|
||||||
.control-sidebar {
|
.control-sidebar {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 1010; }
|
padding-top: 55px;
|
||||||
|
z-index: 830;
|
||||||
|
height: 100%;
|
||||||
|
overflow: auto; }
|
||||||
.control-sidebar > .tab-content {
|
.control-sidebar > .tab-content {
|
||||||
padding: 10px 15px; }
|
padding: 10px 15px; }
|
||||||
.control-sidebar.control-sidebar-open,
|
.control-sidebar.control-sidebar-open,
|
||||||
|
@ -4870,25 +4874,25 @@ a:focus {
|
||||||
.control-sidebar-open .main-footer {
|
.control-sidebar-open .main-footer {
|
||||||
margin-right: 230px; } }
|
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; }
|
border-left-width: 0; }
|
||||||
|
|
||||||
.nav-tabs.control-sidebar-tabs > li > a {
|
.nav-tabs.control-sidebar-tabs > .nav-item > .nav-link {
|
||||||
border-radius: 0; }
|
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-top: none;
|
||||||
border-right: none;
|
border-right: none;
|
||||||
border-left: 1px solid transparent;
|
border-left: 1px solid transparent;
|
||||||
border-bottom: 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; }
|
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-top: none;
|
||||||
border-right: none;
|
border-right: none;
|
||||||
border-bottom: none; }
|
border-bottom: none; }
|
||||||
|
|
||||||
@media (max-width: 34em) {
|
@media (max-width: 48em) {
|
||||||
.nav-tabs.control-sidebar-tabs {
|
.nav-tabs.control-sidebar-tabs {
|
||||||
display: table; }
|
display: table; }
|
||||||
.nav-tabs.control-sidebar-tabs > li {
|
.nav-tabs.control-sidebar-tabs > li {
|
||||||
|
|
|
@ -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
|
|
@ -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);
|
|
@ -5,15 +5,15 @@
|
||||||
* options and implements exclusive AdminLTE plugins.
|
* options and implements exclusive AdminLTE plugins.
|
||||||
*
|
*
|
||||||
* @Author Almsaeed Studio
|
* @Author Almsaeed Studio
|
||||||
* @Support <http://www.almsaeedstudio.com>
|
* @Support <http:// www.almsaeedstudio.com>
|
||||||
* @Email <support@almsaeedstudio.com>
|
* @Email <support@almsaeedstudio.com>
|
||||||
* @version 2.3.2
|
* @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
|
// Make sure jQuery has been loaded before app.js
|
||||||
if (typeof jQuery === "undefined") {
|
if (typeof jQuery === 'undefined') {
|
||||||
throw new Error("AdminLTE requires jQuery");
|
throw new Error('AdminLTE requires jQuery');
|
||||||
}
|
}
|
||||||
|
|
||||||
/* AdminLTE
|
/* AdminLTE
|
||||||
|
@ -33,95 +33,96 @@ $.AdminLTE = {};
|
||||||
* Modify these options to suit your implementation
|
* Modify these options to suit your implementation
|
||||||
*/
|
*/
|
||||||
$.AdminLTE.options = {
|
$.AdminLTE.options = {
|
||||||
//Add slimscroll to navbar menus
|
// Add slimscroll to navbar menus
|
||||||
//This requires you to load the slimscroll plugin
|
// This requires you to load the slimscroll plugin
|
||||||
//in every page before app.js
|
// in every page before app.js
|
||||||
navbarMenuSlimscroll: true,
|
navbarMenuSlimscroll: true,
|
||||||
navbarMenuSlimscrollWidth: "3px", //The width of the scroll bar
|
navbarMenuSlimscrollWidth: '3px', // The width of the scroll bar
|
||||||
navbarMenuHeight: "200px", //The height of the inner menu
|
navbarMenuHeight: '200px', // The height of the inner menu
|
||||||
//General animation speed for JS animated elements such as box collapse/expand and
|
// 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,
|
// sidebar treeview slide up/down. This options accepts an integer as milliseconds,
|
||||||
//'fast', 'normal', or 'slow'
|
// 'fast', 'normal', or 'slow'
|
||||||
animationSpeed: 500,
|
animationSpeed: 500,
|
||||||
//Sidebar push menu toggle button selector
|
// Sidebar push menu toggle button selector
|
||||||
sidebarToggleSelector: "[data-toggle='offcanvas']",
|
sidebarToggleSelector: '[data-toggle="offcanvas"]',
|
||||||
//Activate sidebar push menu
|
// Activate sidebar push menu
|
||||||
sidebarPushMenu: true,
|
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,
|
sidebarSlimScroll: true,
|
||||||
//Enable sidebar expand on hover effect for sidebar mini
|
// Enable sidebar expand on hover effect for sidebar mini
|
||||||
//This option is forced to true if both the fixed layout and sidebar mini
|
// This option is forced to true if both the fixed layout and sidebar mini
|
||||||
//are used together
|
// are used together
|
||||||
|
// are used together
|
||||||
sidebarExpandOnHover: false,
|
sidebarExpandOnHover: false,
|
||||||
//BoxRefresh Plugin
|
// BoxRefresh Plugin
|
||||||
enableBoxRefresh: true,
|
enableBoxRefresh: true,
|
||||||
//Bootstrap.js tooltip
|
// Bootstrap.js tooltip
|
||||||
enableBSToppltip: true,
|
enableBSToppltip: true,
|
||||||
BSTooltipSelector: "[data-toggle='tooltip']",
|
BSTooltipSelector: '[data-toggle="tooltip"]',
|
||||||
//Enable Fast Click. Fastclick.js creates a more
|
// Enable Fast Click. Fastclick.js creates a more
|
||||||
//native touch experience with touch devices. If you
|
// native touch experience with touch devices. If you
|
||||||
//choose to enable the plugin, make sure you load the script
|
// choose to enable the plugin, make sure you load the script
|
||||||
//before AdminLTE's app.js
|
// before AdminLTE's app.js
|
||||||
enableFastclick: true,
|
enableFastclick: true,
|
||||||
//Control Sidebar Options
|
// Control Sidebar Options
|
||||||
enableControlSidebar: true,
|
enableControlSidebar: true,
|
||||||
controlSidebarOptions: {
|
controlSidebarOptions: {
|
||||||
//Which button should trigger the open/close event
|
// Which button should trigger the open/close event
|
||||||
toggleBtnSelector: "[data-toggle='control-sidebar']",
|
toggleBtnSelector: '[data-toggle="control-sidebar"]',
|
||||||
//The sidebar selector
|
// The sidebar selector
|
||||||
selector: ".control-sidebar",
|
selector: '.control-sidebar',
|
||||||
//Enable slide over content
|
// Enable slide over content
|
||||||
slide: true
|
slide: true
|
||||||
},
|
},
|
||||||
//Box Widget Plugin. Enable this plugin
|
// Box Widget Plugin. Enable this plugin
|
||||||
//to allow boxes to be collapsed and/or removed
|
// to allow boxes to be collapsed and/or removed
|
||||||
enableBoxWidget: true,
|
enableBoxWidget: true,
|
||||||
//Box Widget plugin options
|
// Box Widget plugin options
|
||||||
boxWidgetOptions: {
|
boxWidgetOptions: {
|
||||||
boxWidgetIcons: {
|
boxWidgetIcons: {
|
||||||
//Collapse icon
|
// Collapse icon
|
||||||
collapse: 'fa-minus',
|
collapse: 'fa-minus',
|
||||||
//Open icon
|
// Open icon
|
||||||
open: 'fa-plus',
|
open: 'fa-plus',
|
||||||
//Remove icon
|
// Remove icon
|
||||||
remove: 'fa-times'
|
remove: 'fa-times'
|
||||||
},
|
},
|
||||||
boxWidgetSelectors: {
|
boxWidgetSelectors: {
|
||||||
//Remove button selector
|
// Remove button selector
|
||||||
remove: '[data-widget="remove"]',
|
remove: '[data-widget="remove"]',
|
||||||
//Collapse button selector
|
// Collapse button selector
|
||||||
collapse: '[data-widget="collapse"]'
|
collapse: '[data-widget="collapse"]'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//Direct Chat plugin options
|
// Direct Chat plugin options
|
||||||
directChat: {
|
directChat: {
|
||||||
//Enable direct chat by default
|
// Enable direct chat by default
|
||||||
enable: true,
|
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"]'
|
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: {
|
colors: {
|
||||||
lightBlue: "#3c8dbc",
|
lightBlue: '#3c8dbc',
|
||||||
red: "#f56954",
|
red: '#f56954',
|
||||||
green: "#00a65a",
|
green: '#00a65a',
|
||||||
aqua: "#00c0ef",
|
aqua: '#00c0ef',
|
||||||
yellow: "#f39c12",
|
yellow: '#f39c12',
|
||||||
blue: "#0073b7",
|
blue: '#0073b7',
|
||||||
navy: "#001F3F",
|
navy: '#001F3F',
|
||||||
teal: "#39CCCC",
|
teal: '#39CCCC',
|
||||||
olive: "#3D9970",
|
olive: '#3D9970',
|
||||||
lime: "#01FF70",
|
lime: '#01FF70',
|
||||||
orange: "#FF851B",
|
orange: '#FF851B',
|
||||||
fuchsia: "#F012BE",
|
fuchsia: '#F012BE',
|
||||||
purple: "#8E24AA",
|
purple: '#8E24AA',
|
||||||
maroon: "#D81B60",
|
maroon: '#D81B60',
|
||||||
black: "#222222",
|
black: '#222222',
|
||||||
gray: "#d2d6de"
|
gray: '#d2d6de'
|
||||||
},
|
},
|
||||||
//The standard screen sizes that bootstrap uses.
|
// The standard screen sizes that bootstrap uses.
|
||||||
//If you change these in the variables.less file, change
|
// If you change these in the variables.less file, change
|
||||||
//them here too.
|
// them here too.
|
||||||
screenSizes: {
|
screenSizes: {
|
||||||
xs: 480,
|
xs: 480,
|
||||||
sm: 768,
|
sm: 768,
|
||||||
|
@ -138,67 +139,67 @@ $.AdminLTE.options = {
|
||||||
* options above.
|
* options above.
|
||||||
*/
|
*/
|
||||||
$(function () {
|
$(function () {
|
||||||
"use strict";
|
'use strict';
|
||||||
|
|
||||||
//Fix for IE page transitions
|
// Fix for IE page transitions
|
||||||
$("body").removeClass("hold-transition");
|
$('body').removeClass('hold-transition');
|
||||||
|
|
||||||
//Extend options if external options exist
|
// Extend options if external options exist
|
||||||
if (typeof AdminLTEOptions !== "undefined") {
|
if (typeof AdminLTEOptions !== 'undefined') {
|
||||||
$.extend(true,
|
$.extend(true,
|
||||||
$.AdminLTE.options,
|
$.AdminLTE.options,
|
||||||
AdminLTEOptions);
|
AdminLTEOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Easy access to options
|
// Easy access to options
|
||||||
var o = $.AdminLTE.options;
|
var o = $.AdminLTE.options;
|
||||||
|
|
||||||
//Set up the object
|
// Set up the object
|
||||||
_init();
|
_init();
|
||||||
|
|
||||||
//Activate the layout maker
|
// Activate the layout maker
|
||||||
$.AdminLTE.layout.activate();
|
$.AdminLTE.layout.activate();
|
||||||
|
|
||||||
//Enable sidebar tree view controls
|
// Enable sidebar tree view controls
|
||||||
$.AdminLTE.tree('.sidebar');
|
$.AdminLTE.tree('.sidebar');
|
||||||
|
|
||||||
//Enable control sidebar
|
// Enable control sidebar
|
||||||
if (o.enableControlSidebar) {
|
if (o.enableControlSidebar) {
|
||||||
$.AdminLTE.controlSidebar.activate();
|
$.AdminLTE.controlSidebar.activate();
|
||||||
}
|
}
|
||||||
|
|
||||||
//Add slimscroll to navbar dropdown
|
// Add slimscroll to navbar dropdown
|
||||||
if (o.navbarMenuSlimscroll && typeof $.fn.slimscroll != 'undefined') {
|
if (o.navbarMenuSlimscroll && typeof $.fn.slimscroll != 'undefined') {
|
||||||
$(".navbar .menu").slimscroll({
|
$('.navbar .menu').slimscroll({
|
||||||
height: o.navbarMenuHeight,
|
height: o.navbarMenuHeight,
|
||||||
alwaysVisible: false,
|
alwaysVisible: false,
|
||||||
size: o.navbarMenuSlimscrollWidth
|
size: o.navbarMenuSlimscrollWidth
|
||||||
}).css("width", "100%");
|
}).css('width', '100%');
|
||||||
}
|
}
|
||||||
|
|
||||||
//Activate sidebar push menu
|
// Activate sidebar push menu
|
||||||
if (o.sidebarPushMenu) {
|
if (o.sidebarPushMenu) {
|
||||||
$.AdminLTE.pushMenu.activate(o.sidebarToggleSelector);
|
$.AdminLTE.pushMenu.activate(o.sidebarToggleSelector);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Activate Bootstrap tooltip
|
// Activate Bootstrap tooltip
|
||||||
if (o.enableBSToppltip) {
|
if (o.enableBSToppltip) {
|
||||||
$('body').tooltip({
|
$('body').tooltip({
|
||||||
selector: o.BSTooltipSelector
|
selector: o.BSTooltipSelector
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//Activate box widget
|
// Activate box widget
|
||||||
if (o.enableBoxWidget) {
|
if (o.enableBoxWidget) {
|
||||||
$.AdminLTE.boxWidget.activate();
|
$.AdminLTE.boxWidget.activate();
|
||||||
}
|
}
|
||||||
|
|
||||||
//Activate fast click
|
// Activate fast click
|
||||||
if (o.enableFastclick && typeof FastClick != 'undefined') {
|
if (o.enableFastclick && typeof FastClick != 'undefined') {
|
||||||
FastClick.attach(document.body);
|
FastClick.attach(document.body);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Activate direct chat widget
|
// Activate direct chat widget
|
||||||
if (o.directChat.enable) {
|
if (o.directChat.enable) {
|
||||||
$(document).on('click', o.directChat.contactToggleSelector, function () {
|
$(document).on('click', o.directChat.contactToggleSelector, function () {
|
||||||
var box = $(this).parents('.direct-chat').first();
|
var box = $(this).parents('.direct-chat').first();
|
||||||
|
@ -212,9 +213,9 @@ $(function () {
|
||||||
*/
|
*/
|
||||||
$('.btn-group[data-toggle="btn-toggle"]').each(function () {
|
$('.btn-group[data-toggle="btn-toggle"]').each(function () {
|
||||||
var group = $(this);
|
var group = $(this);
|
||||||
$(this).find(".btn").on('click', function (e) {
|
$(this).find('.btn').on('click', function (e) {
|
||||||
group.find(".btn.active").removeClass("active");
|
group.find('.btn.active').removeClass('active');
|
||||||
$(this).addClass("active");
|
$(this).addClass('active');
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -242,59 +243,59 @@ function _init() {
|
||||||
var _this = this;
|
var _this = this;
|
||||||
_this.fix();
|
_this.fix();
|
||||||
_this.fixSidebar();
|
_this.fixSidebar();
|
||||||
$(window, ".wrapper").resize(function () {
|
$(window, '.wrapper').resize(function () {
|
||||||
_this.fix();
|
_this.fix();
|
||||||
_this.fixSidebar();
|
_this.fixSidebar();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
fix: function () {
|
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 neg = $('.main-header').outerHeight() + $('.main-footer').outerHeight();
|
||||||
var window_height = $(window).height();
|
var window_height = $(window).height();
|
||||||
var sidebar_height = $(".sidebar").height();
|
var sidebar_height = $('.sidebar').height();
|
||||||
//Set the min-height of the content and sidebar based on the
|
// Set the min-height of the content and sidebar based on the
|
||||||
//the height of the document.
|
// the height of the document.
|
||||||
if ($("body").hasClass("fixed")) {
|
if ($('body').hasClass('fixed')) {
|
||||||
$(".content-wrapper, .right-side").css('min-height', window_height - $('.main-footer').outerHeight());
|
$('.content-wrapper, .right-side').css('min-height', window_height - $('.main-footer').outerHeight());
|
||||||
} else {
|
} else {
|
||||||
var postSetWidth;
|
var postSetWidth;
|
||||||
if (window_height >= sidebar_height) {
|
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;
|
postSetWidth = window_height - neg;
|
||||||
} else {
|
} else {
|
||||||
$(".content-wrapper, .right-side").css('min-height', sidebar_height);
|
$('.content-wrapper, .right-side').css('min-height', sidebar_height);
|
||||||
postSetWidth = sidebar_height;
|
postSetWidth = sidebar_height;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Fix for the control sidebar height
|
// Fix for the control sidebar height
|
||||||
var controlSidebar = $($.AdminLTE.options.controlSidebarOptions.selector);
|
var controlSidebar = $($.AdminLTE.options.controlSidebarOptions.selector);
|
||||||
if (typeof controlSidebar !== "undefined") {
|
if (typeof controlSidebar !== 'undefined') {
|
||||||
if (controlSidebar.height() > postSetWidth)
|
if (controlSidebar.height() > postSetWidth)
|
||||||
$(".content-wrapper, .right-side").css('min-height', controlSidebar.height());
|
$('.content-wrapper, .right-side').css('min-height', controlSidebar.height());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
fixSidebar: function () {
|
fixSidebar: function () {
|
||||||
//Make sure the body tag has the .fixed class
|
// Make sure the body tag has the .fixed class
|
||||||
if (!$("body").hasClass("fixed")) {
|
if (!$('body').hasClass('fixed')) {
|
||||||
if (typeof $.fn.slimScroll != 'undefined') {
|
if (typeof $.fn.slimScroll != 'undefined') {
|
||||||
$(".sidebar").slimScroll({destroy: true}).height("auto");
|
$('.sidebar').slimScroll({destroy: true}).height('auto');
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
} else if (typeof $.fn.slimScroll == 'undefined' && window.console) {
|
} 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 ($.AdminLTE.options.sidebarSlimScroll) {
|
||||||
if (typeof $.fn.slimScroll != 'undefined') {
|
if (typeof $.fn.slimScroll != 'undefined') {
|
||||||
//Destroy if it exists
|
// Destroy if it exists
|
||||||
$(".sidebar").slimScroll({destroy: true}).height("auto");
|
$('.sidebar').slimScroll({destroy: true}).height('auto');
|
||||||
//Add slimscroll
|
// Add slimscroll
|
||||||
$(".sidebar").slimscroll({
|
$('.sidebar').slimscroll({
|
||||||
height: ($(window).height() - $(".main-header").height()) + "px",
|
height: ($(window).height() - $('.main-header').height()) + 'px',
|
||||||
color: "rgba(0,0,0,0.2)",
|
color: 'rgba(0,0,0,0.2)',
|
||||||
size: "3px"
|
size: '3px'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -306,43 +307,43 @@ function _init() {
|
||||||
* Adds the push menu functionality to the sidebar.
|
* Adds the push menu functionality to the sidebar.
|
||||||
*
|
*
|
||||||
* @type Function
|
* @type Function
|
||||||
* @usage: $.AdminLTE.pushMenu("[data-toggle='offcanvas']")
|
* @usage: $.AdminLTE.pushMenu('[data-toggle="offcanvas']')
|
||||||
*/
|
*/
|
||||||
$.AdminLTE.pushMenu = {
|
$.AdminLTE.pushMenu = {
|
||||||
activate: function (toggleBtn) {
|
activate: function (toggleBtn) {
|
||||||
//Get the screen sizes
|
// Get the screen sizes
|
||||||
var screenSizes = $.AdminLTE.options.screenSizes;
|
var screenSizes = $.AdminLTE.options.screenSizes;
|
||||||
|
|
||||||
//Enable sidebar toggle
|
// Enable sidebar toggle
|
||||||
$(document).on('click', toggleBtn, function (e) {
|
$(document).on('click', toggleBtn, function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
//Enable sidebar push menu
|
// Enable sidebar push menu
|
||||||
if ($(window).width() > (screenSizes.sm - 1)) {
|
if ($(window).width() > (screenSizes.sm - 1)) {
|
||||||
if ($("body").hasClass('sidebar-collapse')) {
|
if ($('body').hasClass('sidebar-collapse')) {
|
||||||
$("body").removeClass('sidebar-collapse').trigger('expanded.pushMenu');
|
$('body').removeClass('sidebar-collapse').trigger('expanded.pushMenu');
|
||||||
} else {
|
} 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 {
|
else {
|
||||||
if ($("body").hasClass('sidebar-open')) {
|
if ($('body').hasClass('sidebar-open')) {
|
||||||
$("body").removeClass('sidebar-open').removeClass('sidebar-collapse').trigger('collapsed.pushMenu');
|
$('body').removeClass('sidebar-open').removeClass('sidebar-collapse').trigger('collapsed.pushMenu');
|
||||||
} else {
|
} else {
|
||||||
$("body").addClass('sidebar-open').trigger('expanded.pushMenu');
|
$('body').addClass('sidebar-open').trigger('expanded.pushMenu');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$(".content-wrapper").click(function () {
|
$('.content-wrapper').click(function () {
|
||||||
//Enable hide menu when clicking on the content-wrapper on small screens
|
// Enable hide menu when clicking on the content-wrapper on small screens
|
||||||
if ($(window).width() <= (screenSizes.sm - 1) && $("body").hasClass("sidebar-open")) {
|
if ($(window).width() <= (screenSizes.sm - 1) && $('body').hasClass('sidebar-open')) {
|
||||||
$("body").removeClass('sidebar-open');
|
$('body').removeClass('sidebar-open');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
//Enable expand on hover for sidebar mini
|
// Enable expand on hover for sidebar mini
|
||||||
if ($.AdminLTE.options.sidebarExpandOnHover
|
if ($.AdminLTE.options.sidebarExpandOnHover
|
||||||
|| ($('body').hasClass('fixed')
|
|| ($('body').hasClass('fixed')
|
||||||
&& $('body').hasClass('sidebar-mini'))) {
|
&& $('body').hasClass('sidebar-mini'))) {
|
||||||
|
@ -352,10 +353,10 @@ function _init() {
|
||||||
expandOnHover: function () {
|
expandOnHover: function () {
|
||||||
var _this = this;
|
var _this = this;
|
||||||
var screenWidth = $.AdminLTE.options.screenSizes.sm - 1;
|
var screenWidth = $.AdminLTE.options.screenSizes.sm - 1;
|
||||||
//Expand sidebar on hover
|
// Expand sidebar on hover
|
||||||
$('.main-sidebar').hover(function () {
|
$('.main-sidebar').hover(function () {
|
||||||
if ($('body').hasClass('sidebar-mini')
|
if ($('body').hasClass('sidebar-mini')
|
||||||
&& $("body").hasClass('sidebar-collapse')
|
&& $('body').hasClass('sidebar-collapse')
|
||||||
&& $(window).width() > screenWidth) {
|
&& $(window).width() > screenWidth) {
|
||||||
_this.expand();
|
_this.expand();
|
||||||
}
|
}
|
||||||
|
@ -368,7 +369,7 @@ function _init() {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
expand: function () {
|
expand: function () {
|
||||||
$("body").removeClass('sidebar-collapse').addClass('sidebar-expanded-on-hover');
|
$('body').removeClass('sidebar-collapse').addClass('sidebar-expanded-on-hover');
|
||||||
},
|
},
|
||||||
collapse: function () {
|
collapse: function () {
|
||||||
if ($('body').hasClass('sidebar-expanded-on-hover')) {
|
if ($('body').hasClass('sidebar-expanded-on-hover')) {
|
||||||
|
@ -389,42 +390,42 @@ function _init() {
|
||||||
var _this = this;
|
var _this = this;
|
||||||
var animationSpeed = $.AdminLTE.options.animationSpeed;
|
var animationSpeed = $.AdminLTE.options.animationSpeed;
|
||||||
$(menu).on('click', 'li a', function (e) {
|
$(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 $this = $(this);
|
||||||
var checkElement = $this.next();
|
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'))) {
|
if ((checkElement.is('.treeview-menu')) && (checkElement.is(':visible')) && (!$('body').hasClass('sidebar-collapse'))) {
|
||||||
//Close the menu
|
// Close the menu
|
||||||
checkElement.slideUp(animationSpeed, function () {
|
checkElement.slideUp(animationSpeed, function () {
|
||||||
checkElement.removeClass('menu-open');
|
checkElement.removeClass('menu-open');
|
||||||
//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();
|
// _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'))) {
|
else if ((checkElement.is('.treeview-menu')) && (!checkElement.is(':visible'))) {
|
||||||
//Get the parent menu
|
// Get the parent menu
|
||||||
var parent = $this.parents('ul').first();
|
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);
|
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');
|
ul.removeClass('menu-open');
|
||||||
//Get the parent li
|
// Get the parent li
|
||||||
var parent_li = $this.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 () {
|
checkElement.slideDown(animationSpeed, function () {
|
||||||
//Add the class active to the parent li
|
// Add the class active to the parent li
|
||||||
checkElement.addClass('menu-open');
|
checkElement.addClass('menu-open');
|
||||||
parent.find('li.active').removeClass('active');
|
parent.find('li.active').removeClass('active');
|
||||||
parent_li.addClass('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();
|
_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')) {
|
if (checkElement.is('.treeview-menu')) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
}
|
}
|
||||||
|
@ -439,56 +440,56 @@ function _init() {
|
||||||
* @usage $.AdminLTE.controlSidebar.activate(options)
|
* @usage $.AdminLTE.controlSidebar.activate(options)
|
||||||
*/
|
*/
|
||||||
$.AdminLTE.controlSidebar = {
|
$.AdminLTE.controlSidebar = {
|
||||||
//instantiate the object
|
// instantiate the object
|
||||||
activate: function () {
|
activate: function () {
|
||||||
//Get the object
|
// Get the object
|
||||||
var _this = this;
|
var _this = this;
|
||||||
//Update options
|
// Update options
|
||||||
var o = $.AdminLTE.options.controlSidebarOptions;
|
var o = $.AdminLTE.options.controlSidebarOptions;
|
||||||
//Get the sidebar
|
// Get the sidebar
|
||||||
var sidebar = $(o.selector);
|
var sidebar = $(o.selector);
|
||||||
//The toggle button
|
// The toggle button
|
||||||
var btn = $(o.toggleBtnSelector);
|
var btn = $(o.toggleBtnSelector);
|
||||||
|
|
||||||
//Listen to the click event
|
// Listen to the click event
|
||||||
btn.on('click', function (e) {
|
btn.on('click', function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
//If the sidebar is not open
|
// If the sidebar is not open
|
||||||
if (!sidebar.hasClass('control-sidebar-open')
|
if (!sidebar.hasClass('control-sidebar-open')
|
||||||
&& !$('body').hasClass('control-sidebar-open')) {
|
&& !$('body').hasClass('control-sidebar-open')) {
|
||||||
//Open the sidebar
|
// Open the sidebar
|
||||||
_this.open(sidebar, o.slide);
|
_this.open(sidebar, o.slide);
|
||||||
} else {
|
} else {
|
||||||
_this.close(sidebar, o.slide);
|
_this.close(sidebar, o.slide);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
//If the body has a boxed layout, fix the sidebar bg position
|
// If the body has a boxed layout, fix the sidebar bg position
|
||||||
var bg = $(".control-sidebar-bg");
|
var bg = $('.control-sidebar-bg');
|
||||||
_this._fix(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')) {
|
if ($('body').hasClass('fixed')) {
|
||||||
_this._fixForFixed(sidebar);
|
_this._fixForFixed(sidebar);
|
||||||
} else {
|
} 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()) {
|
if ($('.content-wrapper, .right-side').height() < sidebar.height()) {
|
||||||
_this._fixForContent(sidebar);
|
_this._fixForContent(sidebar);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//Open the control sidebar
|
// Open the control sidebar
|
||||||
open: function (sidebar, slide) {
|
open: function (sidebar, slide) {
|
||||||
//Slide over content
|
// Slide over content
|
||||||
if (slide) {
|
if (slide) {
|
||||||
sidebar.addClass('control-sidebar-open');
|
sidebar.addClass('control-sidebar-open');
|
||||||
} else {
|
} else {
|
||||||
//Push the content by adding the open class to the body instead
|
// Push the content by adding the open class to the body instead
|
||||||
//of the sidebar itself
|
// of the sidebar itself
|
||||||
$('body').addClass('control-sidebar-open');
|
$('body').addClass('control-sidebar-open');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//Close the control sidebar
|
// Close the control sidebar
|
||||||
close: function (sidebar, slide) {
|
close: function (sidebar, slide) {
|
||||||
if (slide) {
|
if (slide) {
|
||||||
sidebar.removeClass('control-sidebar-open');
|
sidebar.removeClass('control-sidebar-open');
|
||||||
|
@ -498,9 +499,9 @@ function _init() {
|
||||||
},
|
},
|
||||||
_fix: function (sidebar) {
|
_fix: function (sidebar) {
|
||||||
var _this = this;
|
var _this = this;
|
||||||
if ($("body").hasClass('layout-boxed')) {
|
if ($('body').hasClass('layout-boxed')) {
|
||||||
sidebar.css('position', 'absolute');
|
sidebar.css('position', 'absolute');
|
||||||
sidebar.height($(".wrapper").height());
|
sidebar.height($('.wrapper').height());
|
||||||
$(window).resize(function () {
|
$(window).resize(function () {
|
||||||
_this._fix(sidebar);
|
_this._fix(sidebar);
|
||||||
});
|
});
|
||||||
|
@ -520,7 +521,7 @@ function _init() {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
_fixForContent: function (sidebar) {
|
_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) {
|
activate: function (_box) {
|
||||||
var _this = this;
|
var _this = this;
|
||||||
if (!_box) {
|
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) {
|
$(_box).on('click', _this.selectors.collapse, function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
_this.collapse($(this));
|
_this.collapse($(this));
|
||||||
});
|
});
|
||||||
|
|
||||||
//Listen for remove event triggers
|
// Listen for remove event triggers
|
||||||
$(_box).on('click', _this.selectors.remove, function (e) {
|
$(_box).on('click', _this.selectors.remove, function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
_this.remove($(this));
|
_this.remove($(this));
|
||||||
|
@ -556,33 +557,33 @@ function _init() {
|
||||||
},
|
},
|
||||||
collapse: function (element) {
|
collapse: function (element) {
|
||||||
var _this = this;
|
var _this = this;
|
||||||
//Find the box parent
|
// Find the box parent
|
||||||
var box = element.parents(".box").first();
|
var box = element.parents('.box').first();
|
||||||
//Find the body and the footer
|
// Find the body and the footer
|
||||||
var box_content = box.find("> .box-body, > .box-footer, > form >.box-body, > form > .box-footer");
|
var box_content = box.find('> .box-body, > .box-footer, > form >.box-body, > form > .box-footer');
|
||||||
if (!box.hasClass("collapsed-box")) {
|
if (!box.hasClass('collapsed-box')) {
|
||||||
//Convert minus into plus
|
// Convert minus into plus
|
||||||
element.children(":first")
|
element.children(':first')
|
||||||
.removeClass(_this.icons.collapse)
|
.removeClass(_this.icons.collapse)
|
||||||
.addClass(_this.icons.open);
|
.addClass(_this.icons.open);
|
||||||
//Hide the content
|
// Hide the content
|
||||||
box_content.slideUp(_this.animationSpeed, function () {
|
box_content.slideUp(_this.animationSpeed, function () {
|
||||||
box.addClass("collapsed-box");
|
box.addClass('collapsed-box');
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
//Convert plus into minus
|
// Convert plus into minus
|
||||||
element.children(":first")
|
element.children(':first')
|
||||||
.removeClass(_this.icons.open)
|
.removeClass(_this.icons.open)
|
||||||
.addClass(_this.icons.collapse);
|
.addClass(_this.icons.collapse);
|
||||||
//Show the content
|
// Show the content
|
||||||
box_content.slideDown(_this.animationSpeed, function () {
|
box_content.slideDown(_this.animationSpeed, function () {
|
||||||
box.removeClass("collapsed-box");
|
box.removeClass('collapsed-box');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
remove: function (element) {
|
remove: function (element) {
|
||||||
//Find the box parent
|
// Find the box parent
|
||||||
var box = element.parents(".box").first();
|
var box = element.parents('.box').first();
|
||||||
box.slideUp(this.animationSpeed);
|
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.
|
* a refresh button to the box. It converts the box's state to a loading state.
|
||||||
*
|
*
|
||||||
* @type plugin
|
* @type plugin
|
||||||
* @usage $("#box-widget").boxRefresh( options );
|
* @usage $('#box-widget').boxRefresh( options );
|
||||||
*/
|
*/
|
||||||
(function ($) {
|
(function ($) {
|
||||||
|
|
||||||
"use strict";
|
'use strict';
|
||||||
|
|
||||||
$.fn.boxRefresh = function (options) {
|
$.fn.boxRefresh = function (options) {
|
||||||
|
|
||||||
// Render options
|
// Render options
|
||||||
var settings = $.extend({
|
var settings = $.extend({
|
||||||
//Refresh button selector
|
// Refresh button selector
|
||||||
trigger: ".refresh-btn",
|
trigger: '.refresh-btn',
|
||||||
//File source to be loaded (e.g: ajax/src.php)
|
// File source to be loaded (e.g: ajax/src.php)
|
||||||
source: "",
|
source: '',
|
||||||
//Callbacks
|
// Callbacks
|
||||||
onLoadStart: function (box) {
|
onLoadStart: function (box) {
|
||||||
return box;
|
return box;
|
||||||
}, //Right after the button has been clicked
|
}, // Right after the button has been clicked
|
||||||
onLoadDone: function (box) {
|
onLoadDone: function (box) {
|
||||||
return box;
|
return box;
|
||||||
} //When the source has been loaded
|
} // When the source has been loaded
|
||||||
|
|
||||||
}, options);
|
}, options);
|
||||||
|
|
||||||
//The overlay
|
// The overlay
|
||||||
var overlay = $('<div class="overlay"><div class="fa fa-refresh fa-spin"></div></div>');
|
var overlay = $('<div class="overlay"><div class="fa fa-refresh fa-spin"></div></div>');
|
||||||
|
|
||||||
return this.each(function () {
|
return this.each(function () {
|
||||||
//if a source is specified
|
// if a source is specified
|
||||||
if (settings.source === "") {
|
if (settings.source === '') {
|
||||||
if (window.console) {
|
if (window.console) {
|
||||||
window.console.log("Please specify a source first - boxRefresh()");
|
window.console.log('Please specify a source first - boxRefresh()');
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//the box
|
// the box
|
||||||
var box = $(this);
|
var box = $(this);
|
||||||
//the button
|
// the button
|
||||||
var rBtn = box.find(settings.trigger).first();
|
var rBtn = box.find(settings.trigger).first();
|
||||||
|
|
||||||
//On trigger click
|
// On trigger click
|
||||||
rBtn.on('click', function (e) {
|
rBtn.on('click', function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
//Add loading overlay
|
// Add loading overlay
|
||||||
start(box);
|
start(box);
|
||||||
|
|
||||||
//Perform ajax call
|
// Perform ajax call
|
||||||
box.find(".box-body").load(settings.source, function () {
|
box.find('.box-body').load(settings.source, function () {
|
||||||
done(box);
|
done(box);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
function start(box) {
|
function start(box) {
|
||||||
//Add overlay and loading img
|
// Add overlay and loading img
|
||||||
box.append(overlay);
|
box.append(overlay);
|
||||||
|
|
||||||
settings.onLoadStart.call(box);
|
settings.onLoadStart.call(box);
|
||||||
}
|
}
|
||||||
|
|
||||||
function done(box) {
|
function done(box) {
|
||||||
//Remove overlay and loading img
|
// Remove overlay and loading img
|
||||||
box.find(overlay).remove();
|
box.find(overlay).remove();
|
||||||
|
|
||||||
settings.onLoadDone.call(box);
|
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.
|
* a box inserted in the DOM after the app.js was loaded, toggle and remove box.
|
||||||
*
|
*
|
||||||
* @type plugin
|
* @type plugin
|
||||||
* @usage $("#box-widget").activateBox();
|
* @usage $('#box-widget').activateBox();
|
||||||
* @usage $("#box-widget").toggleBox();
|
* @usage $('#box-widget').toggleBox();
|
||||||
* @usage $("#box-widget").removeBox();
|
* @usage $('#box-widget').removeBox();
|
||||||
*/
|
*/
|
||||||
(function ($) {
|
(function ($) {
|
||||||
|
|
||||||
|
@ -691,12 +692,12 @@ function _init() {
|
||||||
$.AdminLTE.boxWidget.activate(this);
|
$.AdminLTE.boxWidget.activate(this);
|
||||||
};
|
};
|
||||||
|
|
||||||
$.fn.toggleBox = function(){
|
$.fn.toggleBox = function() {
|
||||||
var button = $($.AdminLTE.boxWidget.selectors.collapse, this);
|
var button = $($.AdminLTE.boxWidget.selectors.collapse, this);
|
||||||
$.AdminLTE.boxWidget.collapse(button);
|
$.AdminLTE.boxWidget.collapse(button);
|
||||||
};
|
};
|
||||||
|
|
||||||
$.fn.removeBox = function(){
|
$.fn.removeBox = function() {
|
||||||
var button = $($.AdminLTE.boxWidget.selectors.remove, this);
|
var button = $($.AdminLTE.boxWidget.selectors.remove, this);
|
||||||
$.AdminLTE.boxWidget.remove(button);
|
$.AdminLTE.boxWidget.remove(button);
|
||||||
};
|
};
|
||||||
|
@ -709,20 +710,20 @@ function _init() {
|
||||||
* This plugin depends on iCheck plugin for checkbox and radio inputs
|
* This plugin depends on iCheck plugin for checkbox and radio inputs
|
||||||
*
|
*
|
||||||
* @type plugin
|
* @type plugin
|
||||||
* @usage $("#todo-widget").todolist( options );
|
* @usage $('#todo-widget').todolist( options );
|
||||||
*/
|
*/
|
||||||
(function ($) {
|
(function ($) {
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
$.fn.todolist = function (options) {
|
$.fn.todolist = function (options) {
|
||||||
// Render options
|
// Render options
|
||||||
var settings = $.extend({
|
var settings = $.extend({
|
||||||
//When the user checks the input
|
// When the user checks the input
|
||||||
onCheck: function (ele) {
|
onCheck: function (ele) {
|
||||||
return ele;
|
return ele;
|
||||||
},
|
},
|
||||||
//When the user unchecks the input
|
// When the user unchecks the input
|
||||||
onUncheck: function (ele) {
|
onUncheck: function (ele) {
|
||||||
return ele;
|
return ele;
|
||||||
}
|
}
|
||||||
|
@ -732,21 +733,21 @@ function _init() {
|
||||||
|
|
||||||
if (typeof $.fn.iCheck != 'undefined') {
|
if (typeof $.fn.iCheck != 'undefined') {
|
||||||
$('input', this).on('ifChecked', function () {
|
$('input', this).on('ifChecked', function () {
|
||||||
var ele = $(this).parents("li").first();
|
var ele = $(this).parents('li').first();
|
||||||
ele.toggleClass("done");
|
ele.toggleClass('done');
|
||||||
settings.onCheck.call(ele);
|
settings.onCheck.call(ele);
|
||||||
});
|
});
|
||||||
|
|
||||||
$('input', this).on('ifUnchecked', function () {
|
$('input', this).on('ifUnchecked', function () {
|
||||||
var ele = $(this).parents("li").first();
|
var ele = $(this).parents('li').first();
|
||||||
ele.toggleClass("done");
|
ele.toggleClass('done');
|
||||||
settings.onUncheck.call(ele);
|
settings.onUncheck.call(ele);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
$('input', this).on('change', function () {
|
$('input', this).on('change', function () {
|
||||||
var ele = $(this).parents("li").first();
|
var ele = $(this).parents('li').first();
|
||||||
ele.toggleClass("done");
|
ele.toggleClass('done');
|
||||||
if ($('input', ele).is(":checked")) {
|
if ($('input', ele).is(':checked')) {
|
||||||
settings.onCheck.call(ele);
|
settings.onCheck.call(ele);
|
||||||
} else {
|
} else {
|
||||||
settings.onUncheck.call(ele);
|
settings.onUncheck.call(ele);
|
||||||
|
@ -755,4 +756,4 @@ function _init() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
}(jQuery));
|
}(jQuery));
|
File diff suppressed because one or more lines are too long
|
@ -31,12 +31,12 @@
|
||||||
//Create the new tab
|
//Create the new tab
|
||||||
var tab_pane = $("<div />", {
|
var tab_pane = $("<div />", {
|
||||||
"id": "control-sidebar-theme-demo-options-tab",
|
"id": "control-sidebar-theme-demo-options-tab",
|
||||||
"class": "tab-pane active"
|
"class": "tab-pane"
|
||||||
});
|
});
|
||||||
|
|
||||||
//Create the tab button
|
//Create the tab button
|
||||||
var tab_button = $("<li />", {"class": "active"})
|
var tab_button = $("<li />", {"class": "nav-item"})
|
||||||
.html("<a href='#control-sidebar-theme-demo-options-tab' data-toggle='tab'>"
|
.html("<a href='#control-sidebar-theme-demo-options-tab' data-toggle='tab' class='nav-link'>"
|
||||||
+ "<i class='fa fa-wrench'></i>"
|
+ "<i class='fa fa-wrench'></i>"
|
||||||
+ "</a>");
|
+ "</a>");
|
||||||
|
|
||||||
|
|
33
package.json
33
package.json
|
@ -1,18 +1,38 @@
|
||||||
{
|
{
|
||||||
"name": "admin-lte",
|
"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": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git://github.com/almasaeed2010/AdminLTE.git"
|
"url": "git://github.com/almasaeed2010/AdminLTE.git"
|
||||||
},
|
},
|
||||||
"license": "MIT",
|
"bugs": {
|
||||||
|
"url": "https://github.com/almasaeed2010/AdminLTE/issues"
|
||||||
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"R2": "^1.4.3",
|
"babel-eslint": "^4.1.4",
|
||||||
"babel-preset-es2015": "^6.0.15",
|
"babel-preset-es2015": "^6.1.4",
|
||||||
"grunt": "~0.4.5",
|
"grunt": "~0.4.5",
|
||||||
"grunt-babel": "^6.0.0",
|
"grunt-babel": "^6.0.0",
|
||||||
"grunt-bootlint": "^0.9.1",
|
"grunt-bootlint": "^0.9.1",
|
||||||
"grunt-contrib-clean": "^0.6.0",
|
"grunt-contrib-clean": "^0.6.0",
|
||||||
|
"grunt-contrib-concat": "^0.5.1",
|
||||||
"grunt-contrib-csslint": "^0.5.0",
|
"grunt-contrib-csslint": "^0.5.0",
|
||||||
"grunt-contrib-cssmin": "^0.12.2",
|
"grunt-contrib-cssmin": "^0.12.2",
|
||||||
"grunt-contrib-jshint": "^0.11.2",
|
"grunt-contrib-jshint": "^0.11.2",
|
||||||
|
@ -20,8 +40,11 @@
|
||||||
"grunt-contrib-uglify": "^0.7.0",
|
"grunt-contrib-uglify": "^0.7.0",
|
||||||
"grunt-contrib-watch": "~0.6.1",
|
"grunt-contrib-watch": "~0.6.1",
|
||||||
"grunt-cssjanus": "^0.2.4",
|
"grunt-cssjanus": "^0.2.4",
|
||||||
|
"grunt-eslint": "^17.3.1",
|
||||||
"grunt-image": "^1.0.5",
|
"grunt-image": "^1.0.5",
|
||||||
"grunt-includes": "^0.4.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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue