mirror of https://github.com/ColorlibHQ/AdminLTE
commit
a26f303c69
|
@ -1,5 +1,4 @@
|
|||
**/*.min.js
|
||||
**/plugins/*
|
||||
**/dist/*
|
||||
**/build/npm
|
||||
ad.js
|
||||
**/plugins/
|
||||
/dist/js/adminlte.js
|
||||
/docs/
|
||||
|
|
300
.eslintrc
300
.eslintrc
|
@ -1,300 +0,0 @@
|
|||
{
|
||||
"root": true,
|
||||
"parser": "babel-eslint",
|
||||
"env": {
|
||||
"browser": true,
|
||||
"es6": true,
|
||||
"amd": true
|
||||
},
|
||||
"extends": "eslint:recommended",
|
||||
"plugins": [
|
||||
"compat"
|
||||
],
|
||||
"globals": {
|
||||
"jQuery": true
|
||||
},
|
||||
"rules": {
|
||||
// Possible Errors
|
||||
"no-await-in-loop": "error",
|
||||
"no-extra-parens": "error",
|
||||
"no-prototype-builtins": "error",
|
||||
"no-template-curly-in-string": "error",
|
||||
"compat/compat": "error",
|
||||
"valid-jsdoc": "error",
|
||||
// Best Practices
|
||||
"accessor-pairs": "error",
|
||||
"array-callback-return": "error",
|
||||
"block-scoped-var": "error",
|
||||
"class-methods-use-this": "off",
|
||||
"complexity": "error",
|
||||
"consistent-return": "error",
|
||||
"curly": "error",
|
||||
"default-case": "error",
|
||||
"dot-location": [
|
||||
"error",
|
||||
"property"
|
||||
],
|
||||
"dot-notation": "error",
|
||||
"eqeqeq": "error",
|
||||
"guard-for-in": "error",
|
||||
"no-alert": "error",
|
||||
"no-caller": "error",
|
||||
"no-div-regex": "error",
|
||||
"no-else-return": "error",
|
||||
"no-empty-function": "error",
|
||||
"no-eq-null": "error",
|
||||
"no-eval": "error",
|
||||
"no-extend-native": "error",
|
||||
"no-extra-bind": "error",
|
||||
"no-extra-label": "error",
|
||||
"no-floating-decimal": "error",
|
||||
"no-implicit-coercion": "error",
|
||||
"no-implicit-globals": "error",
|
||||
"no-implied-eval": "error",
|
||||
"no-invalid-this": "off",
|
||||
"no-iterator": "error",
|
||||
"no-labels": "error",
|
||||
"no-lone-blocks": "error",
|
||||
"no-loop-func": "error",
|
||||
"no-magic-numbers": [
|
||||
"error",
|
||||
{
|
||||
"ignore": [
|
||||
-1,
|
||||
0,
|
||||
1
|
||||
],
|
||||
"ignoreArrayIndexes": true
|
||||
}
|
||||
],
|
||||
"no-multi-spaces": [
|
||||
"error",
|
||||
{
|
||||
"ignoreEOLComments": true,
|
||||
"exceptions": {
|
||||
"AssignmentExpression": true,
|
||||
"ArrowFunctionExpression": true,
|
||||
"CallExpression": true,
|
||||
"VariableDeclarator": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"no-multi-str": "error",
|
||||
"no-new": "error",
|
||||
"no-new-func": "error",
|
||||
"no-new-wrappers": "error",
|
||||
"no-octal-escape": "error",
|
||||
"no-param-reassign": "off",
|
||||
"no-proto": "error",
|
||||
"no-restricted-properties": "error",
|
||||
"no-return-assign": "error",
|
||||
"no-return-await": "error",
|
||||
"no-script-url": "error",
|
||||
"no-self-compare": "error",
|
||||
"no-sequences": "error",
|
||||
"no-throw-literal": "error",
|
||||
"no-unmodified-loop-condition": "error",
|
||||
"no-unused-expressions": "error",
|
||||
"no-useless-call": "error",
|
||||
"no-useless-concat": "error",
|
||||
"no-useless-return": "error",
|
||||
"no-void": "error",
|
||||
"no-warning-comments": "off",
|
||||
"no-with": "error",
|
||||
"prefer-promise-reject-errors": "error",
|
||||
"radix": "error",
|
||||
"require-await": "error",
|
||||
"vars-on-top": "error",
|
||||
"wrap-iife": "error",
|
||||
"yoda": "error",
|
||||
// Strict Mode
|
||||
"strict": "error",
|
||||
// Variables
|
||||
"init-declarations": "off",
|
||||
"no-catch-shadow": "error",
|
||||
"no-label-var": "error",
|
||||
"no-restricted-globals": "error",
|
||||
"no-shadow": "off",
|
||||
"no-shadow-restricted-names": "error",
|
||||
"no-undef-init": "error",
|
||||
"no-undefined": "error",
|
||||
"no-use-before-define": "off",
|
||||
// Node.js and CommonJS
|
||||
"callback-return": "off",
|
||||
"global-require": "error",
|
||||
"handle-callback-err": "error",
|
||||
"no-mixed-requires": "error",
|
||||
"no-new-require": "error",
|
||||
"no-path-concat": "error",
|
||||
"no-process-env": "error",
|
||||
"no-process-exit": "error",
|
||||
"no-restricted-modules": "error",
|
||||
"no-sync": "error",
|
||||
// Stylistic Issues
|
||||
"array-bracket-spacing": "error",
|
||||
"block-spacing": "error",
|
||||
"brace-style": "error",
|
||||
"camelcase": "error",
|
||||
"capitalized-comments": "off",
|
||||
"comma-dangle": "error",
|
||||
"comma-spacing": "error",
|
||||
"comma-style": "error",
|
||||
"computed-property-spacing": "error",
|
||||
"consistent-this": "error",
|
||||
"eol-last": "error",
|
||||
"func-call-spacing": "error",
|
||||
"func-name-matching": "error",
|
||||
"func-names": "off",
|
||||
"func-style": [
|
||||
"error",
|
||||
"declaration"
|
||||
],
|
||||
"id-blacklist": "error",
|
||||
"id-length": "off",
|
||||
"id-match": "error",
|
||||
"indent": [
|
||||
"error",
|
||||
2,
|
||||
{
|
||||
"SwitchCase": 1
|
||||
}
|
||||
],
|
||||
"jsx-quotes": "error",
|
||||
"key-spacing": "off",
|
||||
"keyword-spacing": "error",
|
||||
"linebreak-style": [
|
||||
"error",
|
||||
"unix"
|
||||
],
|
||||
"line-comment-position": "off",
|
||||
"lines-around-comment": "off",
|
||||
"lines-around-directive": "error",
|
||||
"max-depth": [
|
||||
"error",
|
||||
10
|
||||
],
|
||||
"max-len": "off",
|
||||
"max-lines": "off",
|
||||
"max-nested-callbacks": "error",
|
||||
"max-params": "off",
|
||||
"max-statements": "off",
|
||||
"max-statements-per-line": "error",
|
||||
"multiline-ternary": "off",
|
||||
"new-cap": [
|
||||
"error",
|
||||
{
|
||||
"capIsNewExceptionPattern": "$.*"
|
||||
}
|
||||
],
|
||||
"newline-after-var": "off",
|
||||
"newline-per-chained-call": [
|
||||
"error",
|
||||
{
|
||||
"ignoreChainWithDepth": 5
|
||||
}
|
||||
],
|
||||
"new-parens": "error",
|
||||
"no-array-constructor": "error",
|
||||
"no-bitwise": "error",
|
||||
"no-continue": "off",
|
||||
"no-inline-comments": "off",
|
||||
"no-lonely-if": "error",
|
||||
"no-mixed-operators": "off",
|
||||
"no-multi-assign": "error",
|
||||
"no-multiple-empty-lines": "error",
|
||||
"nonblock-statement-body-position": "error",
|
||||
"no-negated-condition": "off",
|
||||
"no-nested-ternary": "error",
|
||||
"no-new-object": "error",
|
||||
"no-plusplus": "off",
|
||||
"no-restricted-syntax": "error",
|
||||
"no-tabs": "error",
|
||||
"no-ternary": "off",
|
||||
"no-trailing-spaces": "error",
|
||||
"no-underscore-dangle": "off",
|
||||
"no-unneeded-ternary": "error",
|
||||
"no-whitespace-before-property": "error",
|
||||
"object-curly-newline": [
|
||||
"error",
|
||||
{
|
||||
"minProperties": 1
|
||||
}
|
||||
],
|
||||
"object-curly-spacing": [
|
||||
"error",
|
||||
"always"
|
||||
],
|
||||
"object-property-newline": "error",
|
||||
"one-var": [
|
||||
"error",
|
||||
"never"
|
||||
],
|
||||
"one-var-declaration-per-line": "error",
|
||||
"operator-assignment": "error",
|
||||
"operator-linebreak": "error",
|
||||
"padded-blocks": [
|
||||
"error",
|
||||
"never"
|
||||
],
|
||||
"padding-line-between-statements": "off",
|
||||
"quote-props": [
|
||||
"error",
|
||||
"as-needed"
|
||||
],
|
||||
"quotes": [
|
||||
"error",
|
||||
"single"
|
||||
],
|
||||
"require-jsdoc": "off",
|
||||
"semi": [
|
||||
"error",
|
||||
"never"
|
||||
],
|
||||
"semi-spacing": "error",
|
||||
"sort-keys": "off",
|
||||
"sort-vars": "error",
|
||||
"space-before-blocks": "error",
|
||||
"space-before-function-paren": [
|
||||
"error",
|
||||
{
|
||||
"anonymous": "always",
|
||||
"named": "never"
|
||||
}
|
||||
],
|
||||
"space-in-parens": "error",
|
||||
"space-infix-ops": "error",
|
||||
"space-unary-ops": "error",
|
||||
"spaced-comment": "error",
|
||||
"template-tag-spacing": "error",
|
||||
"unicode-bom": "error",
|
||||
"wrap-regex": "off",
|
||||
// ECMAScript 6
|
||||
"arrow-body-style": [
|
||||
"error",
|
||||
"as-needed"
|
||||
],
|
||||
"arrow-parens": "error",
|
||||
"arrow-spacing": "error",
|
||||
"generator-star-spacing": "error",
|
||||
"no-confusing-arrow": "error",
|
||||
"no-duplicate-imports": "error",
|
||||
"no-restricted-imports": "error",
|
||||
"no-useless-computed-key": "error",
|
||||
"no-useless-constructor": "error",
|
||||
"no-useless-rename": "error",
|
||||
"no-var": "error",
|
||||
"object-shorthand": "error",
|
||||
"prefer-arrow-callback": "error",
|
||||
"prefer-const": "error",
|
||||
"prefer-destructuring": "off",
|
||||
"prefer-numeric-literals": "error",
|
||||
"prefer-rest-params": "error",
|
||||
"prefer-spread": "error",
|
||||
"prefer-template": "error",
|
||||
"rest-spread-spacing": "error",
|
||||
"sort-imports": "error",
|
||||
"symbol-description": "error",
|
||||
"template-curly-spacing": "error",
|
||||
"yield-star-spacing": "error"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,63 @@
|
|||
{
|
||||
"root": true,
|
||||
"extends": [
|
||||
"plugin:compat/recommended",
|
||||
"plugin:import/errors",
|
||||
"plugin:import/warnings",
|
||||
"plugin:unicorn/recommended",
|
||||
"xo/esnext",
|
||||
"xo/browser"
|
||||
],
|
||||
"env": {
|
||||
"jquery": true
|
||||
},
|
||||
"rules": {
|
||||
"capitalized-comments": "off",
|
||||
"eqeqeq": "off",
|
||||
"indent": [
|
||||
"error",
|
||||
2,
|
||||
{
|
||||
"MemberExpression": "off",
|
||||
"SwitchCase": 1
|
||||
}
|
||||
],
|
||||
"multiline-ternary": [
|
||||
"error",
|
||||
"always-multiline"
|
||||
],
|
||||
"new-cap": [
|
||||
"error",
|
||||
{
|
||||
"properties": false
|
||||
}
|
||||
],
|
||||
"no-eq-null": "off",
|
||||
"no-negated-condition": "off",
|
||||
"no-console": "error",
|
||||
"object-curly-spacing": [
|
||||
"error",
|
||||
"always"
|
||||
],
|
||||
"prefer-named-capture-group": "off",
|
||||
"semi": [
|
||||
"error",
|
||||
"never"
|
||||
],
|
||||
"unicorn/filename-case": "off",
|
||||
"unicorn/import-index": "off",
|
||||
"unicorn/no-fn-reference-in-iterator": "off",
|
||||
"unicorn/no-for-loop": "off",
|
||||
"unicorn/no-null": "off",
|
||||
"unicorn/no-unused-properties": "error",
|
||||
"unicorn/prefer-dataset": "off",
|
||||
"unicorn/prefer-includes": "off",
|
||||
"unicorn/prefer-node-append": "off",
|
||||
"unicorn/prefer-node-remove": "off",
|
||||
"unicorn/prefer-number-properties": "off",
|
||||
"unicorn/prefer-optional-catch-binding": "off",
|
||||
"unicorn/prefer-query-selector": "off",
|
||||
"unicorn/prefer-set-has": "off",
|
||||
"unicorn/prevent-abbreviations": "off"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"env": {
|
||||
"browser": false,
|
||||
"node": true
|
||||
},
|
||||
"parserOptions": {
|
||||
"sourceType": "script"
|
||||
},
|
||||
"extends": "../../.eslintrc.json",
|
||||
"rules": {
|
||||
"no-console": "off",
|
||||
"strict": "error"
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
'use strict'
|
||||
|
||||
module.exports = (ctx) => ({
|
||||
module.exports = () => ({
|
||||
map: {
|
||||
inline: false,
|
||||
annotation: true,
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
'use strict'
|
||||
|
||||
const { babel } = require('@rollup/plugin-babel')
|
||||
|
||||
const pkg = require('../../package')
|
||||
const pkg = require('../../package')
|
||||
const year = new Date().getFullYear()
|
||||
const banner = `/*!
|
||||
* AdminLTE v${pkg.version} (${pkg.homepage})
|
||||
|
|
|
@ -1,44 +0,0 @@
|
|||
{
|
||||
"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": "'"
|
||||
}
|
|
@ -5,30 +5,30 @@
|
|||
* --------------------------------------------
|
||||
*/
|
||||
|
||||
const CardRefresh = (($) => {
|
||||
const CardRefresh = ($ => {
|
||||
/**
|
||||
* Constants
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
const NAME = 'CardRefresh'
|
||||
const DATA_KEY = 'lte.cardrefresh'
|
||||
const EVENT_KEY = `.${DATA_KEY}`
|
||||
const NAME = 'CardRefresh'
|
||||
const DATA_KEY = 'lte.cardrefresh'
|
||||
const EVENT_KEY = `.${DATA_KEY}`
|
||||
const JQUERY_NO_CONFLICT = $.fn[NAME]
|
||||
|
||||
const Event = {
|
||||
LOADED: `loaded${EVENT_KEY}`,
|
||||
OVERLAY_ADDED: `overlay.added${EVENT_KEY}`,
|
||||
OVERLAY_REMOVED: `overlay.removed${EVENT_KEY}`,
|
||||
OVERLAY_REMOVED: `overlay.removed${EVENT_KEY}`
|
||||
}
|
||||
|
||||
const ClassName = {
|
||||
CARD: 'card',
|
||||
CARD: 'card'
|
||||
}
|
||||
|
||||
const Selector = {
|
||||
CARD: `.${ClassName.CARD}`,
|
||||
DATA_REFRESH: '[data-card-widget="card-refresh"]',
|
||||
DATA_REFRESH: '[data-card-widget="card-refresh"]'
|
||||
}
|
||||
|
||||
const Default = {
|
||||
|
@ -41,16 +41,16 @@ const CardRefresh = (($) => {
|
|||
loadOnInit: true,
|
||||
responseType: '',
|
||||
overlayTemplate: '<div class="overlay"><i class="fas fa-2x fa-sync-alt fa-spin"></i></div>',
|
||||
onLoadStart: function () {
|
||||
onLoadStart() {
|
||||
},
|
||||
onLoadDone: function (response) {
|
||||
return response;
|
||||
onLoadDone(response) {
|
||||
return response
|
||||
}
|
||||
}
|
||||
|
||||
class CardRefresh {
|
||||
constructor(element, settings) {
|
||||
this._element = element
|
||||
this._element = element
|
||||
this._parent = element.parents(Selector.CARD).first()
|
||||
this._settings = $.extend({}, Default, settings)
|
||||
this._overlay = $(this._settings.overlayTemplate)
|
||||
|
@ -60,7 +60,7 @@ const CardRefresh = (($) => {
|
|||
}
|
||||
|
||||
if (this._settings.source === '') {
|
||||
throw new Error('Source url was not defined. Please specify a url in your CardRefresh source option.');
|
||||
throw new Error('Source url was not defined. Please specify a url in your CardRefresh source option.')
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -68,9 +68,9 @@ const CardRefresh = (($) => {
|
|||
this._addOverlay()
|
||||
this._settings.onLoadStart.call($(this))
|
||||
|
||||
$.get(this._settings.source, this._settings.params, function (response) {
|
||||
$.get(this._settings.source, this._settings.params, response => {
|
||||
if (this._settings.loadInContent) {
|
||||
if (this._settings.sourceSelector != '') {
|
||||
if (this._settings.sourceSelector !== '') {
|
||||
response = $(response).find(this._settings.sourceSelector).html()
|
||||
}
|
||||
|
||||
|
@ -78,8 +78,8 @@ const CardRefresh = (($) => {
|
|||
}
|
||||
|
||||
this._settings.onLoadDone.call($(this), response)
|
||||
this._removeOverlay();
|
||||
}.bind(this), this._settings.responseType !== '' && this._settings.responseType)
|
||||
this._removeOverlay()
|
||||
}, this._settings.responseType !== '' && this._settings.responseType)
|
||||
|
||||
const loadedEvent = $.Event(Event.LOADED)
|
||||
$(this._element).trigger(loadedEvent)
|
||||
|
@ -90,19 +90,18 @@ const CardRefresh = (($) => {
|
|||
|
||||
const overlayAddedEvent = $.Event(Event.OVERLAY_ADDED)
|
||||
$(this._element).trigger(overlayAddedEvent)
|
||||
};
|
||||
}
|
||||
|
||||
_removeOverlay() {
|
||||
this._parent.find(this._overlay).remove()
|
||||
|
||||
const overlayRemovedEvent = $.Event(Event.OVERLAY_REMOVED)
|
||||
$(this._element).trigger(overlayRemovedEvent)
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
// Private
|
||||
|
||||
_init(card) {
|
||||
_init() {
|
||||
$(this).find(this._settings.trigger).on('click', () => {
|
||||
this.load()
|
||||
})
|
||||
|
@ -120,7 +119,7 @@ const CardRefresh = (($) => {
|
|||
|
||||
if (!data) {
|
||||
data = new CardRefresh($(this), _options)
|
||||
$(this).data(DATA_KEY, typeof config === 'string' ? data: config)
|
||||
$(this).data(DATA_KEY, typeof config === 'string' ? data : config)
|
||||
}
|
||||
|
||||
if (typeof config === 'string' && config.match(/load/)) {
|
||||
|
@ -144,8 +143,8 @@ const CardRefresh = (($) => {
|
|||
CardRefresh._jQueryInterface.call($(this), 'load')
|
||||
})
|
||||
|
||||
$(document).ready(function () {
|
||||
$(Selector.DATA_REFRESH).each(function() {
|
||||
$(document).ready(() => {
|
||||
$(Selector.DATA_REFRESH).each(function () {
|
||||
CardRefresh._jQueryInterface.call($(this))
|
||||
})
|
||||
})
|
||||
|
@ -157,7 +156,7 @@ const CardRefresh = (($) => {
|
|||
|
||||
$.fn[NAME] = CardRefresh._jQueryInterface
|
||||
$.fn[NAME].Constructor = CardRefresh
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT
|
||||
return CardRefresh._jQueryInterface
|
||||
}
|
||||
|
|
|
@ -5,15 +5,15 @@
|
|||
* --------------------------------------------
|
||||
*/
|
||||
|
||||
const CardWidget = (($) => {
|
||||
const CardWidget = ($ => {
|
||||
/**
|
||||
* Constants
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
const NAME = 'CardWidget'
|
||||
const DATA_KEY = 'lte.cardwidget'
|
||||
const EVENT_KEY = `.${DATA_KEY}`
|
||||
const NAME = 'CardWidget'
|
||||
const DATA_KEY = 'lte.cardwidget'
|
||||
const EVENT_KEY = `.${DATA_KEY}`
|
||||
const JQUERY_NO_CONFLICT = $.fn[NAME]
|
||||
|
||||
const Event = {
|
||||
|
@ -30,7 +30,7 @@ const CardWidget = (($) => {
|
|||
COLLAPSING: 'collapsing-card',
|
||||
EXPANDING: 'expanding-card',
|
||||
WAS_COLLAPSED: 'was-collapsed',
|
||||
MAXIMIZED: 'maximized-card',
|
||||
MAXIMIZED: 'maximized-card'
|
||||
}
|
||||
|
||||
const Selector = {
|
||||
|
@ -40,8 +40,7 @@ const CardWidget = (($) => {
|
|||
CARD: `.${ClassName.CARD}`,
|
||||
CARD_HEADER: '.card-header',
|
||||
CARD_BODY: '.card-body',
|
||||
CARD_FOOTER: '.card-footer',
|
||||
COLLAPSED: `.${ClassName.COLLAPSED}`,
|
||||
CARD_FOOTER: '.card-footer'
|
||||
}
|
||||
|
||||
const Default = {
|
||||
|
@ -52,12 +51,12 @@ const CardWidget = (($) => {
|
|||
collapseIcon: 'fa-minus',
|
||||
expandIcon: 'fa-plus',
|
||||
maximizeIcon: 'fa-expand',
|
||||
minimizeIcon: 'fa-compress',
|
||||
minimizeIcon: 'fa-compress'
|
||||
}
|
||||
|
||||
class CardWidget {
|
||||
constructor(element, settings) {
|
||||
this._element = element
|
||||
this._element = element
|
||||
this._parent = element.parents(Selector.CARD).first()
|
||||
|
||||
if (element.hasClass(ClassName.CARD)) {
|
||||
|
@ -113,21 +112,22 @@ const CardWidget = (($) => {
|
|||
|
||||
this.collapse()
|
||||
}
|
||||
|
||||
|
||||
maximize() {
|
||||
this._parent.find(this._settings.maximizeTrigger + ' .' + this._settings.maximizeIcon)
|
||||
.addClass(this._settings.minimizeIcon)
|
||||
.removeClass(this._settings.maximizeIcon)
|
||||
this._parent.css({
|
||||
'height': this._parent.height(),
|
||||
'width': this._parent.width(),
|
||||
'transition': 'all .15s'
|
||||
}).delay(150).queue(function(){
|
||||
height: this._parent.height(),
|
||||
width: this._parent.width(),
|
||||
transition: 'all .15s'
|
||||
}).delay(150).queue(function () {
|
||||
$(this).addClass(ClassName.MAXIMIZED)
|
||||
$('html').addClass(ClassName.MAXIMIZED)
|
||||
if ($(this).hasClass(ClassName.COLLAPSED)) {
|
||||
$(this).addClass(ClassName.WAS_COLLAPSED)
|
||||
}
|
||||
|
||||
$(this).dequeue()
|
||||
})
|
||||
|
||||
|
@ -142,16 +142,17 @@ const CardWidget = (($) => {
|
|||
.removeClass(this._settings.minimizeIcon)
|
||||
this._parent.css('cssText', 'height:' + this._parent[0].style.height + ' !important;' +
|
||||
'width:' + this._parent[0].style.width + ' !important; transition: all .15s;'
|
||||
).delay(10).queue(function(){
|
||||
).delay(10).queue(function () {
|
||||
$(this).removeClass(ClassName.MAXIMIZED)
|
||||
$('html').removeClass(ClassName.MAXIMIZED)
|
||||
$(this).css({
|
||||
'height': 'inherit',
|
||||
'width': 'inherit'
|
||||
height: 'inherit',
|
||||
width: 'inherit'
|
||||
})
|
||||
if ($(this).hasClass(ClassName.WAS_COLLAPSED)) {
|
||||
$(this).removeClass(ClassName.WAS_COLLAPSED)
|
||||
}
|
||||
|
||||
$(this).dequeue()
|
||||
})
|
||||
|
||||
|
@ -195,7 +196,7 @@ const CardWidget = (($) => {
|
|||
|
||||
if (!data) {
|
||||
data = new CardWidget($(this), _options)
|
||||
$(this).data(DATA_KEY, typeof config === 'string' ? data: config)
|
||||
$(this).data(DATA_KEY, typeof config === 'string' ? data : config)
|
||||
}
|
||||
|
||||
if (typeof config === 'string' && config.match(/collapse|expand|remove|toggle|maximize|minimize|toggleMaximize/)) {
|
||||
|
@ -242,7 +243,7 @@ const CardWidget = (($) => {
|
|||
|
||||
$.fn[NAME] = CardWidget._jQueryInterface
|
||||
$.fn[NAME].Constructor = CardWidget
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT
|
||||
return CardWidget._jQueryInterface
|
||||
}
|
||||
|
|
|
@ -5,30 +5,28 @@
|
|||
* --------------------------------------------
|
||||
*/
|
||||
|
||||
const ControlSidebar = (($) => {
|
||||
const ControlSidebar = ($ => {
|
||||
/**
|
||||
* Constants
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
const NAME = 'ControlSidebar'
|
||||
const DATA_KEY = 'lte.controlsidebar'
|
||||
const EVENT_KEY = `.${DATA_KEY}`
|
||||
const NAME = 'ControlSidebar'
|
||||
const DATA_KEY = 'lte.controlsidebar'
|
||||
const EVENT_KEY = `.${DATA_KEY}`
|
||||
const JQUERY_NO_CONFLICT = $.fn[NAME]
|
||||
const DATA_API_KEY = '.data-api'
|
||||
|
||||
const Event = {
|
||||
COLLAPSED: `collapsed${EVENT_KEY}`,
|
||||
EXPANDED: `expanded${EVENT_KEY}`,
|
||||
EXPANDED: `expanded${EVENT_KEY}`
|
||||
}
|
||||
|
||||
const Selector = {
|
||||
CONTROL_SIDEBAR: '.control-sidebar',
|
||||
CONTROL_SIDEBAR_CONTENT: '.control-sidebar-content',
|
||||
DATA_TOGGLE: '[data-widget="control-sidebar"]',
|
||||
CONTENT: '.content-wrapper',
|
||||
HEADER: '.main-header',
|
||||
FOOTER: '.main-footer',
|
||||
FOOTER: '.main-footer'
|
||||
}
|
||||
|
||||
const ClassName = {
|
||||
|
@ -45,13 +43,13 @@ const ControlSidebar = (($) => {
|
|||
FOOTER_SM_FIXED: 'layout-sm-footer-fixed',
|
||||
FOOTER_MD_FIXED: 'layout-md-footer-fixed',
|
||||
FOOTER_LG_FIXED: 'layout-lg-footer-fixed',
|
||||
FOOTER_XL_FIXED: 'layout-xl-footer-fixed',
|
||||
FOOTER_XL_FIXED: 'layout-xl-footer-fixed'
|
||||
}
|
||||
|
||||
const Default = {
|
||||
controlsidebarSlide: true,
|
||||
scrollbarTheme : 'os-theme-light',
|
||||
scrollbarAutoHide: 'l',
|
||||
scrollbarTheme: 'os-theme-light',
|
||||
scrollbarAutoHide: 'l'
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -62,7 +60,7 @@ const ControlSidebar = (($) => {
|
|||
class ControlSidebar {
|
||||
constructor(element, config) {
|
||||
this._element = element
|
||||
this._config = config
|
||||
this._config = config
|
||||
|
||||
this._init()
|
||||
}
|
||||
|
@ -73,7 +71,7 @@ const ControlSidebar = (($) => {
|
|||
// Show the control sidebar
|
||||
if (this._config.controlsidebarSlide) {
|
||||
$('html').addClass(ClassName.CONTROL_SIDEBAR_ANIMATE)
|
||||
$('body').removeClass(ClassName.CONTROL_SIDEBAR_SLIDE).delay(300).queue(function(){
|
||||
$('body').removeClass(ClassName.CONTROL_SIDEBAR_SLIDE).delay(300).queue(function () {
|
||||
$(Selector.CONTROL_SIDEBAR).hide()
|
||||
$('html').removeClass(ClassName.CONTROL_SIDEBAR_ANIMATE)
|
||||
$(this).dequeue()
|
||||
|
@ -90,8 +88,8 @@ const ControlSidebar = (($) => {
|
|||
// Collapse the control sidebar
|
||||
if (this._config.controlsidebarSlide) {
|
||||
$('html').addClass(ClassName.CONTROL_SIDEBAR_ANIMATE)
|
||||
$(Selector.CONTROL_SIDEBAR).show().delay(10).queue(function(){
|
||||
$('body').addClass(ClassName.CONTROL_SIDEBAR_SLIDE).delay(300).queue(function(){
|
||||
$(Selector.CONTROL_SIDEBAR).show().delay(10).queue(function () {
|
||||
$('body').addClass(ClassName.CONTROL_SIDEBAR_SLIDE).delay(300).queue(function () {
|
||||
$('html').removeClass(ClassName.CONTROL_SIDEBAR_ANIMATE)
|
||||
$(this).dequeue()
|
||||
})
|
||||
|
@ -130,7 +128,7 @@ const ControlSidebar = (($) => {
|
|||
|
||||
$(window).scroll(() => {
|
||||
if ($('body').hasClass(ClassName.CONTROL_SIDEBAR_OPEN) || $('body').hasClass(ClassName.CONTROL_SIDEBAR_SLIDE)) {
|
||||
this._fixScrollHeight()
|
||||
this._fixScrollHeight()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -140,65 +138,64 @@ const ControlSidebar = (($) => {
|
|||
scroll: $(document).height(),
|
||||
window: $(window).height(),
|
||||
header: $(Selector.HEADER).outerHeight(),
|
||||
footer: $(Selector.FOOTER).outerHeight(),
|
||||
footer: $(Selector.FOOTER).outerHeight()
|
||||
}
|
||||
const positions = {
|
||||
bottom: Math.abs((heights.window + $(window).scrollTop()) - heights.scroll),
|
||||
top: $(window).scrollTop(),
|
||||
top: $(window).scrollTop()
|
||||
}
|
||||
|
||||
let navbarFixed = false;
|
||||
let footerFixed = false;
|
||||
let navbarFixed = false
|
||||
let footerFixed = false
|
||||
|
||||
if ($('body').hasClass(ClassName.LAYOUT_FIXED)) {
|
||||
if (
|
||||
$('body').hasClass(ClassName.NAVBAR_FIXED)
|
||||
|| $('body').hasClass(ClassName.NAVBAR_SM_FIXED)
|
||||
|| $('body').hasClass(ClassName.NAVBAR_MD_FIXED)
|
||||
|| $('body').hasClass(ClassName.NAVBAR_LG_FIXED)
|
||||
|| $('body').hasClass(ClassName.NAVBAR_XL_FIXED)
|
||||
$('body').hasClass(ClassName.NAVBAR_FIXED) ||
|
||||
$('body').hasClass(ClassName.NAVBAR_SM_FIXED) ||
|
||||
$('body').hasClass(ClassName.NAVBAR_MD_FIXED) ||
|
||||
$('body').hasClass(ClassName.NAVBAR_LG_FIXED) ||
|
||||
$('body').hasClass(ClassName.NAVBAR_XL_FIXED)
|
||||
) {
|
||||
if ($(Selector.HEADER).css("position") === "fixed") {
|
||||
navbarFixed = true;
|
||||
if ($(Selector.HEADER).css('position') === 'fixed') {
|
||||
navbarFixed = true
|
||||
}
|
||||
}
|
||||
|
||||
if (
|
||||
$('body').hasClass(ClassName.FOOTER_FIXED)
|
||||
|| $('body').hasClass(ClassName.FOOTER_SM_FIXED)
|
||||
|| $('body').hasClass(ClassName.FOOTER_MD_FIXED)
|
||||
|| $('body').hasClass(ClassName.FOOTER_LG_FIXED)
|
||||
|| $('body').hasClass(ClassName.FOOTER_XL_FIXED)
|
||||
$('body').hasClass(ClassName.FOOTER_FIXED) ||
|
||||
$('body').hasClass(ClassName.FOOTER_SM_FIXED) ||
|
||||
$('body').hasClass(ClassName.FOOTER_MD_FIXED) ||
|
||||
$('body').hasClass(ClassName.FOOTER_LG_FIXED) ||
|
||||
$('body').hasClass(ClassName.FOOTER_XL_FIXED)
|
||||
) {
|
||||
if ($(Selector.FOOTER).css("position") === "fixed") {
|
||||
footerFixed = true;
|
||||
if ($(Selector.FOOTER).css('position') === 'fixed') {
|
||||
footerFixed = true
|
||||
}
|
||||
}
|
||||
|
||||
if (positions.top === 0 && positions.bottom === 0) {
|
||||
$(Selector.CONTROL_SIDEBAR).css('bottom', heights.footer);
|
||||
$(Selector.CONTROL_SIDEBAR).css('top', heights.header);
|
||||
$(Selector.CONTROL_SIDEBAR).css('bottom', heights.footer)
|
||||
$(Selector.CONTROL_SIDEBAR).css('top', heights.header)
|
||||
$(Selector.CONTROL_SIDEBAR + ', ' + Selector.CONTROL_SIDEBAR + ' ' + Selector.CONTROL_SIDEBAR_CONTENT).css('height', heights.window - (heights.header + heights.footer))
|
||||
} else if (positions.bottom <= heights.footer) {
|
||||
if (footerFixed === false) {
|
||||
$(Selector.CONTROL_SIDEBAR).css('bottom', heights.footer - positions.bottom);
|
||||
if (footerFixed === false) {
|
||||
$(Selector.CONTROL_SIDEBAR).css('bottom', heights.footer - positions.bottom)
|
||||
$(Selector.CONTROL_SIDEBAR + ', ' + Selector.CONTROL_SIDEBAR + ' ' + Selector.CONTROL_SIDEBAR_CONTENT).css('height', heights.window - (heights.footer - positions.bottom))
|
||||
} else {
|
||||
$(Selector.CONTROL_SIDEBAR).css('bottom', heights.footer);
|
||||
$(Selector.CONTROL_SIDEBAR).css('bottom', heights.footer)
|
||||
}
|
||||
} else if (positions.top <= heights.header) {
|
||||
if (navbarFixed === false) {
|
||||
$(Selector.CONTROL_SIDEBAR).css('top', heights.header - positions.top);
|
||||
$(Selector.CONTROL_SIDEBAR).css('top', heights.header - positions.top)
|
||||
$(Selector.CONTROL_SIDEBAR + ', ' + Selector.CONTROL_SIDEBAR + ' ' + Selector.CONTROL_SIDEBAR_CONTENT).css('height', heights.window - (heights.header - positions.top))
|
||||
} else {
|
||||
$(Selector.CONTROL_SIDEBAR).css('top', heights.header);
|
||||
$(Selector.CONTROL_SIDEBAR).css('top', heights.header)
|
||||
}
|
||||
} else if (navbarFixed === false) {
|
||||
$(Selector.CONTROL_SIDEBAR).css('top', 0)
|
||||
$(Selector.CONTROL_SIDEBAR + ', ' + Selector.CONTROL_SIDEBAR + ' ' + Selector.CONTROL_SIDEBAR_CONTENT).css('height', heights.window)
|
||||
} else {
|
||||
if (navbarFixed === false) {
|
||||
$(Selector.CONTROL_SIDEBAR).css('top', 0);
|
||||
$(Selector.CONTROL_SIDEBAR + ', ' + Selector.CONTROL_SIDEBAR + ' ' + Selector.CONTROL_SIDEBAR_CONTENT).css('height', heights.window)
|
||||
} else {
|
||||
$(Selector.CONTROL_SIDEBAR).css('top', heights.header);
|
||||
}
|
||||
$(Selector.CONTROL_SIDEBAR).css('top', heights.header)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -207,40 +204,39 @@ const ControlSidebar = (($) => {
|
|||
const heights = {
|
||||
window: $(window).height(),
|
||||
header: $(Selector.HEADER).outerHeight(),
|
||||
footer: $(Selector.FOOTER).outerHeight(),
|
||||
footer: $(Selector.FOOTER).outerHeight()
|
||||
}
|
||||
|
||||
if ($('body').hasClass(ClassName.LAYOUT_FIXED)) {
|
||||
let sidebarHeight = heights.window - heights.header;
|
||||
let sidebarHeight = heights.window - heights.header
|
||||
|
||||
if (
|
||||
$('body').hasClass(ClassName.FOOTER_FIXED)
|
||||
|| $('body').hasClass(ClassName.FOOTER_SM_FIXED)
|
||||
|| $('body').hasClass(ClassName.FOOTER_MD_FIXED)
|
||||
|| $('body').hasClass(ClassName.FOOTER_LG_FIXED)
|
||||
|| $('body').hasClass(ClassName.FOOTER_XL_FIXED)
|
||||
$('body').hasClass(ClassName.FOOTER_FIXED) ||
|
||||
$('body').hasClass(ClassName.FOOTER_SM_FIXED) ||
|
||||
$('body').hasClass(ClassName.FOOTER_MD_FIXED) ||
|
||||
$('body').hasClass(ClassName.FOOTER_LG_FIXED) ||
|
||||
$('body').hasClass(ClassName.FOOTER_XL_FIXED)
|
||||
) {
|
||||
if ($(Selector.FOOTER).css("position") === "fixed") {
|
||||
sidebarHeight = heights.window - heights.header - heights.footer;
|
||||
if ($(Selector.FOOTER).css('position') === 'fixed') {
|
||||
sidebarHeight = heights.window - heights.header - heights.footer
|
||||
}
|
||||
}
|
||||
|
||||
$(Selector.CONTROL_SIDEBAR + ' ' + Selector.CONTROL_SIDEBAR_CONTENT).css('height', sidebarHeight)
|
||||
|
||||
|
||||
if (typeof $.fn.overlayScrollbars !== 'undefined') {
|
||||
$(Selector.CONTROL_SIDEBAR + ' ' + Selector.CONTROL_SIDEBAR_CONTENT).overlayScrollbars({
|
||||
className : this._config.scrollbarTheme,
|
||||
sizeAutoCapable : true,
|
||||
scrollbars : {
|
||||
autoHide: this._config.scrollbarAutoHide,
|
||||
clickScrolling : true
|
||||
className: this._config.scrollbarTheme,
|
||||
sizeAutoCapable: true,
|
||||
scrollbars: {
|
||||
autoHide: this._config.scrollbarAutoHide,
|
||||
clickScrolling: true
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Static
|
||||
|
||||
static _jQueryInterface(operation) {
|
||||
|
@ -280,7 +276,7 @@ const ControlSidebar = (($) => {
|
|||
|
||||
$.fn[NAME] = ControlSidebar._jQueryInterface
|
||||
$.fn[NAME].Constructor = ControlSidebar
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT
|
||||
return ControlSidebar._jQueryInterface
|
||||
}
|
||||
|
@ -289,4 +285,4 @@ const ControlSidebar = (($) => {
|
|||
})(jQuery)
|
||||
|
||||
export default ControlSidebar
|
||||
|
||||
|
||||
|
|
|
@ -5,30 +5,28 @@
|
|||
* --------------------------------------------
|
||||
*/
|
||||
|
||||
const DirectChat = (($) => {
|
||||
const DirectChat = ($ => {
|
||||
/**
|
||||
* Constants
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
const NAME = 'DirectChat'
|
||||
const DATA_KEY = 'lte.directchat'
|
||||
const EVENT_KEY = `.${DATA_KEY}`
|
||||
const NAME = 'DirectChat'
|
||||
const DATA_KEY = 'lte.directchat'
|
||||
const JQUERY_NO_CONFLICT = $.fn[NAME]
|
||||
const DATA_API_KEY = '.data-api'
|
||||
|
||||
const Event = {
|
||||
TOGGLED: `toggled{EVENT_KEY}`
|
||||
TOGGLED: 'toggled{EVENT_KEY}'
|
||||
}
|
||||
|
||||
const Selector = {
|
||||
DATA_TOGGLE: '[data-widget="chat-pane-toggle"]',
|
||||
DIRECT_CHAT: '.direct-chat'
|
||||
};
|
||||
}
|
||||
|
||||
const ClassName = {
|
||||
DIRECT_CHAT_OPEN: 'direct-chat-contacts-open'
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Class Definition
|
||||
|
@ -36,12 +34,12 @@ const DirectChat = (($) => {
|
|||
*/
|
||||
|
||||
class DirectChat {
|
||||
constructor(element, config) {
|
||||
constructor(element) {
|
||||
this._element = element
|
||||
}
|
||||
|
||||
toggle() {
|
||||
$(this._element).parents(Selector.DIRECT_CHAT).first().toggleClass(ClassName.DIRECT_CHAT_OPEN);
|
||||
$(this._element).parents(Selector.DIRECT_CHAT).first().toggleClass(ClassName.DIRECT_CHAT_OPEN)
|
||||
|
||||
const toggledEvent = $.Event(Event.TOGGLED)
|
||||
$(this._element).trigger(toggledEvent)
|
||||
|
@ -51,7 +49,7 @@ const DirectChat = (($) => {
|
|||
|
||||
static _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
let data = $(this).data(DATA_KEY)
|
||||
|
||||
if (!data) {
|
||||
data = new DirectChat($(this))
|
||||
|
@ -70,9 +68,12 @@ const DirectChat = (($) => {
|
|||
*/
|
||||
|
||||
$(document).on('click', Selector.DATA_TOGGLE, function (event) {
|
||||
if (event) event.preventDefault();
|
||||
DirectChat._jQueryInterface.call($(this), 'toggle');
|
||||
});
|
||||
if (event) {
|
||||
event.preventDefault()
|
||||
}
|
||||
|
||||
DirectChat._jQueryInterface.call($(this), 'toggle')
|
||||
})
|
||||
|
||||
/**
|
||||
* jQuery API
|
||||
|
@ -81,7 +82,7 @@ const DirectChat = (($) => {
|
|||
|
||||
$.fn[NAME] = DirectChat._jQueryInterface
|
||||
$.fn[NAME].Constructor = DirectChat
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT
|
||||
return DirectChat._jQueryInterface
|
||||
}
|
||||
|
|
|
@ -5,33 +5,30 @@
|
|||
* --------------------------------------------
|
||||
*/
|
||||
|
||||
const Dropdown = (($) => {
|
||||
const Dropdown = ($ => {
|
||||
/**
|
||||
* Constants
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
const NAME = 'Dropdown'
|
||||
const DATA_KEY = 'lte.dropdown'
|
||||
const EVENT_KEY = `.${DATA_KEY}`
|
||||
const NAME = 'Dropdown'
|
||||
const DATA_KEY = 'lte.dropdown'
|
||||
const JQUERY_NO_CONFLICT = $.fn[NAME]
|
||||
|
||||
const Selector = {
|
||||
NAVBAR: '.navbar',
|
||||
DROPDOWN_MENU: '.dropdown-menu',
|
||||
DROPDOWN_MENU_ACTIVE: '.dropdown-menu.show',
|
||||
DROPDOWN_TOGGLE: '[data-toggle="dropdown"]',
|
||||
DROPDOWN_TOGGLE: '[data-toggle="dropdown"]'
|
||||
}
|
||||
|
||||
const ClassName = {
|
||||
DROPDOWN_HOVER: 'dropdown-hover',
|
||||
DROPDOWN_RIGHT: 'dropdown-menu-right'
|
||||
}
|
||||
|
||||
const Default = {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Class Definition
|
||||
* ====================================================
|
||||
|
@ -39,26 +36,26 @@ const Dropdown = (($) => {
|
|||
|
||||
class Dropdown {
|
||||
constructor(element, config) {
|
||||
this._config = config
|
||||
this._config = config
|
||||
this._element = element
|
||||
}
|
||||
|
||||
// Public
|
||||
|
||||
toggleSubmenu() {
|
||||
this._element.siblings().show().toggleClass("show")
|
||||
this._element.siblings().show().toggleClass('show')
|
||||
|
||||
if (! this._element.next().hasClass('show')) {
|
||||
this._element.parents('.dropdown-menu').first().find('.show').removeClass("show").hide()
|
||||
if (!this._element.next().hasClass('show')) {
|
||||
this._element.parents('.dropdown-menu').first().find('.show').removeClass('show').hide()
|
||||
}
|
||||
|
||||
this._element.parents('li.nav-item.dropdown.show').on('hidden.bs.dropdown', function(e) {
|
||||
$('.dropdown-submenu .show').removeClass("show").hide()
|
||||
this._element.parents('li.nav-item.dropdown.show').on('hidden.bs.dropdown', () => {
|
||||
$('.dropdown-submenu .show').removeClass('show').hide()
|
||||
})
|
||||
}
|
||||
|
||||
fixPosition() {
|
||||
let elm = $(Selector.DROPDOWN_MENU_ACTIVE)
|
||||
const elm = $(Selector.DROPDOWN_MENU_ACTIVE)
|
||||
|
||||
if (elm.length !== 0) {
|
||||
if (elm.hasClass(ClassName.DROPDOWN_RIGHT)) {
|
||||
|
@ -69,28 +66,26 @@ const Dropdown = (($) => {
|
|||
elm.css('right', 'inherit')
|
||||
}
|
||||
|
||||
let offset = elm.offset()
|
||||
let width = elm.width()
|
||||
let windowWidth = $(window).width()
|
||||
let visiblePart = windowWidth - offset.left
|
||||
const offset = elm.offset()
|
||||
const width = elm.width()
|
||||
const windowWidth = $(window).width()
|
||||
const visiblePart = windowWidth - offset.left
|
||||
|
||||
if (offset.left < 0) {
|
||||
elm.css('left', 'inherit')
|
||||
elm.css('right', (offset.left - 5))
|
||||
} else {
|
||||
if (visiblePart < width) {
|
||||
elm.css('left', 'inherit')
|
||||
elm.css('right', 0)
|
||||
}
|
||||
} else if (visiblePart < width) {
|
||||
elm.css('left', 'inherit')
|
||||
elm.css('right', 0)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Static
|
||||
|
||||
static _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
let data = $(this).data(DATA_KEY)
|
||||
const _config = $.extend({}, Default, $(this).data())
|
||||
|
||||
if (!data) {
|
||||
|
@ -98,7 +93,7 @@ const Dropdown = (($) => {
|
|||
$(this).data(DATA_KEY, data)
|
||||
}
|
||||
|
||||
if (config === 'toggleSubmenu' || config == 'fixPosition') {
|
||||
if (config === 'toggleSubmenu' || config === 'fixPosition') {
|
||||
data[config]()
|
||||
}
|
||||
})
|
||||
|
@ -110,20 +105,20 @@ const Dropdown = (($) => {
|
|||
* ====================================================
|
||||
*/
|
||||
|
||||
$(Selector.DROPDOWN_MENU + ' ' + Selector.DROPDOWN_TOGGLE).on("click", function(event) {
|
||||
$(Selector.DROPDOWN_MENU + ' ' + Selector.DROPDOWN_TOGGLE).on('click', function (event) {
|
||||
event.preventDefault()
|
||||
event.stopPropagation()
|
||||
|
||||
Dropdown._jQueryInterface.call($(this), 'toggleSubmenu')
|
||||
});
|
||||
})
|
||||
|
||||
$(Selector.NAVBAR + ' ' + Selector.DROPDOWN_TOGGLE).on("click", function(event) {
|
||||
$(Selector.NAVBAR + ' ' + Selector.DROPDOWN_TOGGLE).on('click', event => {
|
||||
event.preventDefault()
|
||||
|
||||
setTimeout(function() {
|
||||
setTimeout(function () {
|
||||
Dropdown._jQueryInterface.call($(this), 'fixPosition')
|
||||
}, 1)
|
||||
});
|
||||
})
|
||||
|
||||
/**
|
||||
* jQuery API
|
||||
|
|
|
@ -5,58 +5,41 @@
|
|||
* --------------------------------------------
|
||||
*/
|
||||
|
||||
const Layout = (($) => {
|
||||
const Layout = ($ => {
|
||||
/**
|
||||
* Constants
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
const NAME = 'Layout'
|
||||
const DATA_KEY = 'lte.layout'
|
||||
const EVENT_KEY = `.${DATA_KEY}`
|
||||
const NAME = 'Layout'
|
||||
const DATA_KEY = 'lte.layout'
|
||||
const JQUERY_NO_CONFLICT = $.fn[NAME]
|
||||
|
||||
const Event = {
|
||||
SIDEBAR: 'sidebar'
|
||||
}
|
||||
|
||||
const Selector = {
|
||||
HEADER : '.main-header',
|
||||
MAIN_SIDEBAR : '.main-sidebar',
|
||||
SIDEBAR : '.main-sidebar .sidebar',
|
||||
CONTENT : '.content-wrapper',
|
||||
BRAND : '.brand-link',
|
||||
CONTENT_HEADER : '.content-header',
|
||||
WRAPPER : '.wrapper',
|
||||
CONTROL_SIDEBAR: '.control-sidebar',
|
||||
HEADER: '.main-header',
|
||||
MAIN_SIDEBAR: '.main-sidebar',
|
||||
SIDEBAR: '.main-sidebar .sidebar',
|
||||
CONTENT: '.content-wrapper',
|
||||
CONTROL_SIDEBAR_CONTENT: '.control-sidebar-content',
|
||||
CONTROL_SIDEBAR_BTN: '[data-widget="control-sidebar"]',
|
||||
LAYOUT_FIXED : '.layout-fixed',
|
||||
FOOTER : '.main-footer',
|
||||
PUSHMENU_BTN : '[data-widget="pushmenu"]',
|
||||
LOGIN_BOX : '.login-box',
|
||||
REGISTER_BOX : '.register-box'
|
||||
FOOTER: '.main-footer',
|
||||
PUSHMENU_BTN: '[data-widget="pushmenu"]',
|
||||
LOGIN_BOX: '.login-box',
|
||||
REGISTER_BOX: '.register-box'
|
||||
}
|
||||
|
||||
const ClassName = {
|
||||
HOLD : 'hold-transition',
|
||||
SIDEBAR : 'main-sidebar',
|
||||
CONTENT_FIXED : 'content-fixed',
|
||||
SIDEBAR_FOCUSED: 'sidebar-focused',
|
||||
LAYOUT_FIXED : 'layout-fixed',
|
||||
NAVBAR_FIXED : 'layout-navbar-fixed',
|
||||
FOOTER_FIXED : 'layout-footer-fixed',
|
||||
LOGIN_PAGE : 'login-page',
|
||||
REGISTER_PAGE : 'register-page',
|
||||
LAYOUT_FIXED: 'layout-fixed',
|
||||
CONTROL_SIDEBAR_SLIDE_OPEN: 'control-sidebar-slide-open',
|
||||
CONTROL_SIDEBAR_OPEN: 'control-sidebar-open',
|
||||
CONTROL_SIDEBAR_OPEN: 'control-sidebar-open'
|
||||
}
|
||||
|
||||
const Default = {
|
||||
scrollbarTheme : 'os-theme-light',
|
||||
scrollbarTheme: 'os-theme-light',
|
||||
scrollbarAutoHide: 'l',
|
||||
panelAutoHeight: true,
|
||||
loginRegisterAutoHeight: true,
|
||||
loginRegisterAutoHeight: true
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -66,7 +49,7 @@ const Layout = (($) => {
|
|||
|
||||
class Layout {
|
||||
constructor(element, config) {
|
||||
this._config = config
|
||||
this._config = config
|
||||
this._element = element
|
||||
|
||||
this._init()
|
||||
|
@ -75,10 +58,10 @@ const Layout = (($) => {
|
|||
// Public
|
||||
|
||||
fixLayoutHeight(extra = null) {
|
||||
let control_sidebar = 0
|
||||
let controlSidebar = 0
|
||||
|
||||
if ($('body').hasClass(ClassName.CONTROL_SIDEBAR_SLIDE_OPEN) || $('body').hasClass(ClassName.CONTROL_SIDEBAR_OPEN) || extra == 'control_sidebar') {
|
||||
control_sidebar = $(Selector.CONTROL_SIDEBAR_CONTENT).height()
|
||||
if ($('body').hasClass(ClassName.CONTROL_SIDEBAR_SLIDE_OPEN) || $('body').hasClass(ClassName.CONTROL_SIDEBAR_OPEN) || extra === 'controlSidebar') {
|
||||
controlSidebar = $(Selector.CONTROL_SIDEBAR_CONTENT).height()
|
||||
}
|
||||
|
||||
const heights = {
|
||||
|
@ -86,26 +69,27 @@ const Layout = (($) => {
|
|||
header: $(Selector.HEADER).length !== 0 ? $(Selector.HEADER).outerHeight() : 0,
|
||||
footer: $(Selector.FOOTER).length !== 0 ? $(Selector.FOOTER).outerHeight() : 0,
|
||||
sidebar: $(Selector.SIDEBAR).length !== 0 ? $(Selector.SIDEBAR).height() : 0,
|
||||
control_sidebar: control_sidebar,
|
||||
controlSidebar
|
||||
}
|
||||
|
||||
const max = this._max(heights)
|
||||
let offset = this._config.panelAutoHeight
|
||||
|
||||
if (offset === true) {
|
||||
offset = 0;
|
||||
offset = 0
|
||||
}
|
||||
|
||||
if (offset !== false) {
|
||||
if (max == heights.control_sidebar) {
|
||||
if (max === heights.controlSidebar) {
|
||||
$(Selector.CONTENT).css('min-height', (max + offset))
|
||||
} else if (max == heights.window) {
|
||||
} else if (max === heights.window) {
|
||||
$(Selector.CONTENT).css('min-height', (max + offset) - heights.header - heights.footer)
|
||||
} else {
|
||||
$(Selector.CONTENT).css('min-height', (max + offset) - heights.header)
|
||||
}
|
||||
|
||||
if (this._isFooterFixed()) {
|
||||
$(Selector.CONTENT).css('min-height', parseFloat($(Selector.CONTENT).css('min-height')) + heights.footer);
|
||||
$(Selector.CONTENT).css('min-height', parseFloat($(Selector.CONTENT).css('min-height')) + heights.footer)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -116,11 +100,11 @@ const Layout = (($) => {
|
|||
|
||||
if (typeof $.fn.overlayScrollbars !== 'undefined') {
|
||||
$(Selector.SIDEBAR).overlayScrollbars({
|
||||
className : this._config.scrollbarTheme,
|
||||
sizeAutoCapable : true,
|
||||
scrollbars : {
|
||||
autoHide: this._config.scrollbarAutoHide,
|
||||
clickScrolling : true
|
||||
className: this._config.scrollbarTheme,
|
||||
sizeAutoCapable: true,
|
||||
scrollbars: {
|
||||
autoHide: this._config.scrollbarAutoHide,
|
||||
clickScrolling: true
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -131,10 +115,10 @@ const Layout = (($) => {
|
|||
if ($(Selector.LOGIN_BOX + ', ' + Selector.REGISTER_BOX).length === 0) {
|
||||
$('body, html').css('height', 'auto')
|
||||
} else if ($(Selector.LOGIN_BOX + ', ' + Selector.REGISTER_BOX).length !== 0) {
|
||||
let box_height = $(Selector.LOGIN_BOX + ', ' + Selector.REGISTER_BOX).height()
|
||||
const boxHeight = $(Selector.LOGIN_BOX + ', ' + Selector.REGISTER_BOX).height()
|
||||
|
||||
if ($('body').css('min-height') !== box_height) {
|
||||
$('body').css('min-height', box_height)
|
||||
if ($('body').css('min-height') !== boxHeight) {
|
||||
$('body').css('min-height', boxHeight)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -148,7 +132,7 @@ const Layout = (($) => {
|
|||
if (this._config.loginRegisterAutoHeight === true) {
|
||||
this.fixLoginRegisterHeight()
|
||||
} else if (Number.isInteger(this._config.loginRegisterAutoHeight)) {
|
||||
setInterval(this.fixLoginRegisterHeight, this._config.loginRegisterAutoHeight);
|
||||
setInterval(this.fixLoginRegisterHeight, this._config.loginRegisterAutoHeight)
|
||||
}
|
||||
|
||||
$(Selector.SIDEBAR)
|
||||
|
@ -166,7 +150,7 @@ const Layout = (($) => {
|
|||
this.fixLayoutHeight()
|
||||
})
|
||||
.on('expanded.lte.controlsidebar', () => {
|
||||
this.fixLayoutHeight('control_sidebar')
|
||||
this.fixLayoutHeight('controlSidebar')
|
||||
})
|
||||
|
||||
$(window).resize(() => {
|
||||
|
@ -175,15 +159,14 @@ const Layout = (($) => {
|
|||
|
||||
setTimeout(() => {
|
||||
$('body.hold-transition').removeClass('hold-transition')
|
||||
|
||||
}, 50);
|
||||
}, 50)
|
||||
}
|
||||
|
||||
_max(numbers) {
|
||||
// Calculate the maximum number in a list
|
||||
let max = 0
|
||||
|
||||
Object.keys(numbers).forEach((key) => {
|
||||
Object.keys(numbers).forEach(key => {
|
||||
if (numbers[key] > max) {
|
||||
max = numbers[key]
|
||||
}
|
||||
|
@ -193,7 +176,7 @@ const Layout = (($) => {
|
|||
}
|
||||
|
||||
_isFooterFixed() {
|
||||
return $('.main-footer').css('position') === 'fixed';
|
||||
return $('.main-footer').css('position') === 'fixed'
|
||||
}
|
||||
|
||||
// Static
|
||||
|
@ -209,7 +192,7 @@ const Layout = (($) => {
|
|||
}
|
||||
|
||||
if (config === 'init' || config === '') {
|
||||
data['_init']()
|
||||
data._init()
|
||||
} else if (config === 'fixLayoutHeight' || config === 'fixLoginRegisterHeight') {
|
||||
data[config]()
|
||||
}
|
||||
|
@ -227,11 +210,11 @@ const Layout = (($) => {
|
|||
})
|
||||
|
||||
$(Selector.SIDEBAR + ' a').on('focusin', () => {
|
||||
$(Selector.MAIN_SIDEBAR).addClass(ClassName.SIDEBAR_FOCUSED);
|
||||
$(Selector.MAIN_SIDEBAR).addClass(ClassName.SIDEBAR_FOCUSED)
|
||||
})
|
||||
|
||||
$(Selector.SIDEBAR + ' a').on('focusout', () => {
|
||||
$(Selector.MAIN_SIDEBAR).removeClass(ClassName.SIDEBAR_FOCUSED);
|
||||
$(Selector.MAIN_SIDEBAR).removeClass(ClassName.SIDEBAR_FOCUSED)
|
||||
})
|
||||
|
||||
/**
|
||||
|
|
|
@ -5,15 +5,15 @@
|
|||
* --------------------------------------------
|
||||
*/
|
||||
|
||||
const PushMenu = (($) => {
|
||||
const PushMenu = ($ => {
|
||||
/**
|
||||
* Constants
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
const NAME = 'PushMenu'
|
||||
const DATA_KEY = 'lte.pushmenu'
|
||||
const EVENT_KEY = `.${DATA_KEY}`
|
||||
const NAME = 'PushMenu'
|
||||
const DATA_KEY = 'lte.pushmenu'
|
||||
const EVENT_KEY = `.${DATA_KEY}`
|
||||
const JQUERY_NO_CONFLICT = $.fn[NAME]
|
||||
|
||||
const Event = {
|
||||
|
@ -29,8 +29,6 @@ const PushMenu = (($) => {
|
|||
|
||||
const Selector = {
|
||||
TOGGLE_BUTTON: '[data-widget="pushmenu"]',
|
||||
SIDEBAR_MINI: '.sidebar-mini',
|
||||
SIDEBAR_COLLAPSED: '.sidebar-collapse',
|
||||
BODY: 'body',
|
||||
OVERLAY: '#sidebar-overlay',
|
||||
WRAPPER: '.wrapper'
|
||||
|
@ -52,7 +50,7 @@ const PushMenu = (($) => {
|
|||
this._element = element
|
||||
this._options = $.extend({}, Default, options)
|
||||
|
||||
if (!$(Selector.OVERLAY).length) {
|
||||
if ($(Selector.OVERLAY).length === 0) {
|
||||
this._addOverlay()
|
||||
}
|
||||
|
||||
|
@ -70,7 +68,7 @@ const PushMenu = (($) => {
|
|||
|
||||
$(Selector.BODY).removeClass(ClassName.COLLAPSED).removeClass(ClassName.CLOSED)
|
||||
|
||||
if(this._options.enableRemember) {
|
||||
if (this._options.enableRemember) {
|
||||
localStorage.setItem(`remember${EVENT_KEY}`, ClassName.OPEN)
|
||||
}
|
||||
|
||||
|
@ -87,7 +85,7 @@ const PushMenu = (($) => {
|
|||
|
||||
$(Selector.BODY).addClass(ClassName.COLLAPSED)
|
||||
|
||||
if(this._options.enableRemember) {
|
||||
if (this._options.enableRemember) {
|
||||
localStorage.setItem(`remember${EVENT_KEY}`, ClassName.COLLAPSED)
|
||||
}
|
||||
|
||||
|
@ -96,10 +94,10 @@ const PushMenu = (($) => {
|
|||
}
|
||||
|
||||
toggle() {
|
||||
if (!$(Selector.BODY).hasClass(ClassName.COLLAPSED)) {
|
||||
this.collapse()
|
||||
} else {
|
||||
if ($(Selector.BODY).hasClass(ClassName.COLLAPSED)) {
|
||||
this.expand()
|
||||
} else {
|
||||
this.collapse()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -109,10 +107,10 @@ const PushMenu = (($) => {
|
|||
if (!$(Selector.BODY).hasClass(ClassName.OPEN)) {
|
||||
this.collapse()
|
||||
}
|
||||
} else if (resize == true) {
|
||||
} else if (resize === true) {
|
||||
if ($(Selector.BODY).hasClass(ClassName.OPEN)) {
|
||||
$(Selector.BODY).removeClass(ClassName.OPEN)
|
||||
} else if($(Selector.BODY).hasClass(ClassName.CLOSED)) {
|
||||
} else if ($(Selector.BODY).hasClass(ClassName.CLOSED)) {
|
||||
this.expand()
|
||||
}
|
||||
}
|
||||
|
@ -120,26 +118,24 @@ const PushMenu = (($) => {
|
|||
}
|
||||
|
||||
remember() {
|
||||
if(this._options.enableRemember) {
|
||||
let toggleState = localStorage.getItem(`remember${EVENT_KEY}`)
|
||||
if (toggleState == ClassName.COLLAPSED){
|
||||
if (this._options.enableRemember) {
|
||||
const toggleState = localStorage.getItem(`remember${EVENT_KEY}`)
|
||||
if (toggleState === ClassName.COLLAPSED) {
|
||||
if (this._options.noTransitionAfterReload) {
|
||||
$("body").addClass('hold-transition').addClass(ClassName.COLLAPSED).delay(50).queue(function() {
|
||||
$(this).removeClass('hold-transition')
|
||||
$(this).dequeue()
|
||||
})
|
||||
} else {
|
||||
$("body").addClass(ClassName.COLLAPSED)
|
||||
}
|
||||
} else {
|
||||
if (this._options.noTransitionAfterReload) {
|
||||
$("body").addClass('hold-transition').removeClass(ClassName.COLLAPSED).delay(50).queue(function() {
|
||||
$('body').addClass('hold-transition').addClass(ClassName.COLLAPSED).delay(50).queue(function () {
|
||||
$(this).removeClass('hold-transition')
|
||||
$(this).dequeue()
|
||||
})
|
||||
} else {
|
||||
$("body").removeClass(ClassName.COLLAPSED)
|
||||
$('body').addClass(ClassName.COLLAPSED)
|
||||
}
|
||||
} else if (this._options.noTransitionAfterReload) {
|
||||
$('body').addClass('hold-transition').removeClass(ClassName.COLLAPSED).delay(50).queue(function () {
|
||||
$(this).removeClass('hold-transition')
|
||||
$(this).dequeue()
|
||||
})
|
||||
} else {
|
||||
$('body').removeClass(ClassName.COLLAPSED)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -191,7 +187,7 @@ const PushMenu = (($) => {
|
|||
* ====================================================
|
||||
*/
|
||||
|
||||
$(document).on('click', Selector.TOGGLE_BUTTON, (event) => {
|
||||
$(document).on('click', Selector.TOGGLE_BUTTON, event => {
|
||||
event.preventDefault()
|
||||
|
||||
let button = event.currentTarget
|
||||
|
@ -214,7 +210,7 @@ const PushMenu = (($) => {
|
|||
|
||||
$.fn[NAME] = PushMenu._jQueryInterface
|
||||
$.fn[NAME].Constructor = PushMenu
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT
|
||||
return PushMenu._jQueryInterface
|
||||
}
|
||||
|
|
|
@ -5,24 +5,21 @@
|
|||
* --------------------------------------------
|
||||
*/
|
||||
|
||||
const SiteSearch = (($) => {
|
||||
const SiteSearch = ($ => {
|
||||
/**
|
||||
* Constants
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
const NAME = 'SiteSearch'
|
||||
const DATA_KEY = 'lte.site-search'
|
||||
const EVENT_KEY = `.${DATA_KEY}`
|
||||
const NAME = 'SiteSearch'
|
||||
const DATA_KEY = 'lte.site-search'
|
||||
const JQUERY_NO_CONFLICT = $.fn[NAME]
|
||||
|
||||
const Event = {}
|
||||
|
||||
const Selector = {
|
||||
TOGGLE_BUTTON : '[data-widget="site-search"]',
|
||||
SEARCH_BLOCK : '.site-search-block',
|
||||
TOGGLE_BUTTON: '[data-widget="site-search"]',
|
||||
SEARCH_BLOCK: '.site-search-block',
|
||||
SEARCH_BACKDROP: '.site-search-backdrop',
|
||||
SEARCH_INPUT : '.site-search-block .form-control'
|
||||
SEARCH_INPUT: '.site-search-block .form-control'
|
||||
}
|
||||
|
||||
const ClassName = {
|
||||
|
@ -39,7 +36,6 @@ const SiteSearch = (($) => {
|
|||
*/
|
||||
|
||||
class SiteSearch {
|
||||
|
||||
constructor(_element, _options) {
|
||||
this.element = _element
|
||||
this.options = $.extend({}, Default, _options)
|
||||
|
@ -80,7 +76,7 @@ const SiteSearch = (($) => {
|
|||
}
|
||||
|
||||
if (!/toggle|close/.test(options)) {
|
||||
throw Error(`Undefined method ${options}`)
|
||||
throw new Error(`Undefined method ${options}`)
|
||||
}
|
||||
|
||||
data[options]()
|
||||
|
@ -92,7 +88,7 @@ const SiteSearch = (($) => {
|
|||
* Data API
|
||||
* ====================================================
|
||||
*/
|
||||
$(document).on('click', Selector.TOGGLE_BUTTON, (event) => {
|
||||
$(document).on('click', Selector.TOGGLE_BUTTON, event => {
|
||||
event.preventDefault()
|
||||
|
||||
let button = $(event.currentTarget)
|
||||
|
@ -104,7 +100,7 @@ const SiteSearch = (($) => {
|
|||
SiteSearch._jQueryInterface.call(button, 'toggle')
|
||||
})
|
||||
|
||||
$(document).on('click', Selector.SEARCH_BACKDROP, (event) => {
|
||||
$(document).on('click', Selector.SEARCH_BACKDROP, event => {
|
||||
const backdrop = $(event.currentTarget)
|
||||
SiteSearch._jQueryInterface.call(backdrop, 'close')
|
||||
})
|
||||
|
@ -116,7 +112,7 @@ const SiteSearch = (($) => {
|
|||
|
||||
$.fn[NAME] = SiteSearch._jQueryInterface
|
||||
$.fn[NAME].Constructor = SiteSearch
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT
|
||||
return SiteSearch._jQueryInterface
|
||||
}
|
||||
|
|
|
@ -5,51 +5,42 @@
|
|||
* --------------------------------------------
|
||||
*/
|
||||
|
||||
const Toasts = (($) => {
|
||||
const Toasts = ($ => {
|
||||
/**
|
||||
* Constants
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
const NAME = 'Toasts'
|
||||
const DATA_KEY = 'lte.toasts'
|
||||
const EVENT_KEY = `.${DATA_KEY}`
|
||||
const NAME = 'Toasts'
|
||||
const DATA_KEY = 'lte.toasts'
|
||||
const EVENT_KEY = `.${DATA_KEY}`
|
||||
const JQUERY_NO_CONFLICT = $.fn[NAME]
|
||||
|
||||
const Event = {
|
||||
INIT: `init${EVENT_KEY}`,
|
||||
CREATED: `created${EVENT_KEY}`,
|
||||
REMOVED: `removed${EVENT_KEY}`,
|
||||
REMOVED: `removed${EVENT_KEY}`
|
||||
}
|
||||
|
||||
const Selector = {
|
||||
BODY: 'toast-body',
|
||||
CONTAINER_TOP_RIGHT: '#toastsContainerTopRight',
|
||||
CONTAINER_TOP_LEFT: '#toastsContainerTopLeft',
|
||||
CONTAINER_BOTTOM_RIGHT: '#toastsContainerBottomRight',
|
||||
CONTAINER_BOTTOM_LEFT: '#toastsContainerBottomLeft',
|
||||
CONTAINER_BOTTOM_LEFT: '#toastsContainerBottomLeft'
|
||||
}
|
||||
|
||||
const ClassName = {
|
||||
TOP_RIGHT: 'toasts-top-right',
|
||||
TOP_LEFT: 'toasts-top-left',
|
||||
BOTTOM_RIGHT: 'toasts-bottom-right',
|
||||
BOTTOM_LEFT: 'toasts-bottom-left',
|
||||
FADE: 'fade',
|
||||
BOTTOM_LEFT: 'toasts-bottom-left'
|
||||
}
|
||||
|
||||
const Position = {
|
||||
TOP_RIGHT: 'topRight',
|
||||
TOP_LEFT: 'topLeft',
|
||||
BOTTOM_RIGHT: 'bottomRight',
|
||||
BOTTOM_LEFT: 'bottomLeft',
|
||||
}
|
||||
|
||||
const Id = {
|
||||
CONTAINER_TOP_RIGHT: 'toastsContainerTopRight',
|
||||
CONTAINER_TOP_LEFT: 'toastsContainerTopLeft',
|
||||
CONTAINER_BOTTOM_RIGHT: 'toastsContainerBottomRight',
|
||||
CONTAINER_BOTTOM_LEFT: 'toastsContainerBottomLeft',
|
||||
BOTTOM_LEFT: 'bottomLeft'
|
||||
}
|
||||
|
||||
const Default = {
|
||||
|
@ -67,7 +58,7 @@ const Toasts = (($) => {
|
|||
subtitle: null,
|
||||
close: true,
|
||||
body: null,
|
||||
class: null,
|
||||
class: null
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -76,9 +67,9 @@ const Toasts = (($) => {
|
|||
*/
|
||||
class Toasts {
|
||||
constructor(element, config) {
|
||||
this._config = config
|
||||
this._config = config
|
||||
|
||||
this._prepareContainer();
|
||||
this._prepareContainer()
|
||||
|
||||
const initEvent = $.Event(Event.INIT)
|
||||
$('body').trigger(initEvent)
|
||||
|
@ -87,11 +78,11 @@ const Toasts = (($) => {
|
|||
// Public
|
||||
|
||||
create() {
|
||||
var toast = $('<div class="toast" role="alert" aria-live="assertive" aria-atomic="true"/>')
|
||||
const toast = $('<div class="toast" role="alert" aria-live="assertive" aria-atomic="true"/>')
|
||||
|
||||
toast.data('autohide', this._config.autohide)
|
||||
toast.data('animation', this._config.fade)
|
||||
|
||||
|
||||
if (this._config.class) {
|
||||
toast.addClass(this._config.class)
|
||||
}
|
||||
|
@ -100,41 +91,41 @@ const Toasts = (($) => {
|
|||
toast.data('delay', this._config.delay)
|
||||
}
|
||||
|
||||
var toast_header = $('<div class="toast-header">')
|
||||
const toastHeader = $('<div class="toast-header">')
|
||||
|
||||
if (this._config.image != null) {
|
||||
var toast_image = $('<img />').addClass('rounded mr-2').attr('src', this._config.image).attr('alt', this._config.imageAlt)
|
||||
|
||||
const toastImage = $('<img />').addClass('rounded mr-2').attr('src', this._config.image).attr('alt', this._config.imageAlt)
|
||||
|
||||
if (this._config.imageHeight != null) {
|
||||
toast_image.height(this._config.imageHeight).width('auto')
|
||||
toastImage.height(this._config.imageHeight).width('auto')
|
||||
}
|
||||
|
||||
toast_header.append(toast_image)
|
||||
toastHeader.append(toastImage)
|
||||
}
|
||||
|
||||
if (this._config.icon != null) {
|
||||
toast_header.append($('<i />').addClass('mr-2').addClass(this._config.icon))
|
||||
toastHeader.append($('<i />').addClass('mr-2').addClass(this._config.icon))
|
||||
}
|
||||
|
||||
if (this._config.title != null) {
|
||||
toast_header.append($('<strong />').addClass('mr-auto').html(this._config.title))
|
||||
toastHeader.append($('<strong />').addClass('mr-auto').html(this._config.title))
|
||||
}
|
||||
|
||||
if (this._config.subtitle != null) {
|
||||
toast_header.append($('<small />').html(this._config.subtitle))
|
||||
toastHeader.append($('<small />').html(this._config.subtitle))
|
||||
}
|
||||
|
||||
if (this._config.close == true) {
|
||||
var toast_close = $('<button data-dismiss="toast" />').attr('type', 'button').addClass('ml-2 mb-1 close').attr('aria-label', 'Close').append('<span aria-hidden="true">×</span>')
|
||||
|
||||
const toastClose = $('<button data-dismiss="toast" />').attr('type', 'button').addClass('ml-2 mb-1 close').attr('aria-label', 'Close').append('<span aria-hidden="true">×</span>')
|
||||
|
||||
if (this._config.title == null) {
|
||||
toast_close.toggleClass('ml-2 ml-auto')
|
||||
toastClose.toggleClass('ml-2 ml-auto')
|
||||
}
|
||||
|
||||
toast_header.append(toast_close)
|
||||
|
||||
toastHeader.append(toastClose)
|
||||
}
|
||||
|
||||
toast.append(toast_header)
|
||||
toast.append(toastHeader)
|
||||
|
||||
if (this._config.body != null) {
|
||||
toast.append($('<div class="toast-body" />').html(this._config.body))
|
||||
|
@ -147,36 +138,39 @@ const Toasts = (($) => {
|
|||
|
||||
toast.toast('show')
|
||||
|
||||
|
||||
if (this._config.autoremove) {
|
||||
toast.on('hidden.bs.toast', function () {
|
||||
$(this).delay(200).remove();
|
||||
$(this).delay(200).remove()
|
||||
|
||||
const removedEvent = $.Event(Event.REMOVED)
|
||||
$('body').trigger(removedEvent)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// Static
|
||||
|
||||
_getContainerId() {
|
||||
if (this._config.position == Position.TOP_RIGHT) {
|
||||
return Selector.CONTAINER_TOP_RIGHT;
|
||||
} else if (this._config.position == Position.TOP_LEFT) {
|
||||
return Selector.CONTAINER_TOP_LEFT;
|
||||
} else if (this._config.position == Position.BOTTOM_RIGHT) {
|
||||
return Selector.CONTAINER_BOTTOM_RIGHT;
|
||||
} else if (this._config.position == Position.BOTTOM_LEFT) {
|
||||
return Selector.CONTAINER_BOTTOM_LEFT;
|
||||
return Selector.CONTAINER_TOP_RIGHT
|
||||
}
|
||||
|
||||
if (this._config.position == Position.TOP_LEFT) {
|
||||
return Selector.CONTAINER_TOP_LEFT
|
||||
}
|
||||
|
||||
if (this._config.position == Position.BOTTOM_RIGHT) {
|
||||
return Selector.CONTAINER_BOTTOM_RIGHT
|
||||
}
|
||||
|
||||
if (this._config.position == Position.BOTTOM_LEFT) {
|
||||
return Selector.CONTAINER_BOTTOM_LEFT
|
||||
}
|
||||
}
|
||||
|
||||
_prepareContainer() {
|
||||
if ($(this._getContainerId()).length === 0) {
|
||||
var container = $('<div />').attr('id', this._getContainerId().replace('#', ''))
|
||||
const container = $('<div />').attr('id', this._getContainerId().replace('#', ''))
|
||||
if (this._config.position == Position.TOP_RIGHT) {
|
||||
container.addClass(ClassName.TOP_RIGHT)
|
||||
} else if (this._config.position == Position.TOP_LEFT) {
|
||||
|
@ -202,7 +196,7 @@ const Toasts = (($) => {
|
|||
static _jQueryInterface(option, config) {
|
||||
return this.each(function () {
|
||||
const _options = $.extend({}, Default, config)
|
||||
var toast = new Toasts($(this), _options)
|
||||
const toast = new Toasts($(this), _options)
|
||||
|
||||
if (option === 'create') {
|
||||
toast[option]()
|
||||
|
@ -218,7 +212,7 @@ const Toasts = (($) => {
|
|||
|
||||
$.fn[NAME] = Toasts._jQueryInterface
|
||||
$.fn[NAME].Constructor = Toasts
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT
|
||||
return Toasts._jQueryInterface
|
||||
}
|
||||
|
|
|
@ -5,15 +5,14 @@
|
|||
* --------------------------------------------
|
||||
*/
|
||||
|
||||
const TodoList = (($) => {
|
||||
const TodoList = ($ => {
|
||||
/**
|
||||
* Constants
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
const NAME = 'TodoList'
|
||||
const DATA_KEY = 'lte.todolist'
|
||||
const EVENT_KEY = `.${DATA_KEY}`
|
||||
const NAME = 'TodoList'
|
||||
const DATA_KEY = 'lte.todolist'
|
||||
const JQUERY_NO_CONFLICT = $.fn[NAME]
|
||||
|
||||
const Selector = {
|
||||
|
@ -25,11 +24,11 @@ const TodoList = (($) => {
|
|||
}
|
||||
|
||||
const Default = {
|
||||
onCheck: function (item) {
|
||||
return item;
|
||||
onCheck(item) {
|
||||
return item
|
||||
},
|
||||
onUnCheck: function (item) {
|
||||
return item;
|
||||
onUnCheck(item) {
|
||||
return item
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -40,7 +39,7 @@ const TodoList = (($) => {
|
|||
|
||||
class TodoList {
|
||||
constructor(element, config) {
|
||||
this._config = config
|
||||
this._config = config
|
||||
this._element = element
|
||||
|
||||
this._init()
|
||||
|
@ -49,29 +48,29 @@ const TodoList = (($) => {
|
|||
// Public
|
||||
|
||||
toggle(item) {
|
||||
item.parents('li').toggleClass(ClassName.TODO_LIST_DONE);
|
||||
if (! $(item).prop('checked')) {
|
||||
this.unCheck($(item));
|
||||
return;
|
||||
item.parents('li').toggleClass(ClassName.TODO_LIST_DONE)
|
||||
if (!$(item).prop('checked')) {
|
||||
this.unCheck($(item))
|
||||
return
|
||||
}
|
||||
|
||||
this.check(item);
|
||||
this.check(item)
|
||||
}
|
||||
|
||||
check (item) {
|
||||
this._config.onCheck.call(item);
|
||||
check(item) {
|
||||
this._config.onCheck.call(item)
|
||||
}
|
||||
|
||||
unCheck (item) {
|
||||
this._config.onUnCheck.call(item);
|
||||
unCheck(item) {
|
||||
this._config.onUnCheck.call(item)
|
||||
}
|
||||
|
||||
// Private
|
||||
|
||||
_init() {
|
||||
var that = this
|
||||
const that = this
|
||||
$(Selector.DATA_TOGGLE).find('input:checkbox:checked').parents('li').toggleClass(ClassName.TODO_LIST_DONE)
|
||||
$(Selector.DATA_TOGGLE).on('change', 'input:checkbox', (event) => {
|
||||
$(Selector.DATA_TOGGLE).on('change', 'input:checkbox', event => {
|
||||
that.toggle($(event.target))
|
||||
})
|
||||
}
|
||||
|
|
|
@ -5,45 +5,41 @@
|
|||
* --------------------------------------------
|
||||
*/
|
||||
|
||||
const Treeview = (($) => {
|
||||
const Treeview = ($ => {
|
||||
/**
|
||||
* Constants
|
||||
* ====================================================
|
||||
*/
|
||||
|
||||
const NAME = 'Treeview'
|
||||
const DATA_KEY = 'lte.treeview'
|
||||
const EVENT_KEY = `.${DATA_KEY}`
|
||||
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}`,
|
||||
EXPANDED : `expanded${EVENT_KEY}`,
|
||||
COLLAPSED : `collapsed${EVENT_KEY}`,
|
||||
EXPANDED: `expanded${EVENT_KEY}`,
|
||||
COLLAPSED: `collapsed${EVENT_KEY}`,
|
||||
LOAD_DATA_API: `load${EVENT_KEY}`
|
||||
}
|
||||
|
||||
const Selector = {
|
||||
LI : '.nav-item',
|
||||
LINK : '.nav-link',
|
||||
LI: '.nav-item',
|
||||
LINK: '.nav-link',
|
||||
TREEVIEW_MENU: '.nav-treeview',
|
||||
OPEN : '.menu-open',
|
||||
DATA_WIDGET : '[data-widget="treeview"]'
|
||||
OPEN: '.menu-open',
|
||||
DATA_WIDGET: '[data-widget="treeview"]'
|
||||
}
|
||||
|
||||
const ClassName = {
|
||||
LI : 'nav-item',
|
||||
LINK : 'nav-link',
|
||||
TREEVIEW_MENU : 'nav-treeview',
|
||||
OPEN : 'menu-open',
|
||||
OPEN: 'menu-open',
|
||||
SIDEBAR_COLLAPSED: 'sidebar-collapse'
|
||||
}
|
||||
|
||||
const Default = {
|
||||
trigger : `${Selector.DATA_WIDGET} ${Selector.LINK}`,
|
||||
animationSpeed : 300,
|
||||
accordion : true,
|
||||
expandSidebar : false,
|
||||
trigger: `${Selector.DATA_WIDGET} ${Selector.LINK}`,
|
||||
animationSpeed: 300,
|
||||
accordion: true,
|
||||
expandSidebar: false,
|
||||
sidebarButtonSelector: '[data-widget="pushmenu"]'
|
||||
}
|
||||
|
||||
|
@ -53,7 +49,7 @@ const Treeview = (($) => {
|
|||
*/
|
||||
class Treeview {
|
||||
constructor(element, config) {
|
||||
this._config = config
|
||||
this._config = config
|
||||
this._element = element
|
||||
}
|
||||
|
||||
|
@ -67,7 +63,7 @@ const Treeview = (($) => {
|
|||
const expandedEvent = $.Event(Event.EXPANDED)
|
||||
|
||||
if (this._config.accordion) {
|
||||
const openMenuLi = parentLi.siblings(Selector.OPEN).first()
|
||||
const openMenuLi = parentLi.siblings(Selector.OPEN).first()
|
||||
const openTreeview = openMenuLi.find(Selector.TREEVIEW_MENU).first()
|
||||
this.collapse(openTreeview, openMenuLi)
|
||||
}
|
||||
|
@ -94,14 +90,12 @@ const Treeview = (($) => {
|
|||
}
|
||||
|
||||
toggle(event) {
|
||||
|
||||
const $relativeTarget = $(event.currentTarget)
|
||||
const $parent = $relativeTarget.parent()
|
||||
|
||||
let treeviewMenu = $parent.find('> ' + Selector.TREEVIEW_MENU)
|
||||
|
||||
if (!treeviewMenu.is(Selector.TREEVIEW_MENU)) {
|
||||
|
||||
if (!$parent.is(Selector.LI)) {
|
||||
treeviewMenu = $parent.parent().find('> ' + Selector.TREEVIEW_MENU)
|
||||
}
|
||||
|
@ -110,11 +104,11 @@ const Treeview = (($) => {
|
|||
return
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
event.preventDefault()
|
||||
|
||||
const parentLi = $relativeTarget.parents(Selector.LI).first()
|
||||
const isOpen = parentLi.hasClass(ClassName.OPEN)
|
||||
const isOpen = parentLi.hasClass(ClassName.OPEN)
|
||||
|
||||
if (isOpen) {
|
||||
this.collapse($(treeviewMenu), parentLi)
|
||||
|
@ -126,7 +120,7 @@ const Treeview = (($) => {
|
|||
// Private
|
||||
|
||||
_setupListeners() {
|
||||
$(document).on('click', this._config.trigger, (event) => {
|
||||
$(document).on('click', this._config.trigger, event => {
|
||||
this.toggle(event)
|
||||
})
|
||||
}
|
||||
|
@ -174,7 +168,7 @@ const Treeview = (($) => {
|
|||
|
||||
$.fn[NAME] = Treeview._jQueryInterface
|
||||
$.fn[NAME].Constructor = Treeview
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT
|
||||
return Treeview._jQueryInterface
|
||||
}
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"env": {
|
||||
"browser": false,
|
||||
"node": true
|
||||
},
|
||||
"parserOptions": {
|
||||
"sourceType": "script"
|
||||
},
|
||||
"extends": "../../.eslintrc.json",
|
||||
"rules": {
|
||||
"no-console": "off",
|
||||
"strict": "error"
|
||||
}
|
||||
}
|
|
@ -1,45 +1,47 @@
|
|||
'use strict'
|
||||
|
||||
const Plugins = [
|
||||
// AdminLTE Dist
|
||||
{
|
||||
from: 'dist/css/',
|
||||
to : 'docs/assets/css/'
|
||||
to: 'docs/assets/css/'
|
||||
},
|
||||
{
|
||||
from: 'dist/js/',
|
||||
to : 'docs/assets/js/'
|
||||
to: 'docs/assets/js/'
|
||||
},
|
||||
// jQuery
|
||||
{
|
||||
from: 'node_modules/jquery/dist/',
|
||||
to : 'docs/assets/plugins/jquery/'
|
||||
to: 'docs/assets/plugins/jquery/'
|
||||
},
|
||||
// Popper
|
||||
{
|
||||
from: 'node_modules/popper.js/dist/',
|
||||
to : 'docs/assets/plugins/popper/'
|
||||
to: 'docs/assets/plugins/popper/'
|
||||
},
|
||||
// Bootstrap
|
||||
{
|
||||
from: 'node_modules/bootstrap/dist/js/',
|
||||
to : 'docs/assets/plugins/bootstrap/js/'
|
||||
to: 'docs/assets/plugins/bootstrap/js/'
|
||||
},
|
||||
// Font Awesome
|
||||
{
|
||||
from: 'node_modules/@fortawesome/fontawesome-free/css/',
|
||||
to : 'docs/assets/plugins/fontawesome-free/css/'
|
||||
to: 'docs/assets/plugins/fontawesome-free/css/'
|
||||
},
|
||||
{
|
||||
from: 'node_modules/@fortawesome/fontawesome-free/webfonts/',
|
||||
to : 'docs/assets/plugins/fontawesome-free/webfonts/'
|
||||
to: 'docs/assets/plugins/fontawesome-free/webfonts/'
|
||||
},
|
||||
// overlayScrollbars
|
||||
{
|
||||
from: 'node_modules/overlayscrollbars/js/',
|
||||
to : 'docs/assets/plugins/overlayScrollbars/js/'
|
||||
to: 'docs/assets/plugins/overlayScrollbars/js/'
|
||||
},
|
||||
{
|
||||
from: 'node_modules/overlayscrollbars/css/',
|
||||
to : 'docs/assets/plugins/overlayScrollbars/css/'
|
||||
to: 'docs/assets/plugins/overlayScrollbars/css/'
|
||||
}
|
||||
]
|
||||
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
'use strict'
|
||||
|
||||
const path = require('path')
|
||||
const fse = require('fs-extra')
|
||||
const Plugins = require('./DocsPlugins')
|
||||
const fse = require('fs-extra')
|
||||
|
||||
class Publish {
|
||||
constructor() {
|
||||
|
@ -12,7 +15,7 @@ class Publish {
|
|||
|
||||
getArguments() {
|
||||
if (process.argv.length > 2) {
|
||||
let arg = process.argv[2]
|
||||
const arg = process.argv[2]
|
||||
switch (arg) {
|
||||
case '-v':
|
||||
case '--verbose':
|
||||
|
@ -26,15 +29,20 @@ class Publish {
|
|||
|
||||
run() {
|
||||
// Publish files
|
||||
Plugins.forEach((module) => {
|
||||
Plugins.forEach(module => {
|
||||
try {
|
||||
fse.copySync(module.from, module.to)
|
||||
fse.copySync(module.from, module.to, {
|
||||
// Skip copying dot files
|
||||
filter(src) {
|
||||
return !path.basename(src).startsWith('.')
|
||||
}
|
||||
})
|
||||
|
||||
if (this.options.verbose) {
|
||||
console.log(`Copied ${module.from} to ${module.to}`)
|
||||
}
|
||||
} catch (err) {
|
||||
console.error(`Error: ${err}`)
|
||||
} catch (error) {
|
||||
console.error(`Error: ${error}`)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
@ -1,102 +1,104 @@
|
|||
'use strict'
|
||||
|
||||
const Plugins = [
|
||||
// jQuery
|
||||
{
|
||||
from: 'node_modules/jquery/dist',
|
||||
to : 'plugins/jquery'
|
||||
to: 'plugins/jquery'
|
||||
},
|
||||
// Popper
|
||||
{
|
||||
from: 'node_modules/popper.js/dist',
|
||||
to : 'plugins/popper'
|
||||
to: 'plugins/popper'
|
||||
},
|
||||
// Bootstrap
|
||||
{
|
||||
from: 'node_modules/bootstrap/dist/js',
|
||||
to : 'plugins/bootstrap/js'
|
||||
to: 'plugins/bootstrap/js'
|
||||
},
|
||||
// Font Awesome
|
||||
{
|
||||
from: 'node_modules/@fortawesome/fontawesome-free/css',
|
||||
to : 'plugins/fontawesome-free/css'
|
||||
to: 'plugins/fontawesome-free/css'
|
||||
},
|
||||
{
|
||||
from: 'node_modules/@fortawesome/fontawesome-free/webfonts',
|
||||
to : 'plugins/fontawesome-free/webfonts'
|
||||
to: 'plugins/fontawesome-free/webfonts'
|
||||
},
|
||||
// overlayScrollbars
|
||||
{
|
||||
from: 'node_modules/overlayscrollbars/js',
|
||||
to : 'plugins/overlayScrollbars/js'
|
||||
to: 'plugins/overlayScrollbars/js'
|
||||
},
|
||||
{
|
||||
from: 'node_modules/overlayscrollbars/css',
|
||||
to : 'plugins/overlayScrollbars/css'
|
||||
to: 'plugins/overlayScrollbars/css'
|
||||
},
|
||||
// Chart.js
|
||||
{
|
||||
from: 'node_modules/chart.js/dist/',
|
||||
to : 'plugins/chart.js'
|
||||
to: 'plugins/chart.js'
|
||||
},
|
||||
// jQuery UI
|
||||
{
|
||||
from: 'node_modules/jquery-ui-dist/',
|
||||
to : 'plugins/jquery-ui'
|
||||
to: 'plugins/jquery-ui'
|
||||
},
|
||||
// Flot
|
||||
{
|
||||
from: 'node_modules/flot/dist/es5/',
|
||||
to : 'plugins/flot'
|
||||
to: 'plugins/flot'
|
||||
},
|
||||
// Summernote
|
||||
{
|
||||
from: 'node_modules/summernote/dist/',
|
||||
to : 'plugins/summernote'
|
||||
to: 'plugins/summernote'
|
||||
},
|
||||
// Bootstrap Slider
|
||||
{
|
||||
from: 'node_modules/bootstrap-slider/dist/',
|
||||
to : 'plugins/bootstrap-slider'
|
||||
to: 'plugins/bootstrap-slider'
|
||||
},
|
||||
{
|
||||
from: 'node_modules/bootstrap-slider/dist/css',
|
||||
to : 'plugins/bootstrap-slider/css'
|
||||
to: 'plugins/bootstrap-slider/css'
|
||||
},
|
||||
// Bootstrap Colorpicker
|
||||
{
|
||||
from: 'node_modules/bootstrap-colorpicker/dist/js',
|
||||
to : 'plugins/bootstrap-colorpicker/js'
|
||||
to: 'plugins/bootstrap-colorpicker/js'
|
||||
},
|
||||
{
|
||||
from: 'node_modules/bootstrap-colorpicker/dist/css',
|
||||
to : 'plugins/bootstrap-colorpicker/css'
|
||||
to: 'plugins/bootstrap-colorpicker/css'
|
||||
},
|
||||
// Tempusdominus Bootstrap 4
|
||||
{
|
||||
from: 'node_modules/tempusdominus-bootstrap-4/build/js',
|
||||
to : 'plugins/tempusdominus-bootstrap-4/js'
|
||||
to: 'plugins/tempusdominus-bootstrap-4/js'
|
||||
},
|
||||
{
|
||||
from: 'node_modules/tempusdominus-bootstrap-4/build/css',
|
||||
to : 'plugins/tempusdominus-bootstrap-4/css'
|
||||
to: 'plugins/tempusdominus-bootstrap-4/css'
|
||||
},
|
||||
// Moment
|
||||
{
|
||||
from: 'node_modules/moment/min',
|
||||
to : 'plugins/moment'
|
||||
to: 'plugins/moment'
|
||||
},
|
||||
{
|
||||
from: 'node_modules/moment/locale',
|
||||
to : 'plugins/moment/locale'
|
||||
to: 'plugins/moment/locale'
|
||||
},
|
||||
// FastClick
|
||||
{
|
||||
from: 'node_modules/fastclick/lib',
|
||||
to : 'plugins/fastclick'
|
||||
to: 'plugins/fastclick'
|
||||
},
|
||||
// Date Range Picker
|
||||
{
|
||||
from: 'node_modules/daterangepicker/',
|
||||
to : 'plugins/daterangepicker'
|
||||
to: 'plugins/daterangepicker'
|
||||
},
|
||||
// DataTables
|
||||
{
|
||||
|
@ -255,96 +257,96 @@ const Plugins = [
|
|||
// Fullcalendar
|
||||
{
|
||||
from: 'node_modules/@fullcalendar/core/',
|
||||
to : 'plugins/fullcalendar'
|
||||
to: 'plugins/fullcalendar'
|
||||
},
|
||||
{
|
||||
from: 'node_modules/@fullcalendar/bootstrap/',
|
||||
to : 'plugins/fullcalendar-bootstrap'
|
||||
to: 'plugins/fullcalendar-bootstrap'
|
||||
},
|
||||
{
|
||||
from: 'node_modules/@fullcalendar/daygrid/',
|
||||
to : 'plugins/fullcalendar-daygrid'
|
||||
to: 'plugins/fullcalendar-daygrid'
|
||||
},
|
||||
{
|
||||
from: 'node_modules/@fullcalendar/timegrid/',
|
||||
to : 'plugins/fullcalendar-timegrid'
|
||||
to: 'plugins/fullcalendar-timegrid'
|
||||
},
|
||||
{
|
||||
from: 'node_modules/@fullcalendar/interaction/',
|
||||
to : 'plugins/fullcalendar-interaction'
|
||||
to: 'plugins/fullcalendar-interaction'
|
||||
},
|
||||
// icheck bootstrap
|
||||
{
|
||||
from: 'node_modules/icheck-bootstrap/',
|
||||
to : 'plugins/icheck-bootstrap'
|
||||
to: 'plugins/icheck-bootstrap'
|
||||
},
|
||||
// inputmask
|
||||
{
|
||||
from: 'node_modules/inputmask/dist/',
|
||||
to : 'plugins/inputmask'
|
||||
to: 'plugins/inputmask'
|
||||
},
|
||||
// ion-rangeslider
|
||||
{
|
||||
from: 'node_modules/ion-rangeslider/',
|
||||
to : 'plugins/ion-rangeslider'
|
||||
to: 'plugins/ion-rangeslider'
|
||||
},
|
||||
// JQVMap (jqvmap-novulnerability)
|
||||
{
|
||||
from: 'node_modules/jqvmap-novulnerability/dist/',
|
||||
to : 'plugins/jqvmap'
|
||||
to: 'plugins/jqvmap'
|
||||
},
|
||||
// jQuery Mapael
|
||||
{
|
||||
from: 'node_modules/jquery-mapael/js/',
|
||||
to : 'plugins/jquery-mapael'
|
||||
to: 'plugins/jquery-mapael'
|
||||
},
|
||||
// Raphael
|
||||
{
|
||||
from: 'node_modules/raphael/',
|
||||
to : 'plugins/raphael'
|
||||
to: 'plugins/raphael'
|
||||
},
|
||||
// jQuery Mousewheel
|
||||
{
|
||||
from: 'node_modules/jquery-mousewheel/',
|
||||
to : 'plugins/jquery-mousewheel'
|
||||
to: 'plugins/jquery-mousewheel'
|
||||
},
|
||||
// jQuery Knob
|
||||
{
|
||||
from: 'node_modules/jquery-knob-chif/dist/',
|
||||
to : 'plugins/jquery-knob'
|
||||
to: 'plugins/jquery-knob'
|
||||
},
|
||||
// pace-progress
|
||||
{
|
||||
from: 'node_modules/@lgaitan/pace-progress/dist/',
|
||||
to : 'plugins/pace-progress'
|
||||
to: 'plugins/pace-progress'
|
||||
},
|
||||
// Select2
|
||||
{
|
||||
from: 'node_modules/select2/dist/',
|
||||
to : 'plugins/select2'
|
||||
to: 'plugins/select2'
|
||||
},
|
||||
{
|
||||
from: 'node_modules/@ttskch/select2-bootstrap4-theme/dist/',
|
||||
to : 'plugins/select2-bootstrap4-theme'
|
||||
to: 'plugins/select2-bootstrap4-theme'
|
||||
},
|
||||
// Sparklines
|
||||
{
|
||||
from: 'node_modules/sparklines/source/',
|
||||
to : 'plugins/sparklines'
|
||||
to: 'plugins/sparklines'
|
||||
},
|
||||
// SweetAlert2
|
||||
{
|
||||
from: 'node_modules/sweetalert2/dist/',
|
||||
to : 'plugins/sweetalert2'
|
||||
to: 'plugins/sweetalert2'
|
||||
},
|
||||
{
|
||||
from: 'node_modules/@sweetalert2/theme-bootstrap-4/',
|
||||
to : 'plugins/sweetalert2-theme-bootstrap-4'
|
||||
to: 'plugins/sweetalert2-theme-bootstrap-4'
|
||||
},
|
||||
// Toastr
|
||||
{
|
||||
from: 'node_modules/toastr/build/',
|
||||
to : 'plugins/toastr'
|
||||
to: 'plugins/toastr'
|
||||
},
|
||||
// jsGrid
|
||||
{
|
||||
|
@ -387,13 +389,13 @@ const Plugins = [
|
|||
// jQuery Validate
|
||||
{
|
||||
from: 'node_modules/jquery-validation/dist/',
|
||||
to : 'plugins/jquery-validation'
|
||||
to: 'plugins/jquery-validation'
|
||||
},
|
||||
// bs-custom-file-input
|
||||
{
|
||||
from: 'node_modules/bs-custom-file-input/dist/',
|
||||
to : 'plugins/bs-custom-file-input'
|
||||
},
|
||||
to: 'plugins/bs-custom-file-input'
|
||||
}
|
||||
]
|
||||
|
||||
module.exports = Plugins
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
'use strict'
|
||||
|
||||
const path = require('path')
|
||||
const fse = require('fs-extra')
|
||||
const Plugins = require('./Plugins')
|
||||
const fse = require('fs-extra')
|
||||
|
||||
class Publish {
|
||||
constructor() {
|
||||
|
@ -12,7 +15,7 @@ class Publish {
|
|||
|
||||
getArguments() {
|
||||
if (process.argv.length > 2) {
|
||||
let arg = process.argv[2]
|
||||
const arg = process.argv[2]
|
||||
switch (arg) {
|
||||
case '-v':
|
||||
case '--verbose':
|
||||
|
@ -26,19 +29,26 @@ class Publish {
|
|||
|
||||
run() {
|
||||
// Publish files
|
||||
Plugins.forEach((module) => {
|
||||
Plugins.forEach(module => {
|
||||
const fseOptions = {
|
||||
// Skip copying dot files
|
||||
filter(src) {
|
||||
return !path.basename(src).startsWith('.')
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
if (fse.existsSync(module.from)) {
|
||||
fse.copySync(module.from, module.to)
|
||||
fse.copySync(module.from, module.to, fseOptions)
|
||||
} else {
|
||||
fse.copySync(module.from.replace('node_modules/', '../'), module.to)
|
||||
fse.copySync(module.from.replace('node_modules/', '../'), module.to, fseOptions)
|
||||
}
|
||||
|
||||
if (this.options.verbose) {
|
||||
console.log(`Copied ${module.from} to ${module.to}`)
|
||||
}
|
||||
} catch (err) {
|
||||
console.error(`Error: ${err}`)
|
||||
} catch (error) {
|
||||
console.error(`Error: ${error}`)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
@ -0,0 +1,46 @@
|
|||
{
|
||||
"root": true,
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 5,
|
||||
"sourceType": "script"
|
||||
},
|
||||
"env": {
|
||||
"jquery": true
|
||||
},
|
||||
"extends": [
|
||||
"plugin:unicorn/recommended",
|
||||
"xo",
|
||||
"xo/browser"
|
||||
],
|
||||
"rules": {
|
||||
"capitalized-comments": "off",
|
||||
"indent": [
|
||||
"error",
|
||||
2,
|
||||
{
|
||||
"MemberExpression": "off",
|
||||
"SwitchCase": 1
|
||||
}
|
||||
],
|
||||
"multiline-ternary": [
|
||||
"error",
|
||||
"always-multiline"
|
||||
],
|
||||
"object-curly-spacing": [
|
||||
"error",
|
||||
"always"
|
||||
],
|
||||
"semi": [
|
||||
"error",
|
||||
"never"
|
||||
],
|
||||
"strict": "error",
|
||||
"unicorn/no-for-loop": "off",
|
||||
"unicorn/no-null": "off",
|
||||
"unicorn/prefer-dataset": "off",
|
||||
"unicorn/prefer-includes": "off",
|
||||
"unicorn/prefer-node-append": "off",
|
||||
"unicorn/prefer-query-selector": "off",
|
||||
"unicorn/prevent-abbreviations": "off"
|
||||
}
|
||||
}
|
|
@ -4,10 +4,13 @@
|
|||
* You should not use this file in production.
|
||||
* This file is for demo purposes only.
|
||||
*/
|
||||
|
||||
/* eslint-disable camelcase */
|
||||
|
||||
(function ($) {
|
||||
'use strict'
|
||||
|
||||
var $sidebar = $('.control-sidebar')
|
||||
var $sidebar = $('.control-sidebar')
|
||||
var $container = $('<div />', {
|
||||
class: 'p-3 control-sidebar-content'
|
||||
})
|
||||
|
@ -29,14 +32,14 @@
|
|||
'navbar-cyan',
|
||||
'navbar-dark',
|
||||
'navbar-gray-dark',
|
||||
'navbar-gray',
|
||||
'navbar-gray'
|
||||
]
|
||||
|
||||
var navbar_light_skins = [
|
||||
'navbar-light',
|
||||
'navbar-warning',
|
||||
'navbar-white',
|
||||
'navbar-orange',
|
||||
'navbar-orange'
|
||||
]
|
||||
|
||||
$container.append(
|
||||
|
@ -44,10 +47,10 @@
|
|||
)
|
||||
|
||||
var $no_border_checkbox = $('<input />', {
|
||||
type : 'checkbox',
|
||||
value : 1,
|
||||
type: 'checkbox',
|
||||
value: 1,
|
||||
checked: $('.main-header').hasClass('border-bottom-0'),
|
||||
'class': 'mr-1'
|
||||
class: 'mr-1'
|
||||
}).on('click', function () {
|
||||
if ($(this).is(':checked')) {
|
||||
$('.main-header').addClass('border-bottom-0')
|
||||
|
@ -55,14 +58,14 @@
|
|||
$('.main-header').removeClass('border-bottom-0')
|
||||
}
|
||||
})
|
||||
var $no_border_container = $('<div />', {'class': 'mb-1'}).append($no_border_checkbox).append('<span>No Navbar border</span>')
|
||||
var $no_border_container = $('<div />', { class: 'mb-1' }).append($no_border_checkbox).append('<span>No Navbar border</span>')
|
||||
$container.append($no_border_container)
|
||||
|
||||
var $text_sm_body_checkbox = $('<input />', {
|
||||
type : 'checkbox',
|
||||
value : 1,
|
||||
type: 'checkbox',
|
||||
value: 1,
|
||||
checked: $('body').hasClass('text-sm'),
|
||||
'class': 'mr-1'
|
||||
class: 'mr-1'
|
||||
}).on('click', function () {
|
||||
if ($(this).is(':checked')) {
|
||||
$('body').addClass('text-sm')
|
||||
|
@ -70,14 +73,14 @@
|
|||
$('body').removeClass('text-sm')
|
||||
}
|
||||
})
|
||||
var $text_sm_body_container = $('<div />', {'class': 'mb-1'}).append($text_sm_body_checkbox).append('<span>Body small text</span>')
|
||||
var $text_sm_body_container = $('<div />', { class: 'mb-1' }).append($text_sm_body_checkbox).append('<span>Body small text</span>')
|
||||
$container.append($text_sm_body_container)
|
||||
|
||||
var $text_sm_header_checkbox = $('<input />', {
|
||||
type : 'checkbox',
|
||||
value : 1,
|
||||
type: 'checkbox',
|
||||
value: 1,
|
||||
checked: $('.main-header').hasClass('text-sm'),
|
||||
'class': 'mr-1'
|
||||
class: 'mr-1'
|
||||
}).on('click', function () {
|
||||
if ($(this).is(':checked')) {
|
||||
$('.main-header').addClass('text-sm')
|
||||
|
@ -85,14 +88,14 @@
|
|||
$('.main-header').removeClass('text-sm')
|
||||
}
|
||||
})
|
||||
var $text_sm_header_container = $('<div />', {'class': 'mb-1'}).append($text_sm_header_checkbox).append('<span>Navbar small text</span>')
|
||||
var $text_sm_header_container = $('<div />', { class: 'mb-1' }).append($text_sm_header_checkbox).append('<span>Navbar small text</span>')
|
||||
$container.append($text_sm_header_container)
|
||||
|
||||
var $text_sm_sidebar_checkbox = $('<input />', {
|
||||
type : 'checkbox',
|
||||
value : 1,
|
||||
type: 'checkbox',
|
||||
value: 1,
|
||||
checked: $('.nav-sidebar').hasClass('text-sm'),
|
||||
'class': 'mr-1'
|
||||
class: 'mr-1'
|
||||
}).on('click', function () {
|
||||
if ($(this).is(':checked')) {
|
||||
$('.nav-sidebar').addClass('text-sm')
|
||||
|
@ -100,14 +103,14 @@
|
|||
$('.nav-sidebar').removeClass('text-sm')
|
||||
}
|
||||
})
|
||||
var $text_sm_sidebar_container = $('<div />', {'class': 'mb-1'}).append($text_sm_sidebar_checkbox).append('<span>Sidebar nav small text</span>')
|
||||
var $text_sm_sidebar_container = $('<div />', { class: 'mb-1' }).append($text_sm_sidebar_checkbox).append('<span>Sidebar nav small text</span>')
|
||||
$container.append($text_sm_sidebar_container)
|
||||
|
||||
var $text_sm_footer_checkbox = $('<input />', {
|
||||
type : 'checkbox',
|
||||
value : 1,
|
||||
type: 'checkbox',
|
||||
value: 1,
|
||||
checked: $('.main-footer').hasClass('text-sm'),
|
||||
'class': 'mr-1'
|
||||
class: 'mr-1'
|
||||
}).on('click', function () {
|
||||
if ($(this).is(':checked')) {
|
||||
$('.main-footer').addClass('text-sm')
|
||||
|
@ -115,14 +118,14 @@
|
|||
$('.main-footer').removeClass('text-sm')
|
||||
}
|
||||
})
|
||||
var $text_sm_footer_container = $('<div />', {'class': 'mb-1'}).append($text_sm_footer_checkbox).append('<span>Footer small text</span>')
|
||||
var $text_sm_footer_container = $('<div />', { class: 'mb-1' }).append($text_sm_footer_checkbox).append('<span>Footer small text</span>')
|
||||
$container.append($text_sm_footer_container)
|
||||
|
||||
var $flat_sidebar_checkbox = $('<input />', {
|
||||
type : 'checkbox',
|
||||
value : 1,
|
||||
type: 'checkbox',
|
||||
value: 1,
|
||||
checked: $('.nav-sidebar').hasClass('nav-flat'),
|
||||
'class': 'mr-1'
|
||||
class: 'mr-1'
|
||||
}).on('click', function () {
|
||||
if ($(this).is(':checked')) {
|
||||
$('.nav-sidebar').addClass('nav-flat')
|
||||
|
@ -130,14 +133,14 @@
|
|||
$('.nav-sidebar').removeClass('nav-flat')
|
||||
}
|
||||
})
|
||||
var $flat_sidebar_container = $('<div />', {'class': 'mb-1'}).append($flat_sidebar_checkbox).append('<span>Sidebar nav flat style</span>')
|
||||
var $flat_sidebar_container = $('<div />', { class: 'mb-1' }).append($flat_sidebar_checkbox).append('<span>Sidebar nav flat style</span>')
|
||||
$container.append($flat_sidebar_container)
|
||||
|
||||
var $legacy_sidebar_checkbox = $('<input />', {
|
||||
type : 'checkbox',
|
||||
value : 1,
|
||||
type: 'checkbox',
|
||||
value: 1,
|
||||
checked: $('.nav-sidebar').hasClass('nav-legacy'),
|
||||
'class': 'mr-1'
|
||||
class: 'mr-1'
|
||||
}).on('click', function () {
|
||||
if ($(this).is(':checked')) {
|
||||
$('.nav-sidebar').addClass('nav-legacy')
|
||||
|
@ -145,14 +148,14 @@
|
|||
$('.nav-sidebar').removeClass('nav-legacy')
|
||||
}
|
||||
})
|
||||
var $legacy_sidebar_container = $('<div />', {'class': 'mb-1'}).append($legacy_sidebar_checkbox).append('<span>Sidebar nav legacy style</span>')
|
||||
var $legacy_sidebar_container = $('<div />', { class: 'mb-1' }).append($legacy_sidebar_checkbox).append('<span>Sidebar nav legacy style</span>')
|
||||
$container.append($legacy_sidebar_container)
|
||||
|
||||
var $compact_sidebar_checkbox = $('<input />', {
|
||||
type : 'checkbox',
|
||||
value : 1,
|
||||
type: 'checkbox',
|
||||
value: 1,
|
||||
checked: $('.nav-sidebar').hasClass('nav-compact'),
|
||||
'class': 'mr-1'
|
||||
class: 'mr-1'
|
||||
}).on('click', function () {
|
||||
if ($(this).is(':checked')) {
|
||||
$('.nav-sidebar').addClass('nav-compact')
|
||||
|
@ -160,14 +163,14 @@
|
|||
$('.nav-sidebar').removeClass('nav-compact')
|
||||
}
|
||||
})
|
||||
var $compact_sidebar_container = $('<div />', {'class': 'mb-1'}).append($compact_sidebar_checkbox).append('<span>Sidebar nav compact</span>')
|
||||
var $compact_sidebar_container = $('<div />', { class: 'mb-1' }).append($compact_sidebar_checkbox).append('<span>Sidebar nav compact</span>')
|
||||
$container.append($compact_sidebar_container)
|
||||
|
||||
var $child_indent_sidebar_checkbox = $('<input />', {
|
||||
type : 'checkbox',
|
||||
value : 1,
|
||||
type: 'checkbox',
|
||||
value: 1,
|
||||
checked: $('.nav-sidebar').hasClass('nav-child-indent'),
|
||||
'class': 'mr-1'
|
||||
class: 'mr-1'
|
||||
}).on('click', function () {
|
||||
if ($(this).is(':checked')) {
|
||||
$('.nav-sidebar').addClass('nav-child-indent')
|
||||
|
@ -175,14 +178,14 @@
|
|||
$('.nav-sidebar').removeClass('nav-child-indent')
|
||||
}
|
||||
})
|
||||
var $child_indent_sidebar_container = $('<div />', {'class': 'mb-1'}).append($child_indent_sidebar_checkbox).append('<span>Sidebar nav child indent</span>')
|
||||
var $child_indent_sidebar_container = $('<div />', { class: 'mb-1' }).append($child_indent_sidebar_checkbox).append('<span>Sidebar nav child indent</span>')
|
||||
$container.append($child_indent_sidebar_container)
|
||||
|
||||
var $no_expand_sidebar_checkbox = $('<input />', {
|
||||
type : 'checkbox',
|
||||
value : 1,
|
||||
type: 'checkbox',
|
||||
value: 1,
|
||||
checked: $('.main-sidebar').hasClass('sidebar-no-expand'),
|
||||
'class': 'mr-1'
|
||||
class: 'mr-1'
|
||||
}).on('click', function () {
|
||||
if ($(this).is(':checked')) {
|
||||
$('.main-sidebar').addClass('sidebar-no-expand')
|
||||
|
@ -190,14 +193,14 @@
|
|||
$('.main-sidebar').removeClass('sidebar-no-expand')
|
||||
}
|
||||
})
|
||||
var $no_expand_sidebar_container = $('<div />', {'class': 'mb-1'}).append($no_expand_sidebar_checkbox).append('<span>Main Sidebar disable hover/focus auto expand</span>')
|
||||
var $no_expand_sidebar_container = $('<div />', { class: 'mb-1' }).append($no_expand_sidebar_checkbox).append('<span>Main Sidebar disable hover/focus auto expand</span>')
|
||||
$container.append($no_expand_sidebar_container)
|
||||
|
||||
var $text_sm_brand_checkbox = $('<input />', {
|
||||
type : 'checkbox',
|
||||
value : 1,
|
||||
type: 'checkbox',
|
||||
value: 1,
|
||||
checked: $('.brand-link').hasClass('text-sm'),
|
||||
'class': 'mr-1'
|
||||
class: 'mr-1'
|
||||
}).on('click', function () {
|
||||
if ($(this).is(':checked')) {
|
||||
$('.brand-link').addClass('text-sm')
|
||||
|
@ -205,20 +208,20 @@
|
|||
$('.brand-link').removeClass('text-sm')
|
||||
}
|
||||
})
|
||||
var $text_sm_brand_container = $('<div />', {'class': 'mb-4'}).append($text_sm_brand_checkbox).append('<span>Brand small text</span>')
|
||||
var $text_sm_brand_container = $('<div />', { class: 'mb-4' }).append($text_sm_brand_checkbox).append('<span>Brand small text</span>')
|
||||
$container.append($text_sm_brand_container)
|
||||
|
||||
$container.append('<h6>Navbar Variants</h6>')
|
||||
|
||||
var $navbar_variants = $('<div />', {
|
||||
'class': 'd-flex'
|
||||
var $navbar_variants = $('<div />', {
|
||||
class: 'd-flex'
|
||||
})
|
||||
var navbar_all_colors = navbar_dark_skins.concat(navbar_light_skins)
|
||||
var $navbar_variants_colors = createSkinBlock(navbar_all_colors, function (e) {
|
||||
var navbar_all_colors = navbar_dark_skins.concat(navbar_light_skins)
|
||||
var $navbar_variants_colors = createSkinBlock(navbar_all_colors, function () {
|
||||
var color = $(this).data('color')
|
||||
var $main_header = $('.main-header')
|
||||
$main_header.removeClass('navbar-dark').removeClass('navbar-light')
|
||||
navbar_all_colors.map(function (color) {
|
||||
navbar_all_colors.forEach(function (color) {
|
||||
$main_header.removeClass(color)
|
||||
})
|
||||
|
||||
|
@ -310,14 +313,14 @@
|
|||
|
||||
$container.append('<h6>Accent Color Variants</h6>')
|
||||
var $accent_variants = $('<div />', {
|
||||
'class': 'd-flex'
|
||||
class: 'd-flex'
|
||||
})
|
||||
$container.append($accent_variants)
|
||||
$container.append(createSkinBlock(accent_colors, function () {
|
||||
var color = $(this).data('color')
|
||||
var color = $(this).data('color')
|
||||
var accent_class = color
|
||||
var $body = $('body')
|
||||
accent_colors.map(function (skin) {
|
||||
var $body = $('body')
|
||||
accent_colors.forEach(function (skin) {
|
||||
$body.removeClass(skin)
|
||||
})
|
||||
|
||||
|
@ -326,14 +329,14 @@
|
|||
|
||||
$container.append('<h6>Dark Sidebar Variants</h6>')
|
||||
var $sidebar_variants_dark = $('<div />', {
|
||||
'class': 'd-flex'
|
||||
class: 'd-flex'
|
||||
})
|
||||
$container.append($sidebar_variants_dark)
|
||||
$container.append(createSkinBlock(sidebar_colors, function () {
|
||||
var color = $(this).data('color')
|
||||
var color = $(this).data('color')
|
||||
var sidebar_class = 'sidebar-dark-' + color.replace('bg-', '')
|
||||
var $sidebar = $('.main-sidebar')
|
||||
sidebar_skins.map(function (skin) {
|
||||
var $sidebar = $('.main-sidebar')
|
||||
sidebar_skins.forEach(function (skin) {
|
||||
$sidebar.removeClass(skin)
|
||||
})
|
||||
|
||||
|
@ -342,14 +345,14 @@
|
|||
|
||||
$container.append('<h6>Light Sidebar Variants</h6>')
|
||||
var $sidebar_variants_light = $('<div />', {
|
||||
'class': 'd-flex'
|
||||
class: 'd-flex'
|
||||
})
|
||||
$container.append($sidebar_variants_light)
|
||||
$container.append(createSkinBlock(sidebar_colors, function () {
|
||||
var color = $(this).data('color')
|
||||
var color = $(this).data('color')
|
||||
var sidebar_class = 'sidebar-light-' + color.replace('bg-', '')
|
||||
var $sidebar = $('.main-sidebar')
|
||||
sidebar_skins.map(function (skin) {
|
||||
var $sidebar = $('.main-sidebar')
|
||||
sidebar_skins.forEach(function (skin) {
|
||||
$sidebar.removeClass(skin)
|
||||
})
|
||||
|
||||
|
@ -359,21 +362,21 @@
|
|||
var logo_skins = navbar_all_colors
|
||||
$container.append('<h6>Brand Logo Variants</h6>')
|
||||
var $logo_variants = $('<div />', {
|
||||
'class': 'd-flex'
|
||||
class: 'd-flex'
|
||||
})
|
||||
$container.append($logo_variants)
|
||||
var $clear_btn = $('<a />', {
|
||||
href: 'javascript:void(0)'
|
||||
}).text('clear').on('click', function () {
|
||||
var $logo = $('.brand-link')
|
||||
logo_skins.map(function (skin) {
|
||||
logo_skins.forEach(function (skin) {
|
||||
$logo.removeClass(skin)
|
||||
})
|
||||
})
|
||||
$container.append(createSkinBlock(logo_skins, function () {
|
||||
var color = $(this).data('color')
|
||||
var $logo = $('.brand-link')
|
||||
logo_skins.map(function (skin) {
|
||||
logo_skins.forEach(function (skin) {
|
||||
$logo.removeClass(skin)
|
||||
})
|
||||
$logo.addClass(color)
|
||||
|
@ -381,12 +384,12 @@
|
|||
|
||||
function createSkinBlock(colors, callback) {
|
||||
var $block = $('<div />', {
|
||||
'class': 'd-flex flex-wrap mb-3'
|
||||
class: 'd-flex flex-wrap mb-3'
|
||||
})
|
||||
|
||||
colors.map(function (color) {
|
||||
colors.forEach(function (color) {
|
||||
var $color = $('<div />', {
|
||||
'class': (typeof color === 'object' ? color.join(' ') : color).replace('navbar-', 'bg-').replace('accent-', 'bg-') + ' elevation-2'
|
||||
class: (typeof color === 'object' ? color.join(' ') : color).replace('navbar-', 'bg-').replace('accent-', 'bg-') + ' elevation-2'
|
||||
})
|
||||
|
||||
$block.append($color)
|
||||
|
@ -394,13 +397,13 @@
|
|||
$color.data('color', color)
|
||||
|
||||
$color.css({
|
||||
width : '40px',
|
||||
height : '20px',
|
||||
width: '40px',
|
||||
height: '20px',
|
||||
borderRadius: '25px',
|
||||
marginRight : 10,
|
||||
marginRight: 10,
|
||||
marginBottom: 10,
|
||||
opacity : 0.8,
|
||||
cursor : 'pointer'
|
||||
opacity: 0.8,
|
||||
cursor: 'pointer'
|
||||
})
|
||||
|
||||
$color.hover(function () {
|
||||
|
@ -417,10 +420,10 @@
|
|||
return $block
|
||||
}
|
||||
|
||||
$('.product-image-thumb').on('click', function() {
|
||||
const image_element = $(this).find('img');
|
||||
$('.product-image-thumb').on('click', function () {
|
||||
var image_element = $(this).find('img')
|
||||
$('.product-image').prop('src', $(image_element).attr('src'))
|
||||
$('.product-image-thumb.active').removeClass('active');
|
||||
$(this).addClass('active');
|
||||
});
|
||||
$('.product-image-thumb.active').removeClass('active')
|
||||
$(this).addClass('active')
|
||||
})
|
||||
})(jQuery)
|
||||
|
|
|
@ -5,44 +5,46 @@
|
|||
* This is a demo file used only for the main dashboard (index.html)
|
||||
**/
|
||||
|
||||
$(function () {
|
||||
/* global moment:false, Chart:false, Sparkline:false */
|
||||
|
||||
$(function () {
|
||||
'use strict'
|
||||
|
||||
// Make the dashboard widgets sortable Using jquery UI
|
||||
$('.connectedSortable').sortable({
|
||||
placeholder : 'sort-highlight',
|
||||
connectWith : '.connectedSortable',
|
||||
handle : '.card-header, .nav-tabs',
|
||||
placeholder: 'sort-highlight',
|
||||
connectWith: '.connectedSortable',
|
||||
handle: '.card-header, .nav-tabs',
|
||||
forcePlaceholderSize: true,
|
||||
zIndex : 999999
|
||||
zIndex: 999999
|
||||
})
|
||||
$('.connectedSortable .card-header, .connectedSortable .nav-tabs-custom').css('cursor', 'move')
|
||||
|
||||
// jQuery UI sortable for the todo list
|
||||
$('.todo-list').sortable({
|
||||
placeholder : 'sort-highlight',
|
||||
handle : '.handle',
|
||||
placeholder: 'sort-highlight',
|
||||
handle: '.handle',
|
||||
forcePlaceholderSize: true,
|
||||
zIndex : 999999
|
||||
zIndex: 999999
|
||||
})
|
||||
|
||||
// bootstrap WYSIHTML5 - text editor
|
||||
$('.textarea').summernote()
|
||||
|
||||
$('.daterange').daterangepicker({
|
||||
ranges : {
|
||||
'Today' : [moment(), moment()],
|
||||
'Yesterday' : [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
|
||||
'Last 7 Days' : [moment().subtract(6, 'days'), moment()],
|
||||
ranges: {
|
||||
Today: [moment(), moment()],
|
||||
Yesterday: [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
|
||||
'Last 7 Days': [moment().subtract(6, 'days'), moment()],
|
||||
'Last 30 Days': [moment().subtract(29, 'days'), moment()],
|
||||
'This Month' : [moment().startOf('month'), moment().endOf('month')],
|
||||
'Last Month' : [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
|
||||
'This Month': [moment().startOf('month'), moment().endOf('month')],
|
||||
'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
|
||||
},
|
||||
startDate: moment().subtract(29, 'days'),
|
||||
endDate : moment()
|
||||
endDate: moment()
|
||||
}, function (start, end) {
|
||||
window.alert('You chose: ' + start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY'))
|
||||
// eslint-disable-next-line no-alert
|
||||
alert('You chose: ' + start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY'))
|
||||
})
|
||||
|
||||
/* jQueryKnob */
|
||||
|
@ -50,52 +52,53 @@ $(function () {
|
|||
|
||||
// jvectormap data
|
||||
var visitorsData = {
|
||||
'US': 398, //USA
|
||||
'SA': 400, //Saudi Arabia
|
||||
'CA': 1000, //Canada
|
||||
'DE': 500, //Germany
|
||||
'FR': 760, //France
|
||||
'CN': 300, //China
|
||||
'AU': 700, //Australia
|
||||
'BR': 600, //Brazil
|
||||
'IN': 800, //India
|
||||
'GB': 320, //Great Britain
|
||||
'RU': 3000 //Russia
|
||||
US: 398, // USA
|
||||
SA: 400, // Saudi Arabia
|
||||
CA: 1000, // Canada
|
||||
DE: 500, // Germany
|
||||
FR: 760, // France
|
||||
CN: 300, // China
|
||||
AU: 700, // Australia
|
||||
BR: 600, // Brazil
|
||||
IN: 800, // India
|
||||
GB: 320, // Great Britain
|
||||
RU: 3000 // Russia
|
||||
}
|
||||
// World map by jvectormap
|
||||
$('#world-map').vectorMap({
|
||||
map : 'usa_en',
|
||||
backgroundColor : 'transparent',
|
||||
regionStyle : {
|
||||
map: 'usa_en',
|
||||
backgroundColor: 'transparent',
|
||||
regionStyle: {
|
||||
initial: {
|
||||
fill : 'rgba(255, 255, 255, 0.7)',
|
||||
'fill-opacity' : 1,
|
||||
stroke : 'rgba(0,0,0,.2)',
|
||||
'stroke-width' : 1,
|
||||
fill: 'rgba(255, 255, 255, 0.7)',
|
||||
'fill-opacity': 1,
|
||||
stroke: 'rgba(0,0,0,.2)',
|
||||
'stroke-width': 1,
|
||||
'stroke-opacity': 1
|
||||
}
|
||||
},
|
||||
series : {
|
||||
series: {
|
||||
regions: [{
|
||||
values : visitorsData,
|
||||
scale : ['#ffffff', '#0154ad'],
|
||||
values: visitorsData,
|
||||
scale: ['#ffffff', '#0154ad'],
|
||||
normalizeFunction: 'polynomial'
|
||||
}]
|
||||
},
|
||||
onRegionLabelShow: function (e, el, code) {
|
||||
if (typeof visitorsData[code] != 'undefined')
|
||||
if (typeof visitorsData[code] !== 'undefined') {
|
||||
el.html(el.html() + ': ' + visitorsData[code] + ' new visitors')
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
// Sparkline charts
|
||||
var sparkline1 = new Sparkline($("#sparkline-1")[0], {width: 80, height: 50, lineColor: '#92c1dc', endColor: '#ebf4f9'});
|
||||
var sparkline2 = new Sparkline($("#sparkline-2")[0], {width: 80, height: 50, lineColor: '#92c1dc', endColor: '#ebf4f9'});
|
||||
var sparkline3 = new Sparkline($("#sparkline-3")[0], {width: 80, height: 50, lineColor: '#92c1dc', endColor: '#ebf4f9'});
|
||||
var sparkline1 = new Sparkline($('#sparkline-1')[0], { width: 80, height: 50, lineColor: '#92c1dc', endColor: '#ebf4f9' })
|
||||
var sparkline2 = new Sparkline($('#sparkline-2')[0], { width: 80, height: 50, lineColor: '#92c1dc', endColor: '#ebf4f9' })
|
||||
var sparkline3 = new Sparkline($('#sparkline-3')[0], { width: 80, height: 50, lineColor: '#92c1dc', endColor: '#ebf4f9' })
|
||||
|
||||
sparkline1.draw([1000, 1200, 920, 927, 931, 1027, 819, 930, 1021]);
|
||||
sparkline2.draw([515, 519, 520, 522, 652, 810, 370, 627, 319, 630, 921]);
|
||||
sparkline3.draw([15, 19, 20, 22, 33, 27, 31, 27, 19, 30, 21]);
|
||||
sparkline1.draw([1000, 1200, 920, 927, 931, 1027, 819, 930, 1021])
|
||||
sparkline2.draw([515, 519, 520, 522, 652, 810, 370, 627, 319, 630, 921])
|
||||
sparkline3.draw([15, 19, 20, 22, 33, 27, 31, 27, 19, 30, 21])
|
||||
|
||||
// The Calender
|
||||
$('#calendar').datetimepicker({
|
||||
|
@ -110,77 +113,77 @@ $(function () {
|
|||
|
||||
/* Chart.js Charts */
|
||||
// Sales chart
|
||||
var salesChartCanvas = document.getElementById('revenue-chart-canvas').getContext('2d');
|
||||
//$('#revenue-chart').get(0).getContext('2d');
|
||||
var salesChartCanvas = document.getElementById('revenue-chart-canvas').getContext('2d')
|
||||
// $('#revenue-chart').get(0).getContext('2d');
|
||||
|
||||
var salesChartData = {
|
||||
labels : ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
|
||||
labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
|
||||
datasets: [
|
||||
{
|
||||
label : 'Digital Goods',
|
||||
backgroundColor : 'rgba(60,141,188,0.9)',
|
||||
borderColor : 'rgba(60,141,188,0.8)',
|
||||
pointRadius : false,
|
||||
pointColor : '#3b8bba',
|
||||
pointStrokeColor : 'rgba(60,141,188,1)',
|
||||
pointHighlightFill : '#fff',
|
||||
label: 'Digital Goods',
|
||||
backgroundColor: 'rgba(60,141,188,0.9)',
|
||||
borderColor: 'rgba(60,141,188,0.8)',
|
||||
pointRadius: false,
|
||||
pointColor: '#3b8bba',
|
||||
pointStrokeColor: 'rgba(60,141,188,1)',
|
||||
pointHighlightFill: '#fff',
|
||||
pointHighlightStroke: 'rgba(60,141,188,1)',
|
||||
data : [28, 48, 40, 19, 86, 27, 90]
|
||||
data: [28, 48, 40, 19, 86, 27, 90]
|
||||
},
|
||||
{
|
||||
label : 'Electronics',
|
||||
backgroundColor : 'rgba(210, 214, 222, 1)',
|
||||
borderColor : 'rgba(210, 214, 222, 1)',
|
||||
pointRadius : false,
|
||||
pointColor : 'rgba(210, 214, 222, 1)',
|
||||
pointStrokeColor : '#c1c7d1',
|
||||
pointHighlightFill : '#fff',
|
||||
label: 'Electronics',
|
||||
backgroundColor: 'rgba(210, 214, 222, 1)',
|
||||
borderColor: 'rgba(210, 214, 222, 1)',
|
||||
pointRadius: false,
|
||||
pointColor: 'rgba(210, 214, 222, 1)',
|
||||
pointStrokeColor: '#c1c7d1',
|
||||
pointHighlightFill: '#fff',
|
||||
pointHighlightStroke: 'rgba(220,220,220,1)',
|
||||
data : [65, 59, 80, 81, 56, 55, 40]
|
||||
},
|
||||
data: [65, 59, 80, 81, 56, 55, 40]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
var salesChartOptions = {
|
||||
maintainAspectRatio : false,
|
||||
responsive : true,
|
||||
maintainAspectRatio: false,
|
||||
responsive: true,
|
||||
legend: {
|
||||
display: false
|
||||
},
|
||||
scales: {
|
||||
xAxes: [{
|
||||
gridLines : {
|
||||
display : false,
|
||||
gridLines: {
|
||||
display: false
|
||||
}
|
||||
}],
|
||||
yAxes: [{
|
||||
gridLines : {
|
||||
display : false,
|
||||
gridLines: {
|
||||
display: false
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
|
||||
// This will get the first returned node in the jQuery collection.
|
||||
var salesChart = new Chart(salesChartCanvas, {
|
||||
type: 'line',
|
||||
data: salesChartData,
|
||||
options: salesChartOptions
|
||||
}
|
||||
)
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
var salesChart = new Chart(salesChartCanvas, {
|
||||
type: 'line',
|
||||
data: salesChartData,
|
||||
options: salesChartOptions
|
||||
})
|
||||
|
||||
// Donut Chart
|
||||
var pieChartCanvas = $('#sales-chart-canvas').get(0).getContext('2d')
|
||||
var pieData = {
|
||||
var pieData = {
|
||||
labels: [
|
||||
'Instore Sales',
|
||||
'Download Sales',
|
||||
'Mail-Order Sales',
|
||||
'Instore Sales',
|
||||
'Download Sales',
|
||||
'Mail-Order Sales'
|
||||
],
|
||||
datasets: [
|
||||
{
|
||||
data: [30,12,20],
|
||||
backgroundColor : ['#f56954', '#00a65a', '#f39c12'],
|
||||
data: [30, 12, 20],
|
||||
backgroundColor: ['#f56954', '#00a65a', '#f39c12']
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -188,77 +191,77 @@ $(function () {
|
|||
legend: {
|
||||
display: false
|
||||
},
|
||||
maintainAspectRatio : false,
|
||||
responsive : true,
|
||||
maintainAspectRatio: false,
|
||||
responsive: true
|
||||
}
|
||||
//Create pie or douhnut chart
|
||||
// Create pie or douhnut chart
|
||||
// You can switch between pie and douhnut using the method below.
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
var pieChart = new Chart(pieChartCanvas, {
|
||||
type: 'doughnut',
|
||||
data: pieData,
|
||||
options: pieOptions
|
||||
});
|
||||
options: pieOptions
|
||||
})
|
||||
|
||||
// Sales graph chart
|
||||
var salesGraphChartCanvas = $('#line-chart').get(0).getContext('2d');
|
||||
//$('#revenue-chart').get(0).getContext('2d');
|
||||
var salesGraphChartCanvas = $('#line-chart').get(0).getContext('2d')
|
||||
// $('#revenue-chart').get(0).getContext('2d');
|
||||
|
||||
var salesGraphChartData = {
|
||||
labels : ['2011 Q1', '2011 Q2', '2011 Q3', '2011 Q4', '2012 Q1', '2012 Q2', '2012 Q3', '2012 Q4', '2013 Q1', '2013 Q2'],
|
||||
labels: ['2011 Q1', '2011 Q2', '2011 Q3', '2011 Q4', '2012 Q1', '2012 Q2', '2012 Q3', '2012 Q4', '2013 Q1', '2013 Q2'],
|
||||
datasets: [
|
||||
{
|
||||
label : 'Digital Goods',
|
||||
fill : false,
|
||||
borderWidth : 2,
|
||||
lineTension : 0,
|
||||
spanGaps : true,
|
||||
borderColor : '#efefef',
|
||||
pointRadius : 3,
|
||||
pointHoverRadius : 7,
|
||||
pointColor : '#efefef',
|
||||
label: 'Digital Goods',
|
||||
fill: false,
|
||||
borderWidth: 2,
|
||||
lineTension: 0,
|
||||
spanGaps: true,
|
||||
borderColor: '#efefef',
|
||||
pointRadius: 3,
|
||||
pointHoverRadius: 7,
|
||||
pointColor: '#efefef',
|
||||
pointBackgroundColor: '#efefef',
|
||||
data : [2666, 2778, 4912, 3767, 6810, 5670, 4820, 15073, 10687, 8432]
|
||||
data: [2666, 2778, 4912, 3767, 6810, 5670, 4820, 15073, 10687, 8432]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
var salesGraphChartOptions = {
|
||||
maintainAspectRatio : false,
|
||||
responsive : true,
|
||||
maintainAspectRatio: false,
|
||||
responsive: true,
|
||||
legend: {
|
||||
display: false,
|
||||
display: false
|
||||
},
|
||||
scales: {
|
||||
xAxes: [{
|
||||
ticks : {
|
||||
fontColor: '#efefef',
|
||||
ticks: {
|
||||
fontColor: '#efefef'
|
||||
},
|
||||
gridLines : {
|
||||
display : false,
|
||||
gridLines: {
|
||||
display: false,
|
||||
color: '#efefef',
|
||||
drawBorder: false,
|
||||
drawBorder: false
|
||||
}
|
||||
}],
|
||||
yAxes: [{
|
||||
ticks : {
|
||||
ticks: {
|
||||
stepSize: 5000,
|
||||
fontColor: '#efefef',
|
||||
fontColor: '#efefef'
|
||||
},
|
||||
gridLines : {
|
||||
display : true,
|
||||
gridLines: {
|
||||
display: true,
|
||||
color: '#efefef',
|
||||
drawBorder: false,
|
||||
drawBorder: false
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
|
||||
// This will get the first returned node in the jQuery collection.
|
||||
var salesGraphChart = new Chart(salesGraphChartCanvas, {
|
||||
type: 'line',
|
||||
data: salesGraphChartData,
|
||||
options: salesGraphChartOptions
|
||||
}
|
||||
)
|
||||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
var salesGraphChart = new Chart(salesGraphChartCanvas, {
|
||||
type: 'line',
|
||||
data: salesGraphChartData,
|
||||
options: salesGraphChartOptions
|
||||
})
|
||||
})
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
$(function () {
|
||||
/* global Chart:false */
|
||||
|
||||
$(function () {
|
||||
'use strict'
|
||||
|
||||
/* ChartJS
|
||||
|
@ -8,108 +9,110 @@ $(function () {
|
|||
*/
|
||||
|
||||
//-----------------------
|
||||
//- MONTHLY SALES CHART -
|
||||
// - MONTHLY SALES CHART -
|
||||
//-----------------------
|
||||
|
||||
// Get context with jQuery - using jQuery's .get() method.
|
||||
var salesChartCanvas = $('#salesChart').get(0).getContext('2d')
|
||||
|
||||
var salesChartData = {
|
||||
labels : ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
|
||||
labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
|
||||
datasets: [
|
||||
{
|
||||
label : 'Digital Goods',
|
||||
backgroundColor : 'rgba(60,141,188,0.9)',
|
||||
borderColor : 'rgba(60,141,188,0.8)',
|
||||
pointRadius : false,
|
||||
pointColor : '#3b8bba',
|
||||
pointStrokeColor : 'rgba(60,141,188,1)',
|
||||
pointHighlightFill : '#fff',
|
||||
label: 'Digital Goods',
|
||||
backgroundColor: 'rgba(60,141,188,0.9)',
|
||||
borderColor: 'rgba(60,141,188,0.8)',
|
||||
pointRadius: false,
|
||||
pointColor: '#3b8bba',
|
||||
pointStrokeColor: 'rgba(60,141,188,1)',
|
||||
pointHighlightFill: '#fff',
|
||||
pointHighlightStroke: 'rgba(60,141,188,1)',
|
||||
data : [28, 48, 40, 19, 86, 27, 90]
|
||||
data: [28, 48, 40, 19, 86, 27, 90]
|
||||
},
|
||||
{
|
||||
label : 'Electronics',
|
||||
backgroundColor : 'rgba(210, 214, 222, 1)',
|
||||
borderColor : 'rgba(210, 214, 222, 1)',
|
||||
pointRadius : false,
|
||||
pointColor : 'rgba(210, 214, 222, 1)',
|
||||
pointStrokeColor : '#c1c7d1',
|
||||
pointHighlightFill : '#fff',
|
||||
label: 'Electronics',
|
||||
backgroundColor: 'rgba(210, 214, 222, 1)',
|
||||
borderColor: 'rgba(210, 214, 222, 1)',
|
||||
pointRadius: false,
|
||||
pointColor: 'rgba(210, 214, 222, 1)',
|
||||
pointStrokeColor: '#c1c7d1',
|
||||
pointHighlightFill: '#fff',
|
||||
pointHighlightStroke: 'rgba(220,220,220,1)',
|
||||
data : [65, 59, 80, 81, 56, 55, 40]
|
||||
},
|
||||
data: [65, 59, 80, 81, 56, 55, 40]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
var salesChartOptions = {
|
||||
maintainAspectRatio : false,
|
||||
responsive : true,
|
||||
maintainAspectRatio: false,
|
||||
responsive: true,
|
||||
legend: {
|
||||
display: false
|
||||
},
|
||||
scales: {
|
||||
xAxes: [{
|
||||
gridLines : {
|
||||
display : false,
|
||||
gridLines: {
|
||||
display: false
|
||||
}
|
||||
}],
|
||||
yAxes: [{
|
||||
gridLines : {
|
||||
display : false,
|
||||
gridLines: {
|
||||
display: false
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
|
||||
// This will get the first returned node in the jQuery collection.
|
||||
var salesChart = new Chart(salesChartCanvas, {
|
||||
type: 'line',
|
||||
data: salesChartData,
|
||||
options: salesChartOptions
|
||||
}
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
var salesChart = new Chart(salesChartCanvas, {
|
||||
type: 'line',
|
||||
data: salesChartData,
|
||||
options: salesChartOptions
|
||||
}
|
||||
)
|
||||
|
||||
//---------------------------
|
||||
//- END MONTHLY SALES CHART -
|
||||
// - END MONTHLY SALES CHART -
|
||||
//---------------------------
|
||||
|
||||
//-------------
|
||||
//- PIE CHART -
|
||||
// - PIE CHART -
|
||||
//-------------
|
||||
// Get context with jQuery - using jQuery's .get() method.
|
||||
var pieChartCanvas = $('#pieChart').get(0).getContext('2d')
|
||||
var pieData = {
|
||||
labels: [
|
||||
'Chrome',
|
||||
'IE',
|
||||
'FireFox',
|
||||
'Safari',
|
||||
'Opera',
|
||||
'Navigator',
|
||||
],
|
||||
datasets: [
|
||||
{
|
||||
data: [700,500,400,600,300,100],
|
||||
backgroundColor : ['#f56954', '#00a65a', '#f39c12', '#00c0ef', '#3c8dbc', '#d2d6de'],
|
||||
}
|
||||
]
|
||||
}
|
||||
var pieOptions = {
|
||||
legend: {
|
||||
display: false
|
||||
var pieChartCanvas = $('#pieChart').get(0).getContext('2d')
|
||||
var pieData = {
|
||||
labels: [
|
||||
'Chrome',
|
||||
'IE',
|
||||
'FireFox',
|
||||
'Safari',
|
||||
'Opera',
|
||||
'Navigator'
|
||||
],
|
||||
datasets: [
|
||||
{
|
||||
data: [700, 500, 400, 600, 300, 100],
|
||||
backgroundColor: ['#f56954', '#00a65a', '#f39c12', '#00c0ef', '#3c8dbc', '#d2d6de']
|
||||
}
|
||||
]
|
||||
}
|
||||
var pieOptions = {
|
||||
legend: {
|
||||
display: false
|
||||
}
|
||||
//Create pie or douhnut chart
|
||||
// You can switch between pie and douhnut using the method below.
|
||||
var pieChart = new Chart(pieChartCanvas, {
|
||||
type: 'doughnut',
|
||||
data: pieData,
|
||||
options: pieOptions
|
||||
})
|
||||
}
|
||||
// Create pie or douhnut chart
|
||||
// You can switch between pie and douhnut using the method below.
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
var pieChart = new Chart(pieChartCanvas, {
|
||||
type: 'doughnut',
|
||||
data: pieData,
|
||||
options: pieOptions
|
||||
})
|
||||
|
||||
//-----------------
|
||||
//- END PIE CHART -
|
||||
// - END PIE CHART -
|
||||
//-----------------
|
||||
|
||||
/* jVector Maps
|
||||
|
@ -117,15 +120,14 @@ $(function () {
|
|||
* Create a world map with markers
|
||||
*/
|
||||
$('#world-map-markers').mapael({
|
||||
map: {
|
||||
name : "usa_states",
|
||||
zoom: {
|
||||
enabled: true,
|
||||
maxLevel: 10
|
||||
},
|
||||
},
|
||||
map: {
|
||||
name: 'usa_states',
|
||||
zoom: {
|
||||
enabled: true,
|
||||
maxLevel: 10
|
||||
}
|
||||
}
|
||||
);
|
||||
})
|
||||
|
||||
// $('#world-map-markers').vectorMap({
|
||||
// map : 'world_en',
|
||||
|
@ -263,5 +265,4 @@ $(function () {
|
|||
// }
|
||||
// ]
|
||||
// })
|
||||
|
||||
})
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
/* global Chart:false */
|
||||
|
||||
$(function () {
|
||||
'use strict'
|
||||
|
||||
|
@ -6,133 +8,136 @@ $(function () {
|
|||
fontStyle: 'bold'
|
||||
}
|
||||
|
||||
var mode = 'index'
|
||||
var mode = 'index'
|
||||
var intersect = true
|
||||
|
||||
var $salesChart = $('#sales-chart')
|
||||
var salesChart = new Chart($salesChart, {
|
||||
type : 'bar',
|
||||
data : {
|
||||
labels : ['JUN', 'JUL', 'AUG', 'SEP', 'OCT', 'NOV', 'DEC'],
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
var salesChart = new Chart($salesChart, {
|
||||
type: 'bar',
|
||||
data: {
|
||||
labels: ['JUN', 'JUL', 'AUG', 'SEP', 'OCT', 'NOV', 'DEC'],
|
||||
datasets: [
|
||||
{
|
||||
backgroundColor: '#007bff',
|
||||
borderColor : '#007bff',
|
||||
data : [1000, 2000, 3000, 2500, 2700, 2500, 3000]
|
||||
borderColor: '#007bff',
|
||||
data: [1000, 2000, 3000, 2500, 2700, 2500, 3000]
|
||||
},
|
||||
{
|
||||
backgroundColor: '#ced4da',
|
||||
borderColor : '#ced4da',
|
||||
data : [700, 1700, 2700, 2000, 1800, 1500, 2000]
|
||||
borderColor: '#ced4da',
|
||||
data: [700, 1700, 2700, 2000, 1800, 1500, 2000]
|
||||
}
|
||||
]
|
||||
},
|
||||
options: {
|
||||
maintainAspectRatio: false,
|
||||
tooltips : {
|
||||
mode : mode,
|
||||
tooltips: {
|
||||
mode: mode,
|
||||
intersect: intersect
|
||||
},
|
||||
hover : {
|
||||
mode : mode,
|
||||
hover: {
|
||||
mode: mode,
|
||||
intersect: intersect
|
||||
},
|
||||
legend : {
|
||||
legend: {
|
||||
display: false
|
||||
},
|
||||
scales : {
|
||||
scales: {
|
||||
yAxes: [{
|
||||
// display: false,
|
||||
gridLines: {
|
||||
display : true,
|
||||
lineWidth : '4px',
|
||||
color : 'rgba(0, 0, 0, .2)',
|
||||
display: true,
|
||||
lineWidth: '4px',
|
||||
color: 'rgba(0, 0, 0, .2)',
|
||||
zeroLineColor: 'transparent'
|
||||
},
|
||||
ticks : $.extend({
|
||||
ticks: $.extend({
|
||||
beginAtZero: true,
|
||||
|
||||
// Include a dollar sign in the ticks
|
||||
callback: function (value, index, values) {
|
||||
callback: function (value) {
|
||||
if (value >= 1000) {
|
||||
value /= 1000
|
||||
value += 'k'
|
||||
}
|
||||
|
||||
return '$' + value
|
||||
}
|
||||
}, ticksStyle)
|
||||
}],
|
||||
xAxes: [{
|
||||
display : true,
|
||||
display: true,
|
||||
gridLines: {
|
||||
display: false
|
||||
},
|
||||
ticks : ticksStyle
|
||||
ticks: ticksStyle
|
||||
}]
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
var $visitorsChart = $('#visitors-chart')
|
||||
var visitorsChart = new Chart($visitorsChart, {
|
||||
data : {
|
||||
labels : ['18th', '20th', '22nd', '24th', '26th', '28th', '30th'],
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
var visitorsChart = new Chart($visitorsChart, {
|
||||
data: {
|
||||
labels: ['18th', '20th', '22nd', '24th', '26th', '28th', '30th'],
|
||||
datasets: [{
|
||||
type : 'line',
|
||||
data : [100, 120, 170, 167, 180, 177, 160],
|
||||
backgroundColor : 'transparent',
|
||||
borderColor : '#007bff',
|
||||
pointBorderColor : '#007bff',
|
||||
type: 'line',
|
||||
data: [100, 120, 170, 167, 180, 177, 160],
|
||||
backgroundColor: 'transparent',
|
||||
borderColor: '#007bff',
|
||||
pointBorderColor: '#007bff',
|
||||
pointBackgroundColor: '#007bff',
|
||||
fill : false
|
||||
fill: false
|
||||
// pointHoverBackgroundColor: '#007bff',
|
||||
// pointHoverBorderColor : '#007bff'
|
||||
},
|
||||
{
|
||||
type : 'line',
|
||||
data : [60, 80, 70, 67, 80, 77, 100],
|
||||
backgroundColor : 'tansparent',
|
||||
borderColor : '#ced4da',
|
||||
pointBorderColor : '#ced4da',
|
||||
pointBackgroundColor: '#ced4da',
|
||||
fill : false
|
||||
// pointHoverBackgroundColor: '#ced4da',
|
||||
// pointHoverBorderColor : '#ced4da'
|
||||
}]
|
||||
{
|
||||
type: 'line',
|
||||
data: [60, 80, 70, 67, 80, 77, 100],
|
||||
backgroundColor: 'tansparent',
|
||||
borderColor: '#ced4da',
|
||||
pointBorderColor: '#ced4da',
|
||||
pointBackgroundColor: '#ced4da',
|
||||
fill: false
|
||||
// pointHoverBackgroundColor: '#ced4da',
|
||||
// pointHoverBorderColor : '#ced4da'
|
||||
}]
|
||||
},
|
||||
options: {
|
||||
maintainAspectRatio: false,
|
||||
tooltips : {
|
||||
mode : mode,
|
||||
tooltips: {
|
||||
mode: mode,
|
||||
intersect: intersect
|
||||
},
|
||||
hover : {
|
||||
mode : mode,
|
||||
hover: {
|
||||
mode: mode,
|
||||
intersect: intersect
|
||||
},
|
||||
legend : {
|
||||
legend: {
|
||||
display: false
|
||||
},
|
||||
scales : {
|
||||
scales: {
|
||||
yAxes: [{
|
||||
// display: false,
|
||||
gridLines: {
|
||||
display : true,
|
||||
lineWidth : '4px',
|
||||
color : 'rgba(0, 0, 0, .2)',
|
||||
display: true,
|
||||
lineWidth: '4px',
|
||||
color: 'rgba(0, 0, 0, .2)',
|
||||
zeroLineColor: 'transparent'
|
||||
},
|
||||
ticks : $.extend({
|
||||
beginAtZero : true,
|
||||
ticks: $.extend({
|
||||
beginAtZero: true,
|
||||
suggestedMax: 200
|
||||
}, ticksStyle)
|
||||
}],
|
||||
xAxes: [{
|
||||
display : true,
|
||||
display: true,
|
||||
gridLines: {
|
||||
display: false
|
||||
},
|
||||
ticks : ticksStyle
|
||||
ticks: ticksStyle
|
||||
}]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1374,6 +1374,17 @@
|
|||
"resolved": "https://registry.npmjs.org/array-from/-/array-from-2.1.1.tgz",
|
||||
"integrity": "sha1-z+nYwmYoudxa7MYqn12PHzUsEZU="
|
||||
},
|
||||
"array-includes": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.1.tgz",
|
||||
"integrity": "sha512-c2VXaCHl7zPsvpkFsw4nxvFie4fh1ur9bpcgsVkIjqn0H/Xwdg+7fv3n2r/isyS8EBj5b06M9kHyZuIr4El6WQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"define-properties": "^1.1.3",
|
||||
"es-abstract": "^1.17.0",
|
||||
"is-string": "^1.0.5"
|
||||
}
|
||||
},
|
||||
"array-union": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz",
|
||||
|
@ -1386,6 +1397,16 @@
|
|||
"integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=",
|
||||
"dev": true
|
||||
},
|
||||
"array.prototype.flat": {
|
||||
"version": "1.2.3",
|
||||
"resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.3.tgz",
|
||||
"integrity": "sha512-gBlRZV0VSmfPIeWfuuy56XZMvbVfbEUnOXUvt3F/eUUUSyzlgLxhEX4YAEpxNAogRGehPSnfXyPtYyKAhkzQhQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"define-properties": "^1.1.3",
|
||||
"es-abstract": "^1.17.0-next.1"
|
||||
}
|
||||
},
|
||||
"arraybuffer.slice": {
|
||||
"version": "0.0.7",
|
||||
"resolved": "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz",
|
||||
|
@ -1575,20 +1596,6 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"babel-eslint": {
|
||||
"version": "10.1.0",
|
||||
"resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-10.1.0.tgz",
|
||||
"integrity": "sha512-ifWaTHQ0ce+448CYop8AdrQiBsGrnC+bMgfyKFdi6EsPLTAWG+QfyDeM6OH+FmWnKvEq5NnBMLvlBUPKQZoDSg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/code-frame": "^7.0.0",
|
||||
"@babel/parser": "^7.7.0",
|
||||
"@babel/traverse": "^7.7.0",
|
||||
"@babel/types": "^7.7.0",
|
||||
"eslint-visitor-keys": "^1.0.0",
|
||||
"resolve": "^1.12.0"
|
||||
}
|
||||
},
|
||||
"babel-plugin-dynamic-import-node": {
|
||||
"version": "2.3.3",
|
||||
"resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz",
|
||||
|
@ -2416,6 +2423,15 @@
|
|||
"glob": "7.x"
|
||||
}
|
||||
},
|
||||
"clean-regexp": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/clean-regexp/-/clean-regexp-1.0.0.tgz",
|
||||
"integrity": "sha1-jffHquUf02h06PjQW5GAvBGj/tc=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"escape-string-regexp": "^1.0.5"
|
||||
}
|
||||
},
|
||||
"cli-boxes": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.0.tgz",
|
||||
|
@ -2577,6 +2593,12 @@
|
|||
"xdg-basedir": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"confusing-browser-globals": {
|
||||
"version": "1.0.9",
|
||||
"resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.9.tgz",
|
||||
"integrity": "sha512-KbS1Y0jMtyPgIxjO7ZzMAuUpAKMt1SzCL9fsrKsX6b0zJPTaT0SiSPmewwVZg9UAO83HVIlEhZF84LIjZ0lmAw==",
|
||||
"dev": true
|
||||
},
|
||||
"connect": {
|
||||
"version": "3.6.6",
|
||||
"resolved": "https://registry.npmjs.org/connect/-/connect-3.6.6.tgz",
|
||||
|
@ -2628,6 +2650,12 @@
|
|||
"upper-case": "^1.1.1"
|
||||
}
|
||||
},
|
||||
"contains-path": {
|
||||
"version": "0.1.0",
|
||||
"resolved": "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz",
|
||||
"integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=",
|
||||
"dev": true
|
||||
},
|
||||
"convert-source-map": {
|
||||
"version": "1.7.0",
|
||||
"resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz",
|
||||
|
@ -3796,6 +3824,79 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"eslint-ast-utils": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-ast-utils/-/eslint-ast-utils-1.1.0.tgz",
|
||||
"integrity": "sha512-otzzTim2/1+lVrlH19EfQQJEhVJSu0zOb9ygb3iapN6UlyaDtyRq4b5U1FuW0v1lRa9Fp/GJyHkSwm6NqABgCA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"lodash.get": "^4.4.2",
|
||||
"lodash.zip": "^4.2.0"
|
||||
}
|
||||
},
|
||||
"eslint-config-xo": {
|
||||
"version": "0.29.1",
|
||||
"resolved": "https://registry.npmjs.org/eslint-config-xo/-/eslint-config-xo-0.29.1.tgz",
|
||||
"integrity": "sha512-RDjeKh8CV0/EH4utW/6uOkwJJOOU+rX3uE5eUBOamcLNe4lNjyo8kSt3B6DzAm1L/1tWGikI7LFNVY9gG7PDQw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"confusing-browser-globals": "1.0.9"
|
||||
}
|
||||
},
|
||||
"eslint-import-resolver-node": {
|
||||
"version": "0.3.3",
|
||||
"resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.3.tgz",
|
||||
"integrity": "sha512-b8crLDo0M5RSe5YG8Pu2DYBj71tSB6OvXkfzwbJU2w7y8P4/yo0MyF8jU26IEuEuHF2K5/gcAJE3LhQGqBBbVg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"debug": "^2.6.9",
|
||||
"resolve": "^1.13.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"debug": {
|
||||
"version": "2.6.9",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
|
||||
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ms": "2.0.0"
|
||||
}
|
||||
},
|
||||
"ms": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
||||
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"eslint-module-utils": {
|
||||
"version": "2.6.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.6.0.tgz",
|
||||
"integrity": "sha512-6j9xxegbqe8/kZY8cYpcp0xhbK0EgJlg3g9mib3/miLaExuuwc3n5UEfSnU6hWMbT0FAYVvDbL9RrRgpUeQIvA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"debug": "^2.6.9",
|
||||
"pkg-dir": "^2.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"debug": {
|
||||
"version": "2.6.9",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
|
||||
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ms": "2.0.0"
|
||||
}
|
||||
},
|
||||
"ms": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
||||
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"eslint-plugin-compat": {
|
||||
"version": "3.7.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-compat/-/eslint-plugin-compat-3.7.0.tgz",
|
||||
|
@ -3825,6 +3926,231 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"eslint-plugin-import": {
|
||||
"version": "2.20.2",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.20.2.tgz",
|
||||
"integrity": "sha512-FObidqpXrR8OnCh4iNsxy+WACztJLXAHBO5hK79T1Hc77PgQZkyDGA5Ag9xAvRpglvLNxhH/zSmZ70/pZ31dHg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"array-includes": "^3.0.3",
|
||||
"array.prototype.flat": "^1.2.1",
|
||||
"contains-path": "^0.1.0",
|
||||
"debug": "^2.6.9",
|
||||
"doctrine": "1.5.0",
|
||||
"eslint-import-resolver-node": "^0.3.2",
|
||||
"eslint-module-utils": "^2.4.1",
|
||||
"has": "^1.0.3",
|
||||
"minimatch": "^3.0.4",
|
||||
"object.values": "^1.1.0",
|
||||
"read-pkg-up": "^2.0.0",
|
||||
"resolve": "^1.12.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"debug": {
|
||||
"version": "2.6.9",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
|
||||
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ms": "2.0.0"
|
||||
}
|
||||
},
|
||||
"doctrine": {
|
||||
"version": "1.5.0",
|
||||
"resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz",
|
||||
"integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"esutils": "^2.0.2",
|
||||
"isarray": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"load-json-file": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz",
|
||||
"integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"graceful-fs": "^4.1.2",
|
||||
"parse-json": "^2.2.0",
|
||||
"pify": "^2.0.0",
|
||||
"strip-bom": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"ms": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
||||
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
|
||||
"dev": true
|
||||
},
|
||||
"path-type": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz",
|
||||
"integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"pify": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"read-pkg": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz",
|
||||
"integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"load-json-file": "^2.0.0",
|
||||
"normalize-package-data": "^2.3.2",
|
||||
"path-type": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"read-pkg-up": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz",
|
||||
"integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"find-up": "^2.0.0",
|
||||
"read-pkg": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"strip-bom": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
|
||||
"integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"eslint-plugin-unicorn": {
|
||||
"version": "20.1.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-20.1.0.tgz",
|
||||
"integrity": "sha512-XQxLBJT/gnwyRR6cfYsIK1AdekQchAt5tmcsnldevGjgR2xoZsRUa5/i6e0seNHy2RoT57CkTnbVHwHF8No8LA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ci-info": "^2.0.0",
|
||||
"clean-regexp": "^1.0.0",
|
||||
"eslint-ast-utils": "^1.1.0",
|
||||
"eslint-template-visitor": "^2.0.0",
|
||||
"eslint-utils": "^2.0.0",
|
||||
"import-modules": "^2.0.0",
|
||||
"lodash": "^4.17.15",
|
||||
"pluralize": "^8.0.0",
|
||||
"read-pkg-up": "^7.0.1",
|
||||
"regexp-tree": "^0.1.21",
|
||||
"reserved-words": "^0.1.2",
|
||||
"safe-regex": "^2.1.1",
|
||||
"semver": "^7.3.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"find-up": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
|
||||
"integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"locate-path": "^5.0.0",
|
||||
"path-exists": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"locate-path": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
|
||||
"integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"p-locate": "^4.1.0"
|
||||
}
|
||||
},
|
||||
"p-limit": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
|
||||
"integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"p-try": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"p-locate": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
|
||||
"integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"p-limit": "^2.2.0"
|
||||
}
|
||||
},
|
||||
"p-try": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
|
||||
"integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
|
||||
"dev": true
|
||||
},
|
||||
"parse-json": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.0.0.tgz",
|
||||
"integrity": "sha512-OOY5b7PAEFV0E2Fir1KOkxchnZNCdowAJgQ5NuxjpBKTRP3pQhwkrkxqQjeoKJ+fO7bCpmIZaogI4eZGDMEGOw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/code-frame": "^7.0.0",
|
||||
"error-ex": "^1.3.1",
|
||||
"json-parse-better-errors": "^1.0.1",
|
||||
"lines-and-columns": "^1.1.6"
|
||||
}
|
||||
},
|
||||
"path-exists": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
|
||||
"integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
|
||||
"dev": true
|
||||
},
|
||||
"read-pkg": {
|
||||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz",
|
||||
"integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/normalize-package-data": "^2.4.0",
|
||||
"normalize-package-data": "^2.5.0",
|
||||
"parse-json": "^5.0.0",
|
||||
"type-fest": "^0.6.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"type-fest": {
|
||||
"version": "0.6.0",
|
||||
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz",
|
||||
"integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"read-pkg-up": {
|
||||
"version": "7.0.1",
|
||||
"resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz",
|
||||
"integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"find-up": "^4.1.0",
|
||||
"read-pkg": "^5.2.0",
|
||||
"type-fest": "^0.8.1"
|
||||
}
|
||||
},
|
||||
"safe-regex": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-2.1.1.tgz",
|
||||
"integrity": "sha512-rx+x8AMzKb5Q5lQ95Zoi6ZbJqwCLkqi3XuJXp5P3rT8OEc6sZCJG5AE5dU3lsgRr/F4Bs31jSlVN+j5KrsGu9A==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"regexp-tree": "~0.1.1"
|
||||
}
|
||||
},
|
||||
"semver": {
|
||||
"version": "7.3.2",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz",
|
||||
"integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"eslint-scope": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.0.0.tgz",
|
||||
|
@ -3835,6 +4161,17 @@
|
|||
"estraverse": "^4.1.1"
|
||||
}
|
||||
},
|
||||
"eslint-template-visitor": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-template-visitor/-/eslint-template-visitor-2.0.0.tgz",
|
||||
"integrity": "sha512-WijrLXWk/TiiG9FBTeEeb2pj/nD8H4eKIYx1DhTv/c7QoFmelE5P+3gzKUcXWZz88AI2+Wjse9DTV8lXrhcUsw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"eslint-visitor-keys": "^1.1.0",
|
||||
"espree": "^7.0.0",
|
||||
"multimap": "^1.1.0"
|
||||
}
|
||||
},
|
||||
"eslint-utils": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.0.0.tgz",
|
||||
|
@ -5075,6 +5412,12 @@
|
|||
"integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=",
|
||||
"dev": true
|
||||
},
|
||||
"import-modules": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/import-modules/-/import-modules-2.0.0.tgz",
|
||||
"integrity": "sha512-iczM/v9drffdNnABOKwj0f9G3cFDon99VcG1mxeBsdqnbd+vnQ5c2uAiCHNQITqFTOPaEvwg3VjoWCur0uHLEw==",
|
||||
"dev": true
|
||||
},
|
||||
"imurmurhash": {
|
||||
"version": "0.1.4",
|
||||
"resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
|
||||
|
@ -5537,6 +5880,12 @@
|
|||
"integrity": "sha512-OZ4IlER3zmRIoB9AqNhEggVxqIH4ofDns5nRrPS6yQxXE1TPCUpFznBfRQmQa8uC+pXqjMnukiJBxCisIxiLGA==",
|
||||
"dev": true
|
||||
},
|
||||
"is-string": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz",
|
||||
"integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==",
|
||||
"dev": true
|
||||
},
|
||||
"is-symbol": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz",
|
||||
|
@ -5935,6 +6284,12 @@
|
|||
"integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
|
||||
"dev": true
|
||||
},
|
||||
"lodash.get": {
|
||||
"version": "4.4.2",
|
||||
"resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz",
|
||||
"integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=",
|
||||
"dev": true
|
||||
},
|
||||
"lodash.isfinite": {
|
||||
"version": "3.3.2",
|
||||
"resolved": "https://registry.npmjs.org/lodash.isfinite/-/lodash.isfinite-3.3.2.tgz",
|
||||
|
@ -5947,6 +6302,12 @@
|
|||
"integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=",
|
||||
"dev": true
|
||||
},
|
||||
"lodash.zip": {
|
||||
"version": "4.2.0",
|
||||
"resolved": "https://registry.npmjs.org/lodash.zip/-/lodash.zip-4.2.0.tgz",
|
||||
"integrity": "sha1-7GZi5IlkCO1KtsVCo5kLcswIACA=",
|
||||
"dev": true
|
||||
},
|
||||
"log-symbols": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz",
|
||||
|
@ -6296,6 +6657,12 @@
|
|||
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
|
||||
"dev": true
|
||||
},
|
||||
"multimap": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/multimap/-/multimap-1.1.0.tgz",
|
||||
"integrity": "sha512-0ZIR9PasPxGXmRsEF8jsDzndzHDj7tIav+JUmvIFB/WHswliFnquxECT/De7GR4yg99ky/NlRKJT82G1y271bw==",
|
||||
"dev": true
|
||||
},
|
||||
"mute-stream": {
|
||||
"version": "0.0.8",
|
||||
"resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz",
|
||||
|
@ -6919,6 +7286,18 @@
|
|||
"isobject": "^3.0.1"
|
||||
}
|
||||
},
|
||||
"object.values": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.1.tgz",
|
||||
"integrity": "sha512-WTa54g2K8iu0kmS/us18jEmdv1a4Wi//BZ/DTVYEcH0XhLM5NYdpDHja3gt57VrZLcNAO2WGA+KpWsDBaHt6eA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"define-properties": "^1.1.3",
|
||||
"es-abstract": "^1.17.0-next.1",
|
||||
"function-bind": "^1.1.1",
|
||||
"has": "^1.0.3"
|
||||
}
|
||||
},
|
||||
"on-finished": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
|
||||
|
@ -7262,6 +7641,15 @@
|
|||
"pinkie": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"pkg-dir": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz",
|
||||
"integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"find-up": "^2.1.0"
|
||||
}
|
||||
},
|
||||
"pkg-up": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-2.0.0.tgz",
|
||||
|
@ -7271,6 +7659,12 @@
|
|||
"find-up": "^2.1.0"
|
||||
}
|
||||
},
|
||||
"pluralize": {
|
||||
"version": "8.0.0",
|
||||
"resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz",
|
||||
"integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==",
|
||||
"dev": true
|
||||
},
|
||||
"png-js": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/png-js/-/png-js-1.0.0.tgz",
|
||||
|
@ -8047,6 +8441,12 @@
|
|||
"safe-regex": "^1.1.0"
|
||||
}
|
||||
},
|
||||
"regexp-tree": {
|
||||
"version": "0.1.21",
|
||||
"resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.21.tgz",
|
||||
"integrity": "sha512-kUUXjX4AnqnR8KRTCrayAo9PzYMRKmVoGgaz2tBuz0MF3g1ZbGebmtW0yFHfFK9CmBjQKeYIgoL22pFLBJY7sw==",
|
||||
"dev": true
|
||||
},
|
||||
"regexp.prototype.flags": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.3.0.tgz",
|
||||
|
@ -8261,6 +8661,12 @@
|
|||
"integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=",
|
||||
"dev": true
|
||||
},
|
||||
"reserved-words": {
|
||||
"version": "0.1.2",
|
||||
"resolved": "https://registry.npmjs.org/reserved-words/-/reserved-words-0.1.2.tgz",
|
||||
"integrity": "sha1-AKCUD5jNUBrqqsMWQR2a3FKzGrE=",
|
||||
"dev": true
|
||||
},
|
||||
"resolve": {
|
||||
"version": "1.17.0",
|
||||
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz",
|
||||
|
|
|
@ -37,7 +37,8 @@
|
|||
"js": "npm-run-all --sequential js-compile js-minify",
|
||||
"js-compile": "rollup --config build/config/rollup.config.js --sourcemap",
|
||||
"js-minify": "terser --compress typeofs=false --mangle --comments \"/^!/\" --source-map \"content=dist/js/adminlte.js.map,includeSources,url=adminlte.min.js.map\" --output dist/js/adminlte.min.js dist/js/adminlte.js",
|
||||
"lint": "npm run css-lint",
|
||||
"js-lint": "eslint --cache --cache-location .cache/.eslintcache --report-unused-disable-directives .",
|
||||
"lint": "npm-run-all --continue-on-error --parallel css-lint js-lint",
|
||||
"production": "npm-run-all --sequential compile plugins",
|
||||
"prepare-release": "npm-run-all --sequential production docs",
|
||||
"test": "npm-run-all lint production",
|
||||
|
@ -45,7 +46,7 @@
|
|||
"sync": "browser-sync start --server --files *.html pages/ dist/",
|
||||
"watch": "npm-run-all --parallel watch-css watch-js",
|
||||
"watch-css": "nodemon --watch build/scss -e scss -x \"npm-run-all css-lint css\"",
|
||||
"watch-js": "nodemon --watch build/js -e js -x \"npm run js\""
|
||||
"watch-js": "nodemon --watch build/js -e js -x \"npm-run-all js-lint js\""
|
||||
},
|
||||
"keywords": [
|
||||
"css",
|
||||
|
@ -134,11 +135,13 @@
|
|||
"@babel/preset-env": "^7.10.2",
|
||||
"@rollup/plugin-babel": "^5.0.2",
|
||||
"autoprefixer": "^9.8.0",
|
||||
"babel-eslint": "^10.1.0",
|
||||
"browser-sync": "^2.26.7",
|
||||
"clean-css-cli": "^4.3.0",
|
||||
"eslint": "^7.1.0",
|
||||
"eslint-config-xo": "^0.29.1",
|
||||
"eslint-plugin-compat": "^3.7.0",
|
||||
"eslint-plugin-import": "^2.20.2",
|
||||
"eslint-plugin-unicorn": "^20.1.0",
|
||||
"node-sass": "^4.14.1",
|
||||
"node-sass-package-importer": "^5.3.2",
|
||||
"nodemon": "^2.0.4",
|
||||
|
|
|
@ -1188,7 +1188,7 @@
|
|||
|
||||
<script>
|
||||
$(function() {
|
||||
const Toast = Swal.mixin({
|
||||
var Toast = Swal.mixin({
|
||||
toast: true,
|
||||
position: 'top-end',
|
||||
showConfirmButton: false,
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
root = true
|
||||
|
||||
[*.{js,css,less,html}]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
charset = utf-8
|
|
@ -1,6 +0,0 @@
|
|||
module.exports = {
|
||||
"extends": "standard",
|
||||
"plugins": [
|
||||
"standard"
|
||||
]
|
||||
};
|
Loading…
Reference in New Issue