Compare commits
188 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a6a1fd3341 | ||
|
|
5d5eb0245c | ||
|
|
f629a8f2d5 | ||
|
|
396535cbeb | ||
|
|
0ff54af237 | ||
|
|
ec9d9056e5 | ||
|
|
e78c844a91 | ||
|
|
09b22bece0 | ||
|
|
4982c7d146 | ||
|
|
24026ba80f | ||
|
|
8dc5c48f84 | ||
|
|
89379b283c | ||
|
|
7ede8b76ee | ||
|
|
c5bc70badd | ||
|
|
3e5e252763 | ||
|
|
d66aab561c | ||
|
|
ca40f220aa | ||
|
|
675ca1ec08 | ||
|
|
a6183f37c2 | ||
|
|
bad9588c84 | ||
|
|
c15399ed05 | ||
|
|
8577097409 | ||
|
|
5e5415010b | ||
|
|
e48c0be88b | ||
|
|
e9264ee246 | ||
|
|
2042b6fff5 | ||
|
|
48b60b088e | ||
|
|
92ab47b47f | ||
|
|
ebcc241246 | ||
|
|
fc2da945f9 | ||
|
|
2533c6c687 | ||
|
|
9f26e34f20 | ||
|
|
e64f39642c | ||
|
|
e7f12d5cd9 | ||
|
|
de76d7c4c0 | ||
|
|
33a15ae6fb | ||
|
|
9988f9285d | ||
|
|
60ab0ab44c | ||
|
|
7c08362790 | ||
|
|
f00cd4c0d0 | ||
|
|
b38d005c68 | ||
|
|
628c01e77c | ||
|
|
1969fed885 | ||
|
|
75b661bfdf | ||
|
|
c7fe21050c | ||
|
|
00525c1371 | ||
|
|
594a2b2e30 | ||
|
|
519bddfaee | ||
|
|
a8620a02bb | ||
|
|
50a12c2ee3 | ||
|
|
9661738f8f | ||
|
|
c119c6f81f | ||
|
|
88f396c6d9 | ||
|
|
a17edacbed | ||
|
|
fb7e9497fc | ||
|
|
6c04fb8be7 | ||
|
|
0b8a661805 | ||
|
|
a193f62893 | ||
|
|
c871964733 | ||
|
|
576f7ebc43 | ||
|
|
c4e15dd6e1 | ||
|
|
02c5cede6c | ||
|
|
5d4c7f9a2b | ||
|
|
366e50f57d | ||
|
|
5470edfd0f | ||
|
|
6ce957876a | ||
|
|
0b50d5ed86 | ||
|
|
caf2a8838d | ||
|
|
9510278efd | ||
|
|
a71f514557 | ||
|
|
587d402c34 | ||
|
|
449fb8c08b | ||
|
|
83349ce2e0 | ||
|
|
9dac202e46 | ||
|
|
a210ae797a | ||
|
|
01de2be6b5 | ||
|
|
8a9240c772 | ||
|
|
f8e7458d81 | ||
|
|
5cb8a10732 | ||
|
|
75deb497b3 | ||
|
|
fe9461033d | ||
|
|
12ad550a4a | ||
|
|
d0e86b30ab | ||
|
|
d3d75f0344 | ||
|
|
328781a1f8 | ||
|
|
15352a4525 | ||
|
|
cd33f9cf37 | ||
|
|
efdf32d8a3 | ||
|
|
38e2ef29a9 | ||
|
|
cc1109756d | ||
|
|
4300887f8d | ||
|
|
bb1cbe50c1 | ||
|
|
68a55fb77e | ||
|
|
3cb102b8de | ||
|
|
880c8c9370 | ||
|
|
9f4ac0bcad | ||
|
|
66c3dc37ea | ||
|
|
31181c2bf3 | ||
|
|
7ded3f0754 | ||
|
|
b245d79ef7 | ||
|
|
ba755dcdd3 | ||
|
|
c8baaeb82c | ||
|
|
8cdeeead38 | ||
|
|
4f8c8c4eb0 | ||
|
|
a7b17b332c | ||
|
|
bed666bba7 | ||
|
|
a996bd45de | ||
|
|
2abc7f5caf | ||
|
|
cc74eb4bdd | ||
|
|
941a27807a | ||
|
|
271f2b8952 | ||
|
|
e39d75e0a4 | ||
|
|
6e9571731d | ||
|
|
4f1546acb2 | ||
|
|
c2d7f21a33 | ||
|
|
98dbf6ec82 | ||
|
|
267e451d1c | ||
|
|
959d8dd9e0 | ||
|
|
37b9e5f567 | ||
|
|
98eaf2fd03 | ||
|
|
2cab8d0e64 | ||
|
|
71902d690c | ||
|
|
dc597287f2 | ||
|
|
6161c1878a | ||
|
|
a55ded687e | ||
|
|
9cb901ead9 | ||
|
|
dbba0821c1 | ||
|
|
f0947a4e71 | ||
|
|
e399ce3c25 | ||
|
|
a4b3c608ee | ||
|
|
8457997253 | ||
|
|
76187230f3 | ||
|
|
8cebc21b11 | ||
|
|
ed19b67523 | ||
|
|
8b35d2e7e0 | ||
|
|
17c8e8f123 | ||
|
|
38e420e402 | ||
|
|
0805a1759d | ||
|
|
9820144aa6 | ||
|
|
c667c54297 | ||
|
|
065346d15b | ||
|
|
753549a984 | ||
|
|
431226a45f | ||
|
|
29d8e2a173 | ||
|
|
c78618efff | ||
|
|
52848623bc | ||
|
|
745c2f4bc4 | ||
|
|
15de08aa96 | ||
|
|
22c33f67cb | ||
|
|
fc0e8fd8c0 | ||
|
|
fa7d2a4b55 | ||
|
|
bee6d2d062 | ||
|
|
42a49658fe | ||
|
|
a7d2429f6f | ||
|
|
d1f6ffde42 | ||
|
|
7b6571b8da | ||
|
|
61d954dd93 | ||
|
|
a1b93aabb1 | ||
|
|
9eca135220 | ||
|
|
d834c1dcb4 | ||
|
|
f423f0a2d0 | ||
|
|
543fe168b9 | ||
|
|
5150c2c48c | ||
|
|
9e6a1ff896 | ||
|
|
79620cc86a | ||
|
|
636ba91972 | ||
|
|
833533d02a | ||
|
|
e682a9795c | ||
|
|
6c4c0dcd41 | ||
|
|
2b3f43a6d0 | ||
|
|
23bf2f4f23 | ||
|
|
f5fd613d41 | ||
|
|
5286862260 | ||
|
|
6fdd61e21a | ||
|
|
f1c78a8d3f | ||
|
|
5766c18092 | ||
|
|
61d5f07a75 | ||
|
|
06c0fd58c2 | ||
|
|
4543110480 | ||
|
|
38534b6a35 | ||
|
|
5463a55d07 | ||
|
|
c3a5bb43c3 | ||
|
|
800a0b31f5 | ||
|
|
e04ba55db0 | ||
|
|
5f66021bc5 | ||
|
|
fe57f33abc | ||
|
|
2608466e43 | ||
|
|
7748b38a6e |
@@ -60,7 +60,9 @@
|
||||
"unicorn/no-array-callback-reference": "off",
|
||||
"unicorn/no-array-for-each": "off",
|
||||
"unicorn/no-for-loop": "off",
|
||||
"unicorn/no-negated-condition": "off",
|
||||
"unicorn/no-null": "off",
|
||||
"unicorn/no-typeof-undefined": "off",
|
||||
"unicorn/no-unused-properties": "error",
|
||||
"unicorn/prefer-dom-node-append": "off",
|
||||
"unicorn/prefer-dom-node-dataset": "off",
|
||||
|
||||
32
.github/dependabot.yml
vendored
32
.github/dependabot.yml
vendored
@@ -1,29 +1,5 @@
|
||||
version: 2
|
||||
updates:
|
||||
# for master branch
|
||||
- package-ecosystem: npm
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: weekly
|
||||
day: monday
|
||||
time: "03:00"
|
||||
open-pull-requests-limit: 10
|
||||
target-branch: "master"
|
||||
labels:
|
||||
- dependencies
|
||||
- version:3.1.x
|
||||
versioning-strategy: increase
|
||||
rebase-strategy: disabled
|
||||
- package-ecosystem: bundler
|
||||
directory: "/docs/"
|
||||
schedule:
|
||||
interval: weekly
|
||||
day: monday
|
||||
time: "03:00"
|
||||
open-pull-requests-limit: 10
|
||||
versioning-strategy: increase
|
||||
rebase-strategy: disabled
|
||||
|
||||
# for v4-dev branch
|
||||
- package-ecosystem: npm
|
||||
directory: "/"
|
||||
@@ -38,3 +14,11 @@ updates:
|
||||
- version:4.x
|
||||
versioning-strategy: increase
|
||||
rebase-strategy: disabled
|
||||
|
||||
# for github actions
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: weekly
|
||||
day: tuesday
|
||||
time: "03:00"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"extends": [
|
||||
"stylelint-config-twbs-bootstrap/scss"
|
||||
"stylelint-config-twbs-bootstrap"
|
||||
],
|
||||
"rules": {
|
||||
"declaration-no-important": null,
|
||||
|
||||
@@ -114,21 +114,25 @@ class CardRefresh {
|
||||
}
|
||||
|
||||
// Static
|
||||
|
||||
static _jQueryInterface(config) {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
const _options = $.extend({}, Default, $(this).data())
|
||||
return this.each(function () {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
const _config = $.extend({}, Default, typeof config === 'object' ? config : $(this).data())
|
||||
|
||||
if (!data) {
|
||||
data = new CardRefresh($(this), _options)
|
||||
$(this).data(DATA_KEY, typeof config === 'string' ? data : config)
|
||||
}
|
||||
if (!data) {
|
||||
data = new CardRefresh($(this), _config)
|
||||
$(this).data(DATA_KEY, data)
|
||||
data._init()
|
||||
} else if (typeof config === 'string') {
|
||||
if (typeof data[config] === 'undefined') {
|
||||
throw new TypeError(`No method named "${config}"`)
|
||||
}
|
||||
|
||||
if (typeof config === 'string' && /load/.test(config)) {
|
||||
data[config]()
|
||||
} else {
|
||||
data._init($(this))
|
||||
}
|
||||
data[config]()
|
||||
} else if (typeof config === 'undefined') {
|
||||
data._init()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -108,6 +108,7 @@ class CardWidget {
|
||||
this._parent.css({
|
||||
height: this._parent.height(),
|
||||
width: this._parent.width(),
|
||||
position: 'fixed',
|
||||
transition: 'all .15s'
|
||||
}).delay(150).queue(function () {
|
||||
const $element = $(this)
|
||||
@@ -176,13 +177,12 @@ class CardWidget {
|
||||
}
|
||||
|
||||
// Static
|
||||
|
||||
static _jQueryInterface(config) {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
const _options = $.extend({}, Default, $(this).data())
|
||||
const _config = $.extend({}, Default, $(this).data())
|
||||
|
||||
if (!data) {
|
||||
data = new CardWidget($(this), _options)
|
||||
data = new CardWidget($(this), _config)
|
||||
$(this).data(DATA_KEY, typeof config === 'string' ? data : config)
|
||||
}
|
||||
|
||||
|
||||
@@ -286,22 +286,24 @@ class ControlSidebar {
|
||||
}
|
||||
|
||||
// Static
|
||||
|
||||
static _jQueryInterface(operation) {
|
||||
static _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
const _options = $.extend({}, Default, $(this).data())
|
||||
const _config = $.extend({}, Default, typeof config === 'object' ? config : $(this).data())
|
||||
|
||||
if (!data) {
|
||||
data = new ControlSidebar(this, _options)
|
||||
data = new ControlSidebar($(this), _config)
|
||||
$(this).data(DATA_KEY, data)
|
||||
}
|
||||
data._init()
|
||||
} else if (typeof config === 'string') {
|
||||
if (typeof data[config] === 'undefined') {
|
||||
throw new TypeError(`No method named "${config}"`)
|
||||
}
|
||||
|
||||
if (data[operation] === 'undefined') {
|
||||
throw new Error(`${operation} is not a function`)
|
||||
data[config]()
|
||||
} else if (typeof config === 'undefined') {
|
||||
data._init()
|
||||
}
|
||||
|
||||
data[operation]()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,7 +40,6 @@ class DirectChat {
|
||||
}
|
||||
|
||||
// Static
|
||||
|
||||
static _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
@@ -48,9 +47,15 @@ class DirectChat {
|
||||
if (!data) {
|
||||
data = new DirectChat($(this))
|
||||
$(this).data(DATA_KEY, data)
|
||||
}
|
||||
} else if (typeof config === 'string') {
|
||||
if (typeof data[config] === 'undefined') {
|
||||
throw new TypeError(`No method named "${config}"`)
|
||||
}
|
||||
|
||||
data[config]()
|
||||
data[config]()
|
||||
} else if (typeof config === 'undefined') {
|
||||
data._init()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,18 +89,19 @@ class Dropdown {
|
||||
}
|
||||
|
||||
// Static
|
||||
|
||||
static _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
const _config = $.extend({}, Default, $(this).data())
|
||||
const _config = $.extend({}, Default, typeof config === 'object' ? config : $(this).data())
|
||||
|
||||
if (!data) {
|
||||
data = new Dropdown($(this), _config)
|
||||
$(this).data(DATA_KEY, data)
|
||||
}
|
||||
} else if (typeof config === 'string') {
|
||||
if (typeof data[config] === 'undefined') {
|
||||
throw new TypeError(`No method named "${config}"`)
|
||||
}
|
||||
|
||||
if (config === 'toggleSubmenu' || config === 'fixPosition') {
|
||||
data[config]()
|
||||
}
|
||||
})
|
||||
|
||||
@@ -30,14 +30,13 @@ const SELECTOR_ARIA_ATTR = 'aria-expanded'
|
||||
* ====================================================
|
||||
*/
|
||||
class ExpandableTable {
|
||||
constructor(element, options) {
|
||||
this._options = options
|
||||
constructor(element) {
|
||||
this._element = element
|
||||
}
|
||||
|
||||
// Public
|
||||
|
||||
init() {
|
||||
_init() {
|
||||
$(SELECTOR_DATA_TOGGLE).each((_, $header) => {
|
||||
const $type = $($header).attr(SELECTOR_ARIA_ATTR)
|
||||
const $body = $($header).next(SELECTOR_EXPANDABLE_BODY).children().first().children()
|
||||
@@ -80,8 +79,7 @@ class ExpandableTable {
|
||||
}
|
||||
|
||||
// Static
|
||||
|
||||
static _jQueryInterface(operation) {
|
||||
static _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
|
||||
@@ -90,8 +88,8 @@ class ExpandableTable {
|
||||
$(this).data(DATA_KEY, data)
|
||||
}
|
||||
|
||||
if (typeof operation === 'string' && /init|toggleRow/.test(operation)) {
|
||||
data[operation]()
|
||||
if (typeof config === 'string' && /init|toggleRow/.test(config)) {
|
||||
data[config]()
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -102,7 +100,7 @@ class ExpandableTable {
|
||||
* ====================================================
|
||||
*/
|
||||
$(SELECTOR_TABLE).ready(function () {
|
||||
ExpandableTable._jQueryInterface.call($(this), 'init')
|
||||
ExpandableTable._jQueryInterface.call($(this), '_init')
|
||||
})
|
||||
|
||||
$(document).on('click', SELECTOR_DATA_TOGGLE, function () {
|
||||
|
||||
@@ -34,7 +34,7 @@ const Default = {
|
||||
class Fullscreen {
|
||||
constructor(_element, _options) {
|
||||
this.element = _element
|
||||
this.options = $.extend({}, Default, _options)
|
||||
this.options = _options
|
||||
}
|
||||
|
||||
// Public
|
||||
@@ -82,24 +82,22 @@ class Fullscreen {
|
||||
}
|
||||
|
||||
// Static
|
||||
|
||||
static _jQueryInterface(config) {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
return this.each(function () {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
const _config = $.extend({}, Default, typeof config === 'object' ? config : $(this).data())
|
||||
|
||||
if (!data) {
|
||||
data = $(this).data()
|
||||
}
|
||||
if (!data) {
|
||||
data = new Fullscreen($(this), _config)
|
||||
$(this).data(DATA_KEY, data)
|
||||
} else if (typeof config === 'string') {
|
||||
if (typeof data[config] === 'undefined') {
|
||||
throw new TypeError(`No method named "${config}"`)
|
||||
}
|
||||
|
||||
const _options = $.extend({}, Default, typeof config === 'object' ? config : data)
|
||||
const plugin = new Fullscreen($(this), _options)
|
||||
|
||||
$(this).data(DATA_KEY, typeof config === 'object' ? config : data)
|
||||
|
||||
if (typeof config === 'string' && /toggle|toggleIcon|fullscreen|windowed/.test(config)) {
|
||||
plugin[config]()
|
||||
} else {
|
||||
plugin.init()
|
||||
}
|
||||
data[config]()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// noinspection EqualityComparisonWithCoercionJS
|
||||
|
||||
/**
|
||||
* --------------------------------------------
|
||||
* AdminLTE IFrame.js
|
||||
@@ -106,7 +108,11 @@ class IFrame {
|
||||
if (autoOpen) {
|
||||
if (this._config.loadingScreen) {
|
||||
const $loadingScreen = $(SELECTOR_TAB_LOADING)
|
||||
$loadingScreen.fadeIn()
|
||||
|
||||
if (!$loadingScreen.is(':animated')) {
|
||||
$loadingScreen.fadeIn()
|
||||
}
|
||||
|
||||
$(`${tabId} iframe`).ready(() => {
|
||||
if (typeof this._config.loadingScreen === 'number') {
|
||||
this.switchTab(`#${navId}`)
|
||||
@@ -258,8 +264,6 @@ class IFrame {
|
||||
|
||||
if (usingDefTab) {
|
||||
const $el = $(`${SELECTOR_TAB_PANE}`).first()
|
||||
// eslint-disable-next-line no-console
|
||||
console.log($el)
|
||||
const uniqueName = $el.attr('id').replace('panel-', '')
|
||||
const navId = `#tab-${uniqueName}`
|
||||
|
||||
@@ -268,7 +272,7 @@ class IFrame {
|
||||
}
|
||||
|
||||
_initFrameElement() {
|
||||
if (window.frameElement && this._config.autoIframeMode) {
|
||||
if (window.frameElement && this._config?.autoIframeMode) {
|
||||
const $body = $('body')
|
||||
$body.addClass(CLASS_NAME_IFRAME_MODE)
|
||||
|
||||
@@ -316,7 +320,7 @@ class IFrame {
|
||||
e.preventDefault()
|
||||
let { target } = e
|
||||
|
||||
if (target.nodeName == 'I') {
|
||||
if (target.nodeName === 'I') {
|
||||
target = e.target.offsetParent
|
||||
}
|
||||
|
||||
@@ -411,8 +415,8 @@ class IFrame {
|
||||
}
|
||||
|
||||
// Static
|
||||
|
||||
static _jQueryInterface(config) {
|
||||
// eslint-disable-next-line max-params
|
||||
static _jQueryInterface(config, name, link, id, reload) {
|
||||
if ($(SELECTOR_DATA_TOGGLE).length > 0) {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
|
||||
@@ -422,16 +426,14 @@ class IFrame {
|
||||
|
||||
const _options = $.extend({}, Default, typeof config === 'object' ? config : data)
|
||||
localStorage.setItem('AdminLTE:IFrame:Options', JSON.stringify(_options))
|
||||
|
||||
const plugin = new IFrame($(this), _options)
|
||||
|
||||
$(this).data(DATA_KEY, typeof config === 'object' ? config : data)
|
||||
|
||||
window.iFrameInstance = plugin
|
||||
$(this).data(DATA_KEY, typeof config === 'object' ? config : { link, name, id, reload, ...data })
|
||||
if (typeof config === 'string' && /createTab|openTabSidebar|switchTab|removeActiveTab/.test(config)) {
|
||||
plugin[config]()
|
||||
plugin[config](name, link, id, reload)
|
||||
}
|
||||
} else {
|
||||
new IFrame($(this), JSON.parse(localStorage.getItem('AdminLTE:IFrame:Options')))._initFrameElement()
|
||||
window.iFrameInstance = new IFrame($(this), JSON.parse(localStorage.getItem('AdminLTE:IFrame:Options')))._initFrameElement()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -210,21 +210,23 @@ class Layout {
|
||||
}
|
||||
|
||||
// Static
|
||||
|
||||
static _jQueryInterface(config = '') {
|
||||
static _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
const _options = $.extend({}, Default, $(this).data())
|
||||
const _config = $.extend({}, Default, typeof config === 'object' ? config : $(this).data())
|
||||
|
||||
if (!data) {
|
||||
data = new Layout($(this), _options)
|
||||
data = new Layout($(this), _config)
|
||||
$(this).data(DATA_KEY, data)
|
||||
}
|
||||
|
||||
if (config === 'init' || config === '') {
|
||||
data._init()
|
||||
} else if (config === 'fixLayoutHeight' || config === 'fixLoginRegisterHeight') {
|
||||
} else if (typeof config === 'string') {
|
||||
if (typeof data[config] === 'undefined') {
|
||||
throw new TypeError(`No method named "${config}"`)
|
||||
}
|
||||
|
||||
data[config]()
|
||||
} else if (typeof config === 'undefined') {
|
||||
data._init()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ const Default = {
|
||||
class NavbarSearch {
|
||||
constructor(_element, _options) {
|
||||
this._element = _element
|
||||
this._config = $.extend({}, Default, _options)
|
||||
this._config = _options
|
||||
}
|
||||
|
||||
// Public
|
||||
@@ -62,22 +62,21 @@ class NavbarSearch {
|
||||
}
|
||||
|
||||
// Static
|
||||
|
||||
static _jQueryInterface(options) {
|
||||
static _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
const _options = $.extend({}, Default, $(this).data())
|
||||
const _config = $.extend({}, Default, typeof config === 'object' ? config : $(this).data())
|
||||
|
||||
if (!data) {
|
||||
data = new NavbarSearch(this, _options)
|
||||
data = new NavbarSearch($(this), _config)
|
||||
$(this).data(DATA_KEY, data)
|
||||
}
|
||||
} else if (typeof config === 'string') {
|
||||
if (typeof data[config] === 'undefined') {
|
||||
throw new TypeError(`No method named "${config}"`)
|
||||
}
|
||||
|
||||
if (!/toggle|close|open/.test(options)) {
|
||||
throw new Error(`Undefined method ${options}`)
|
||||
data[config]()
|
||||
}
|
||||
|
||||
data[options]()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ const Default = {
|
||||
class PushMenu {
|
||||
constructor(element, options) {
|
||||
this._element = element
|
||||
this._options = $.extend({}, Default, options)
|
||||
this._options = options
|
||||
|
||||
if ($(SELECTOR_OVERLAY).length === 0) {
|
||||
this._addOverlay()
|
||||
@@ -175,19 +175,23 @@ class PushMenu {
|
||||
}
|
||||
|
||||
// Static
|
||||
|
||||
static _jQueryInterface(operation) {
|
||||
static _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
const _options = $.extend({}, Default, $(this).data())
|
||||
const _config = $.extend({}, Default, typeof config === 'object' ? config : $(this).data())
|
||||
|
||||
if (!data) {
|
||||
data = new PushMenu(this, _options)
|
||||
data = new PushMenu($(this), _config)
|
||||
$(this).data(DATA_KEY, data)
|
||||
}
|
||||
data._init()
|
||||
} else if (typeof config === 'string') {
|
||||
if (typeof data[config] === 'undefined') {
|
||||
throw new TypeError(`No method named "${config}"`)
|
||||
}
|
||||
|
||||
if (typeof operation === 'string' && /collapse|expand|toggle/.test(operation)) {
|
||||
data[operation]()
|
||||
data[config]()
|
||||
} else if (typeof config === 'undefined') {
|
||||
data._init()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ class SidebarSearch {
|
||||
|
||||
// Public
|
||||
|
||||
init() {
|
||||
_init() {
|
||||
if ($(SELECTOR_DATA_WIDGET).length === 0) {
|
||||
return
|
||||
}
|
||||
@@ -207,24 +207,25 @@ class SidebarSearch {
|
||||
}
|
||||
|
||||
// Static
|
||||
|
||||
static _jQueryInterface(config) {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
return this.each(function () {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
const _config = $.extend({}, Default, typeof config === 'object' ? config : $(this).data())
|
||||
|
||||
if (!data) {
|
||||
data = $(this).data()
|
||||
}
|
||||
if (!data) {
|
||||
data = new SidebarSearch($(this), _config)
|
||||
$(this).data(DATA_KEY, data)
|
||||
data._init()
|
||||
} else if (typeof config === 'string') {
|
||||
if (typeof data[config] === 'undefined') {
|
||||
throw new TypeError(`No method named "${config}"`)
|
||||
}
|
||||
|
||||
const _options = $.extend({}, Default, typeof config === 'object' ? config : data)
|
||||
const plugin = new SidebarSearch($(this), _options)
|
||||
|
||||
$(this).data(DATA_KEY, typeof config === 'object' ? config : data)
|
||||
|
||||
if (typeof config === 'string' && /init|toggle|close|open|search/.test(config)) {
|
||||
plugin[config]()
|
||||
} else {
|
||||
plugin.init()
|
||||
}
|
||||
data[config]()
|
||||
} else if (typeof config === 'undefined') {
|
||||
data._init()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// noinspection EqualityComparisonWithCoercionJS
|
||||
|
||||
/**
|
||||
* --------------------------------------------
|
||||
* AdminLTE Toasts.js
|
||||
@@ -140,19 +142,19 @@ class Toasts {
|
||||
// Static
|
||||
|
||||
_getContainerId() {
|
||||
if (this._config.position == POSITION_TOP_RIGHT) {
|
||||
if (this._config.position === POSITION_TOP_RIGHT) {
|
||||
return SELECTOR_CONTAINER_TOP_RIGHT
|
||||
}
|
||||
|
||||
if (this._config.position == POSITION_TOP_LEFT) {
|
||||
if (this._config.position === POSITION_TOP_LEFT) {
|
||||
return SELECTOR_CONTAINER_TOP_LEFT
|
||||
}
|
||||
|
||||
if (this._config.position == POSITION_BOTTOM_RIGHT) {
|
||||
if (this._config.position === POSITION_BOTTOM_RIGHT) {
|
||||
return SELECTOR_CONTAINER_BOTTOM_RIGHT
|
||||
}
|
||||
|
||||
if (this._config.position == POSITION_BOTTOM_LEFT) {
|
||||
if (this._config.position === POSITION_BOTTOM_LEFT) {
|
||||
return SELECTOR_CONTAINER_BOTTOM_LEFT
|
||||
}
|
||||
}
|
||||
@@ -181,7 +183,6 @@ class Toasts {
|
||||
}
|
||||
|
||||
// Static
|
||||
|
||||
static _jQueryInterface(option, config) {
|
||||
return this.each(function () {
|
||||
const _options = $.extend({}, Default, config)
|
||||
|
||||
@@ -46,7 +46,7 @@ class TodoList {
|
||||
toggle(item) {
|
||||
item.parents('li').toggleClass(CLASS_NAME_TODO_LIST_DONE)
|
||||
if (!$(item).prop('checked')) {
|
||||
this.unCheck($(item))
|
||||
this.unCheck(item)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -54,11 +54,11 @@ class TodoList {
|
||||
}
|
||||
|
||||
check(item) {
|
||||
this._config.onCheck.call(item)
|
||||
this._config.onCheck(item)
|
||||
}
|
||||
|
||||
unCheck(item) {
|
||||
this._config.onUnCheck.call(item)
|
||||
this._config.onUnCheck(item)
|
||||
}
|
||||
|
||||
// Private
|
||||
@@ -73,22 +73,23 @@ class TodoList {
|
||||
}
|
||||
|
||||
// Static
|
||||
|
||||
static _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
const _config = $.extend({}, Default, typeof config === 'object' ? config : $(this).data())
|
||||
|
||||
if (!data) {
|
||||
data = $(this).data()
|
||||
}
|
||||
data = new TodoList($(this), _config)
|
||||
$(this).data(DATA_KEY, data)
|
||||
data._init()
|
||||
} else if (typeof config === 'string') {
|
||||
if (typeof data[config] === 'undefined') {
|
||||
throw new TypeError(`No method named "${config}"`)
|
||||
}
|
||||
|
||||
const _options = $.extend({}, Default, typeof config === 'object' ? config : data)
|
||||
const plugin = new TodoList($(this), _options)
|
||||
|
||||
$(this).data(DATA_KEY, typeof config === 'object' ? config : data)
|
||||
|
||||
if (config === 'init') {
|
||||
plugin[config]()
|
||||
data[config]()
|
||||
} else if (typeof config === 'undefined') {
|
||||
data._init()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ class Treeview {
|
||||
|
||||
// Public
|
||||
|
||||
init() {
|
||||
_init() {
|
||||
$(`${SELECTOR_LI}${SELECTOR_OPEN} ${SELECTOR_TREEVIEW_MENU}${SELECTOR_OPEN}`).css('display', 'block')
|
||||
this._setupListeners()
|
||||
}
|
||||
@@ -131,19 +131,23 @@ class Treeview {
|
||||
}
|
||||
|
||||
// Static
|
||||
|
||||
static _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
const _options = $.extend({}, Default, $(this).data())
|
||||
const _config = $.extend({}, Default, typeof config === 'object' ? config : $(this).data())
|
||||
|
||||
if (!data) {
|
||||
data = new Treeview($(this), _options)
|
||||
data = new Treeview($(this), _config)
|
||||
$(this).data(DATA_KEY, data)
|
||||
}
|
||||
data._init()
|
||||
} else if (typeof config === 'string') {
|
||||
if (typeof data[config] === 'undefined') {
|
||||
throw new TypeError(`No method named "${config}"`)
|
||||
}
|
||||
|
||||
if (config === 'init') {
|
||||
data[config]()
|
||||
} else if (typeof config === 'undefined') {
|
||||
data._init()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
"rules": {
|
||||
"no-console": "off",
|
||||
"strict": "error",
|
||||
"unicorn/prefer-module": "off"
|
||||
"unicorn/prefer-module": "off",
|
||||
"unicorn/prefer-node-protocol": "off"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,11 +21,14 @@ class Publish {
|
||||
const arg = process.argv[2]
|
||||
switch (arg) {
|
||||
case '-v':
|
||||
case '--verbose':
|
||||
case '--verbose': {
|
||||
this.options.verbose = true
|
||||
break
|
||||
default:
|
||||
}
|
||||
|
||||
default: {
|
||||
throw new Error(`Unknown option ${arg}`)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -369,14 +369,14 @@ const Plugins = [
|
||||
from: 'node_modules/jsgrid/demos/db.js',
|
||||
to: 'plugins/jsgrid/demos/db.js'
|
||||
},
|
||||
// flag-icon-css
|
||||
// flag-icons
|
||||
{
|
||||
from: 'node_modules/flag-icon-css/css',
|
||||
to: 'plugins/flag-icon-css/css'
|
||||
from: 'node_modules/flag-icons/css',
|
||||
to: 'plugins/flag-icons/css'
|
||||
},
|
||||
{
|
||||
from: 'node_modules/flag-icon-css/flags',
|
||||
to: 'plugins/flag-icon-css/flags'
|
||||
from: 'node_modules/flag-icons/flags',
|
||||
to: 'plugins/flag-icons/flags'
|
||||
},
|
||||
// bootstrap4-duallistbox
|
||||
{
|
||||
@@ -393,11 +393,6 @@ const Plugins = [
|
||||
from: 'node_modules/ekko-lightbox/dist',
|
||||
to: 'plugins/ekko-lightbox/'
|
||||
},
|
||||
// bootstrap-switch
|
||||
{
|
||||
from: 'node_modules/bootstrap-switch/dist',
|
||||
to: 'plugins/bootstrap-switch/'
|
||||
},
|
||||
// jQuery Validate
|
||||
{
|
||||
from: 'node_modules/jquery-validation/dist/',
|
||||
|
||||
@@ -20,11 +20,14 @@ class Publish {
|
||||
const arg = process.argv[2]
|
||||
switch (arg) {
|
||||
case '-v':
|
||||
case '--verbose':
|
||||
case '--verbose': {
|
||||
this.options.verbose = true
|
||||
break
|
||||
default:
|
||||
}
|
||||
|
||||
default: {
|
||||
throw new Error(`Unknown option ${arg}`)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,6 +86,7 @@
|
||||
position: relative;
|
||||
text-align: center;
|
||||
|
||||
/* stylelint-disable selector-class-pattern */
|
||||
// Icons within the btn
|
||||
> .fa,
|
||||
> .fas,
|
||||
@@ -102,6 +103,7 @@
|
||||
> .svg-inline--fa {
|
||||
margin: 0 auto;
|
||||
}
|
||||
/* stylelint-enable selector-class-pattern */
|
||||
|
||||
&:hover {
|
||||
background-color: $button-default-background-color;
|
||||
|
||||
@@ -411,6 +411,7 @@ html.maximized-card {
|
||||
display: none;
|
||||
float: right;
|
||||
|
||||
/* stylelint-disable selector-class-pattern */
|
||||
// icons
|
||||
> .fa,
|
||||
> .fas,
|
||||
@@ -423,6 +424,7 @@ html.maximized-card {
|
||||
cursor: pointer;
|
||||
margin-right: 5px;
|
||||
}
|
||||
/* stylelint-enable selector-class-pattern */
|
||||
}
|
||||
|
||||
&:hover .tools {
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
/* stylelint-disable selector-class-pattern */
|
||||
> .fa,
|
||||
> .fas,
|
||||
> .far,
|
||||
@@ -25,4 +26,5 @@
|
||||
top: 50%;
|
||||
z-index: 5;
|
||||
}
|
||||
/* stylelint-enable selector-class-pattern */
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
// Add fade animation to dropdown menus by appending
|
||||
// the class .animated-dropdown-menu to the .dropdown-menu ul (or ol)
|
||||
.open:not(.dropup) > .animated-dropdown-menu {
|
||||
@include animation(flipInX .7s both);
|
||||
@include animation(flip-in-x .7s both);
|
||||
backface-visibility: visible !important;
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* stylelint-disable selector-class-pattern */
|
||||
// Support icons in form-control
|
||||
.form-control-feedback {
|
||||
&.fa,
|
||||
@@ -105,6 +105,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
/* stylelint-enable selector-class-pattern */
|
||||
|
||||
label:not(.form-check-label):not(.custom-file-label) {
|
||||
font-weight: $font-weight-bold;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// Core: Layout
|
||||
//
|
||||
|
||||
html.scroll-smooth {
|
||||
html {
|
||||
scroll-behavior: smooth;
|
||||
}
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
height: $nav-link-sm-height;
|
||||
padding: $nav-link-sm-padding-y $nav-link-padding-x;
|
||||
|
||||
/* stylelint-disable selector-class-pattern */
|
||||
> .fa,
|
||||
> .fas,
|
||||
> .far,
|
||||
@@ -27,8 +28,8 @@
|
||||
> .ion {
|
||||
font-size: $font-size-sm;
|
||||
}
|
||||
/* stylelint-enable selector-class-pattern */
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.navbar-nav {
|
||||
|
||||
@@ -131,6 +131,7 @@
|
||||
text-align: center;
|
||||
width: $sidebar-nav-icon-width;
|
||||
|
||||
/* stylelint-disable selector-class-pattern */
|
||||
&.fa,
|
||||
&.fas,
|
||||
&.far,
|
||||
@@ -141,6 +142,7 @@
|
||||
&.ion {
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
/* stylelint-enable selector-class-pattern */
|
||||
}
|
||||
|
||||
.float-right {
|
||||
@@ -202,7 +204,7 @@
|
||||
|
||||
.sidebar-is-opening .sidebar .nav-sidebar {
|
||||
.nav-link p {
|
||||
animation-name: fadeIn;
|
||||
animation-name: fade-in;
|
||||
animation-duration: $transition-speed;
|
||||
animation-fill-mode: both;
|
||||
}
|
||||
@@ -857,7 +859,7 @@
|
||||
.nav-collapse-hide-child {
|
||||
.menu-open > .nav-treeview {
|
||||
max-height: min-content;
|
||||
animation-name: fadeIn;
|
||||
animation-name: fade-in;
|
||||
animation-duration: $transition-speed;
|
||||
animation-fill-mode: both;
|
||||
}
|
||||
@@ -865,7 +867,7 @@
|
||||
.sidebar-collapse .sidebar:not(:hover) & {
|
||||
.menu-open > .nav-treeview {
|
||||
max-height: 0;
|
||||
animation-name: fadeOut;
|
||||
animation-name: fade-out;
|
||||
animation-duration: $transition-speed;
|
||||
animation-fill-mode: both;
|
||||
}
|
||||
@@ -878,7 +880,7 @@
|
||||
.main-sidebar:not(.sidebar-no-expand):hover & {
|
||||
.menu-open > .nav-treeview {
|
||||
max-height: min-content;
|
||||
animation-name: fadeIn;
|
||||
animation-name: fade-in;
|
||||
animation-duration: $transition-speed;
|
||||
animation-fill-mode: both;
|
||||
}
|
||||
|
||||
@@ -264,6 +264,7 @@
|
||||
justify-content: center;
|
||||
z-index: 50;
|
||||
|
||||
/* stylelint-disable selector-class-pattern */
|
||||
> .fa,
|
||||
> .fas,
|
||||
> .far,
|
||||
@@ -274,10 +275,12 @@
|
||||
> .ion {
|
||||
color: $gray-800;
|
||||
}
|
||||
/* stylelint-enable selector-class-pattern */
|
||||
|
||||
&.dark {
|
||||
background-color: rgba($black, .5);
|
||||
|
||||
/* stylelint-disable selector-class-pattern */
|
||||
> .fa,
|
||||
> .fas,
|
||||
> .far,
|
||||
@@ -288,6 +291,7 @@
|
||||
> .ion {
|
||||
color: $gray-400;
|
||||
}
|
||||
/* stylelint-enable selector-class-pattern */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -436,14 +436,14 @@
|
||||
}
|
||||
|
||||
.logo-xs {
|
||||
animation-name: fadeIn;
|
||||
animation-name: fade-in;
|
||||
animation-duration: $transition-speed;
|
||||
animation-fill-mode: both;
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.logo-xl {
|
||||
animation-name: fadeOut;
|
||||
animation-name: fade-out;
|
||||
animation-duration: $transition-speed;
|
||||
animation-fill-mode: both;
|
||||
visibility: hidden;
|
||||
@@ -458,7 +458,7 @@
|
||||
.user-panel > .info,
|
||||
.nav-sidebar .nav-link p {
|
||||
margin-left: -10px;
|
||||
animation-name: fadeOut;
|
||||
animation-name: fade-out;
|
||||
animation-duration: $transition-speed;
|
||||
animation-fill-mode: both;
|
||||
visibility: hidden;
|
||||
|
||||
@@ -83,6 +83,8 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* stylelint-disable selector-class-pattern */
|
||||
// The icons at line
|
||||
> .fa,
|
||||
> .fas,
|
||||
@@ -106,6 +108,7 @@
|
||||
> .svg-inline--fa {
|
||||
padding: 7px;
|
||||
}
|
||||
/* stylelint-enable selector-class-pattern */
|
||||
}
|
||||
// Time label
|
||||
> .time-label {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
//
|
||||
|
||||
|
||||
@keyframes flipInX {
|
||||
@keyframes flip-in-x {
|
||||
0% {
|
||||
transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
|
||||
transition-timing-function: ease-in;
|
||||
@@ -30,7 +30,7 @@
|
||||
}
|
||||
|
||||
|
||||
@keyframes fadeIn {
|
||||
@keyframes fade-in {
|
||||
from {
|
||||
opacity: 0;
|
||||
}
|
||||
@@ -40,7 +40,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes fadeOut {
|
||||
@keyframes fade-out {
|
||||
from {
|
||||
opacity: 1;
|
||||
}
|
||||
@@ -115,5 +115,3 @@
|
||||
transform: none;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
// Background Variant
|
||||
@mixin background-variant($name, $color) {
|
||||
&.bg-#{$name} {
|
||||
#{if(&, "&.bg-#{$name}",".bg-#{$name}")} {
|
||||
background-color: #{$color} !important;
|
||||
|
||||
&,
|
||||
|
||||
@@ -54,14 +54,14 @@
|
||||
.sidebar .nav-sidebar .nav-link p,
|
||||
.brand-text {
|
||||
margin-left: -10px;
|
||||
animation-name: fadeOut;
|
||||
animation-name: fade-out;
|
||||
animation-duration: $transition-speed;
|
||||
animation-fill-mode: both;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.logo-xl {
|
||||
animation-name: fadeOut;
|
||||
animation-name: fade-out;
|
||||
animation-duration: $transition-speed;
|
||||
animation-fill-mode: both;
|
||||
visibility: hidden;
|
||||
@@ -69,7 +69,7 @@
|
||||
|
||||
.logo-xs {
|
||||
display: inline-block;
|
||||
animation-name: fadeIn;
|
||||
animation-name: fade-in;
|
||||
animation-duration: $transition-speed;
|
||||
animation-fill-mode: both;
|
||||
visibility: visible;
|
||||
@@ -115,14 +115,14 @@
|
||||
.logo-xl {
|
||||
display: inline-block;
|
||||
margin-left: 0;
|
||||
animation-name: fadeIn;
|
||||
animation-name: fade-in;
|
||||
animation-duration: $transition-speed;
|
||||
animation-fill-mode: both;
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.logo-xs {
|
||||
animation-name: fadeOut;
|
||||
animation-name: fade-out;
|
||||
animation-duration: $transition-speed;
|
||||
animation-fill-mode: both;
|
||||
visibility: hidden;
|
||||
|
||||
@@ -36,7 +36,7 @@ body.iframe-mode-fullscreen {
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
animation-name: fadeIn;
|
||||
animation-name: fade-in;
|
||||
animation-duration: $transition-speed;
|
||||
animation-fill-mode: both;
|
||||
visibility: visible;
|
||||
@@ -59,7 +59,7 @@ body.iframe-mode-fullscreen {
|
||||
&:hover,
|
||||
&:focus {
|
||||
.btn-iframe-close {
|
||||
animation-name: fadeIn;
|
||||
animation-name: fade-in;
|
||||
animation-duration: $transition-speed;
|
||||
animation-fill-mode: both;
|
||||
visibility: visible;
|
||||
|
||||
BIN
dist/img/boxed-bg.jpg
vendored
BIN
dist/img/boxed-bg.jpg
vendored
Binary file not shown.
|
Before Width: | Height: | Size: 121 KiB |
BIN
dist/img/boxed-bg.png
vendored
BIN
dist/img/boxed-bg.png
vendored
Binary file not shown.
|
Before Width: | Height: | Size: 43 KiB |
2
dist/js/.eslintrc.json
vendored
2
dist/js/.eslintrc.json
vendored
@@ -45,6 +45,7 @@
|
||||
"unicorn/no-array-for-each": "off",
|
||||
"unicorn/no-for-loop": "off",
|
||||
"unicorn/no-null": "off",
|
||||
"unicorn/no-typeof-undefined": "off",
|
||||
"unicorn/numeric-separators-style": "off",
|
||||
"unicorn/prefer-dataset": "off",
|
||||
"unicorn/prefer-includes": "off",
|
||||
@@ -52,6 +53,7 @@
|
||||
"unicorn/prefer-node-append": "off",
|
||||
"unicorn/prefer-query-selector": "off",
|
||||
"unicorn/prefer-spread": "off",
|
||||
"unicorn/prefer-top-level-await": "off",
|
||||
"unicorn/prevent-abbreviations": "off"
|
||||
}
|
||||
}
|
||||
|
||||
59
dist/js/demo.js
vendored
59
dist/js/demo.js
vendored
@@ -504,7 +504,7 @@
|
||||
})
|
||||
var navbar_all_colors = navbar_dark_skins.concat(navbar_light_skins)
|
||||
var $navbar_variants_colors = createSkinBlock(navbar_all_colors, function () {
|
||||
var color = $(this).find('option:selected').attr('class')
|
||||
var color = $(this).find('option:selected').attr('class').replace('bg-', 'navbar-')
|
||||
var $main_header = $('.main-header')
|
||||
$main_header.removeClass('navbar-dark').removeClass('navbar-light')
|
||||
navbar_all_colors.forEach(function (color) {
|
||||
@@ -525,11 +525,14 @@
|
||||
})
|
||||
|
||||
var active_navbar_color = null
|
||||
$('.main-header')[0].classList.forEach(function (className) {
|
||||
if (navbar_all_colors.indexOf(className) > -1 && active_navbar_color === null) {
|
||||
active_navbar_color = className.replace('navbar-', 'bg-')
|
||||
}
|
||||
})
|
||||
var $main_header = $('.main-header')
|
||||
if ($main_header.length > 0) {
|
||||
$main_header[0].classList.forEach(function (className) {
|
||||
if (navbar_all_colors.indexOf(className) > -1 && active_navbar_color === null) {
|
||||
active_navbar_color = className.replace('navbar-', 'bg-')
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
$navbar_variants_colors.find('option.' + active_navbar_color).prop('selected', true)
|
||||
$navbar_variants_colors.removeClass().addClass('custom-select mb-3 text-light border-0 ').addClass(active_navbar_color)
|
||||
@@ -590,12 +593,15 @@
|
||||
$container.append($sidebar_dark_variants)
|
||||
|
||||
var active_sidebar_dark_color = null
|
||||
$('.main-sidebar')[0].classList.forEach(function (className) {
|
||||
var color = className.replace('sidebar-dark-', 'bg-')
|
||||
if (sidebar_colors.indexOf(color) > -1 && active_sidebar_dark_color === null) {
|
||||
active_sidebar_dark_color = color
|
||||
}
|
||||
})
|
||||
var $main_sidebar = $('.main-sidebar')
|
||||
if ($main_sidebar.length > 0) {
|
||||
$main_sidebar[0].classList.forEach(function (className) {
|
||||
var color = className.replace('sidebar-dark-', 'bg-')
|
||||
if (sidebar_colors.indexOf(color) > -1 && active_sidebar_dark_color === null) {
|
||||
active_sidebar_dark_color = color
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
$sidebar_dark_variants.find('option.' + active_sidebar_dark_color).prop('selected', true)
|
||||
$sidebar_dark_variants.removeClass().addClass('custom-select mb-3 text-light border-0 ').addClass(active_sidebar_dark_color)
|
||||
@@ -623,12 +629,14 @@
|
||||
$container.append($sidebar_light_variants)
|
||||
|
||||
var active_sidebar_light_color = null
|
||||
$('.main-sidebar')[0].classList.forEach(function (className) {
|
||||
var color = className.replace('sidebar-light-', 'bg-')
|
||||
if (sidebar_colors.indexOf(color) > -1 && active_sidebar_light_color === null) {
|
||||
active_sidebar_light_color = color
|
||||
}
|
||||
})
|
||||
if ($main_sidebar.length > 0) {
|
||||
$main_sidebar[0].classList.forEach(function (className) {
|
||||
var color = className.replace('sidebar-light-', 'bg-')
|
||||
if (sidebar_colors.indexOf(color) > -1 && active_sidebar_light_color === null) {
|
||||
active_sidebar_light_color = color
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
if (active_sidebar_light_color !== null) {
|
||||
$sidebar_light_variants.find('option.' + active_sidebar_light_color).prop('selected', true)
|
||||
@@ -652,7 +660,7 @@
|
||||
})
|
||||
|
||||
var $brand_variants = createSkinBlock(logo_skins, function () {
|
||||
var color = $(this).find('option:selected').attr('class')
|
||||
var color = $(this).find('option:selected').attr('class').replace('bg-', 'navbar-')
|
||||
var $logo = $('.brand-link')
|
||||
|
||||
if (color === 'navbar-light' || color === 'navbar-white') {
|
||||
@@ -676,11 +684,14 @@
|
||||
$container.append($brand_variants)
|
||||
|
||||
var active_brand_color = null
|
||||
$('.brand-link')[0].classList.forEach(function (className) {
|
||||
if (logo_skins.indexOf(className) > -1 && active_brand_color === null) {
|
||||
active_brand_color = className.replace('navbar-', 'bg-')
|
||||
}
|
||||
})
|
||||
var $brand_link = $('.brand-link')
|
||||
if ($brand_link.length > 0) {
|
||||
$brand_link[0].classList.forEach(function (className) {
|
||||
if (logo_skins.indexOf(className) > -1 && active_brand_color === null) {
|
||||
active_brand_color = className.replace('navbar-', 'bg-')
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
if (active_brand_color) {
|
||||
$brand_variants.find('option.' + active_brand_color).prop('selected', true)
|
||||
|
||||
4
docs/Gemfile
vendored
4
docs/Gemfile
vendored
@@ -1,8 +1,8 @@
|
||||
source 'https://rubygems.org'
|
||||
|
||||
group :development, :test do
|
||||
gem 'jekyll', '~> 4.2.1'
|
||||
gem 'jekyll-seo-tag', '~> 2.7.1'
|
||||
gem 'jekyll', '~> 4.2.2'
|
||||
gem 'jekyll-seo-tag', '~> 2.8.0'
|
||||
gem 'jekyll-sitemap', '~> 1.4.0'
|
||||
gem 'wdm', '~> 0.1.1', :install_if => Gem.win_platform?
|
||||
end
|
||||
|
||||
34
docs/Gemfile.lock
vendored
34
docs/Gemfile.lock
vendored
@@ -4,19 +4,19 @@ GEM
|
||||
addressable (2.8.0)
|
||||
public_suffix (>= 2.0.2, < 5.0)
|
||||
colorator (1.1.0)
|
||||
concurrent-ruby (1.1.9)
|
||||
em-websocket (0.5.2)
|
||||
concurrent-ruby (1.1.10)
|
||||
em-websocket (0.5.3)
|
||||
eventmachine (>= 0.12.9)
|
||||
http_parser.rb (~> 0.6.0)
|
||||
http_parser.rb (~> 0)
|
||||
eventmachine (1.2.7)
|
||||
eventmachine (1.2.7-x64-mingw32)
|
||||
ffi (1.15.4)
|
||||
ffi (1.15.4-x64-mingw32)
|
||||
ffi (1.15.5)
|
||||
ffi (1.15.5-x64-mingw32)
|
||||
forwardable-extended (2.6.0)
|
||||
http_parser.rb (0.6.0)
|
||||
i18n (1.8.10)
|
||||
http_parser.rb (0.8.0)
|
||||
i18n (1.10.0)
|
||||
concurrent-ruby (~> 1.0)
|
||||
jekyll (4.2.1)
|
||||
jekyll (4.2.2)
|
||||
addressable (~> 2.4)
|
||||
colorator (~> 1.0)
|
||||
em-websocket (~> 0.5)
|
||||
@@ -31,31 +31,31 @@ GEM
|
||||
rouge (~> 3.0)
|
||||
safe_yaml (~> 1.0)
|
||||
terminal-table (~> 2.0)
|
||||
jekyll-sass-converter (2.1.0)
|
||||
jekyll-sass-converter (2.2.0)
|
||||
sassc (> 2.0.1, < 3.0)
|
||||
jekyll-seo-tag (2.7.1)
|
||||
jekyll-seo-tag (2.8.0)
|
||||
jekyll (>= 3.8, < 5.0)
|
||||
jekyll-sitemap (1.4.0)
|
||||
jekyll (>= 3.7, < 5.0)
|
||||
jekyll-watch (2.2.1)
|
||||
listen (~> 3.0)
|
||||
kramdown (2.3.1)
|
||||
kramdown (2.4.0)
|
||||
rexml
|
||||
kramdown-parser-gfm (1.1.0)
|
||||
kramdown (~> 2.0)
|
||||
liquid (4.0.3)
|
||||
listen (3.7.0)
|
||||
listen (3.7.1)
|
||||
rb-fsevent (~> 0.10, >= 0.10.3)
|
||||
rb-inotify (~> 0.9, >= 0.9.10)
|
||||
mercenary (0.4.0)
|
||||
pathutil (0.16.2)
|
||||
forwardable-extended (~> 2.6)
|
||||
public_suffix (4.0.6)
|
||||
rb-fsevent (0.11.0)
|
||||
public_suffix (4.0.7)
|
||||
rb-fsevent (0.11.1)
|
||||
rb-inotify (0.10.1)
|
||||
ffi (~> 1.0)
|
||||
rexml (3.2.5)
|
||||
rouge (3.26.1)
|
||||
rouge (3.29.0)
|
||||
safe_yaml (1.0.5)
|
||||
sassc (2.4.0)
|
||||
ffi (~> 1.9)
|
||||
@@ -72,8 +72,8 @@ PLATFORMS
|
||||
x64-mingw32
|
||||
|
||||
DEPENDENCIES
|
||||
jekyll (~> 4.2.1)
|
||||
jekyll-seo-tag (~> 2.7.1)
|
||||
jekyll (~> 4.2.2)
|
||||
jekyll-seo-tag (~> 2.8.0)
|
||||
jekyll-sitemap (~> 1.4.0)
|
||||
wdm (~> 0.1.1)
|
||||
webrick (~> 1.7)
|
||||
|
||||
3
docs/dependencies.md
vendored
3
docs/dependencies.md
vendored
@@ -46,7 +46,6 @@ AdminLTE makes use of the following plugins. For documentation, updates or licen
|
||||
<li><h4>Form Elements</h4></li>
|
||||
<li><a href="https://farbelous.io/bootstrap-colorpicker/">Bootstrap Colorpicker</a></li>
|
||||
<li><a href="https://github.com/seiyria/bootstrap-slider/">Bootstrap Slider</a></li>
|
||||
<li><a href="https://github.com/Bttstrp/bootstrap-switch">Bootstrap Switch</a></li>
|
||||
<li><a href="http://www.daterangepicker.com/" rel="noopener" target="_blank">Date Range Picker</a></li>
|
||||
<li><a href="https://www.dropzonejs.com/" rel="noopener" target="_blank">Dropzone JS</a></li>
|
||||
<li><a href="https://github.com/bantikyan/icheck-bootstrap#readme" rel="noopener" target="_blank">iCheck Bootstrap</a></li>
|
||||
@@ -63,7 +62,7 @@ AdminLTE makes use of the following plugins. For documentation, updates or licen
|
||||
<ul class="list-unstyled">
|
||||
<li><h4>Icon Packs</h4></li>
|
||||
<li><a href="https://fontawesome.com/" rel="noopener" target="_blank">FontAwesome 5</a></li>
|
||||
<li><a href="https://github.com/lipis/flag-icon-css#readme" rel="noopener" target="_blank">flag-icon-css</a></li>
|
||||
<li><a href="https://github.com/lipis/flag-icons#readme" rel="noopener" target="_blank">flag-icons</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
15835
package-lock.json
generated
15835
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
107
package.json
107
package.json
@@ -66,91 +66,90 @@
|
||||
"dependencies": {
|
||||
"@fortawesome/fontawesome-free": "^5.15.4",
|
||||
"@lgaitan/pace-progress": "^1.0.7",
|
||||
"@sweetalert2/theme-bootstrap-4": "^5.0.8",
|
||||
"@sweetalert2/theme-bootstrap-4": "^5.0.15",
|
||||
"@ttskch/select2-bootstrap4-theme": "^1.5.2",
|
||||
"bootstrap": "^4.6.1",
|
||||
"bootstrap": "^4.6.2",
|
||||
"bootstrap-colorpicker": "^3.4.0",
|
||||
"bootstrap-slider": "^11.0.2",
|
||||
"bootstrap-switch": "3.3.4",
|
||||
"bootstrap4-duallistbox": "^4.0.2",
|
||||
"bs-custom-file-input": "^1.3.4",
|
||||
"bs-stepper": "^1.7.0",
|
||||
"chart.js": "^2.9.4",
|
||||
"codemirror": "^5.65.1",
|
||||
"datatables.net": "^1.11.4",
|
||||
"datatables.net-autofill-bs4": "^2.3.9",
|
||||
"datatables.net-bs4": "^1.11.4",
|
||||
"datatables.net-buttons-bs4": "^2.2.2",
|
||||
"datatables.net-colreorder-bs4": "^1.5.5",
|
||||
"datatables.net-fixedcolumns-bs4": "^4.0.1",
|
||||
"datatables.net-fixedheader-bs4": "^3.2.1",
|
||||
"datatables.net-keytable-bs4": "^2.6.4",
|
||||
"datatables.net-responsive-bs4": "^2.2.9",
|
||||
"datatables.net-rowgroup-bs4": "^1.1.4",
|
||||
"datatables.net-rowreorder-bs4": "^1.2.8",
|
||||
"datatables.net-scroller-bs4": "^2.0.5",
|
||||
"datatables.net-searchbuilder-bs4": "^1.3.1",
|
||||
"datatables.net-searchpanes-bs4": "^1.4.0",
|
||||
"datatables.net-select-bs4": "^1.3.4",
|
||||
"codemirror": "^5.65.13",
|
||||
"datatables.net": "^1.13.4",
|
||||
"datatables.net-autofill-bs4": "^2.5.3",
|
||||
"datatables.net-bs4": "^1.13.4",
|
||||
"datatables.net-buttons-bs4": "^2.3.4",
|
||||
"datatables.net-colreorder-bs4": "^1.6.2",
|
||||
"datatables.net-fixedcolumns-bs4": "^4.2.2",
|
||||
"datatables.net-fixedheader-bs4": "^3.3.2",
|
||||
"datatables.net-keytable-bs4": "^2.9.0",
|
||||
"datatables.net-responsive-bs4": "^2.4.1",
|
||||
"datatables.net-rowgroup-bs4": "^1.3.1",
|
||||
"datatables.net-rowreorder-bs4": "^1.3.3",
|
||||
"datatables.net-scroller-bs4": "^2.1.1",
|
||||
"datatables.net-searchbuilder-bs4": "^1.4.2",
|
||||
"datatables.net-searchpanes-bs4": "^2.1.2",
|
||||
"datatables.net-select-bs4": "^1.6.2",
|
||||
"daterangepicker": "^3.1.0",
|
||||
"dropzone": "^5.9.3",
|
||||
"ekko-lightbox": "^5.3.0",
|
||||
"fastclick": "^1.0.6",
|
||||
"filterizr": "^2.2.4",
|
||||
"flag-icon-css": "^4.1.7",
|
||||
"flot": "^4.2.2",
|
||||
"fs-extra": "^10.0.0",
|
||||
"fullcalendar": "^5.10.1",
|
||||
"flag-icons": "^6.6.6",
|
||||
"flot": "^4.2.3",
|
||||
"fs-extra": "^10.1.0",
|
||||
"fullcalendar": "^5.11.0",
|
||||
"icheck-bootstrap": "^3.0.1",
|
||||
"inputmask": "^5.0.7",
|
||||
"inputmask": "^5.0.8",
|
||||
"ion-rangeslider": "^2.3.1",
|
||||
"jquery": "^3.6.0",
|
||||
"jquery": "^3.6.4",
|
||||
"jquery-knob-chif": "^1.2.13",
|
||||
"jquery-mapael": "^2.2.0",
|
||||
"jquery-mousewheel": "^3.1.13",
|
||||
"jquery-ui-dist": "^1.13.0",
|
||||
"jquery-validation": "^1.19.3",
|
||||
"jquery-ui-dist": "^1.13.2",
|
||||
"jquery-validation": "^1.19.5",
|
||||
"jqvmap-novulnerability": "^1.5.1",
|
||||
"jsgrid": "^1.5.3",
|
||||
"jszip": "^3.7.1",
|
||||
"moment": "^2.29.1",
|
||||
"overlayscrollbars": "^1.13.1",
|
||||
"pdfmake": "^0.2.4",
|
||||
"jszip": "^3.10.1",
|
||||
"moment": "^2.29.4",
|
||||
"overlayscrollbars": "^1.13.2",
|
||||
"pdfmake": "^0.2.7",
|
||||
"popper.js": "^1.16.1",
|
||||
"raphael": "^2.3.0",
|
||||
"select2": "^4.0.13",
|
||||
"sparklines": "^1.3.0",
|
||||
"summernote": "^0.8.20",
|
||||
"sweetalert2": "^11.4.0",
|
||||
"tempusdominus-bootstrap-4": "^5.39.0",
|
||||
"sweetalert2": "^11.7.3",
|
||||
"tempusdominus-bootstrap-4": "^5.39.2",
|
||||
"toastr": "^2.1.4",
|
||||
"uplot": "^1.6.18"
|
||||
"uplot": "^1.6.24"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.17.0",
|
||||
"@babel/preset-env": "^7.16.11",
|
||||
"@rollup/plugin-babel": "^5.3.0",
|
||||
"autoprefixer": "^10.4.2",
|
||||
"browser-sync": "^2.27.7",
|
||||
"@babel/core": "^7.21.5",
|
||||
"@babel/preset-env": "^7.21.5",
|
||||
"@rollup/plugin-babel": "^5.3.1",
|
||||
"autoprefixer": "^10.4.14",
|
||||
"browser-sync": "^2.29.1",
|
||||
"bundlewatch": "^0.3.3",
|
||||
"clean-css-cli": "^5.5.2",
|
||||
"concurrently": "^7.0.0",
|
||||
"eslint": "^8.8.0",
|
||||
"eslint-config-xo": "^0.39.0",
|
||||
"eslint-plugin-compat": "^4.0.2",
|
||||
"eslint-plugin-import": "^2.25.4",
|
||||
"eslint-plugin-unicorn": "^40.1.0",
|
||||
"lockfile-lint": "^4.6.2",
|
||||
"clean-css-cli": "^5.6.2",
|
||||
"concurrently": "^7.2.2",
|
||||
"eslint": "^8.38.0",
|
||||
"eslint-config-xo": "^0.43.1",
|
||||
"eslint-plugin-compat": "^4.1.4",
|
||||
"eslint-plugin-import": "^2.27.5",
|
||||
"eslint-plugin-unicorn": "^46.0.0",
|
||||
"lockfile-lint": "^4.10.1",
|
||||
"node-sass": "^7.0.1",
|
||||
"node-sass-package-importer": "^5.3.2",
|
||||
"nodemon": "^2.0.15",
|
||||
"nodemon": "^2.0.22",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"postcss": "^8.4.6",
|
||||
"postcss-cli": "^9.1.0",
|
||||
"rollup": "^2.67.0",
|
||||
"stylelint": "^13.13.1",
|
||||
"stylelint-config-twbs-bootstrap": "^2.2.4",
|
||||
"terser": "^5.10.0",
|
||||
"postcss": "^8.4.23",
|
||||
"postcss-cli": "^10.1.0",
|
||||
"rollup": "^2.79.1",
|
||||
"stylelint": "^14.16.1",
|
||||
"stylelint-config-twbs-bootstrap": "^4.0.0",
|
||||
"terser": "^5.17.1",
|
||||
"vnu-jar": "^21.10.12"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700&display=fallback">
|
||||
<!-- Font Awesome -->
|
||||
<link rel="stylesheet" href="../../plugins/fontawesome-free/css/all.min.css">
|
||||
<!-- flag-icon-css -->
|
||||
<link rel="stylesheet" href="../../plugins/flag-icon-css/css/flag-icon.min.css">
|
||||
<!-- flag-icons -->
|
||||
<link rel="stylesheet" href="../../plugins/flag-icons/css/flag-icons.min.css">
|
||||
<!-- Theme style -->
|
||||
<link rel="stylesheet" href="../../dist/css/adminlte.min.css">
|
||||
</head>
|
||||
|
||||
@@ -1478,18 +1478,6 @@
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.card -->
|
||||
|
||||
<!-- Bootstrap Switch -->
|
||||
<div class="card card-secondary">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">Bootstrap Switch</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<input type="checkbox" name="my-checkbox" checked data-bootstrap-switch>
|
||||
<input type="checkbox" name="my-checkbox" checked data-bootstrap-switch data-off-color="danger" data-on-color="success">
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.card -->
|
||||
</div>
|
||||
<!-- /.col (right) -->
|
||||
</div>
|
||||
@@ -1674,8 +1662,6 @@
|
||||
<script src="../../plugins/bootstrap-colorpicker/js/bootstrap-colorpicker.min.js"></script>
|
||||
<!-- Tempusdominus Bootstrap 4 -->
|
||||
<script src="../../plugins/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.min.js"></script>
|
||||
<!-- Bootstrap Switch -->
|
||||
<script src="../../plugins/bootstrap-switch/js/bootstrap-switch.min.js"></script>
|
||||
<!-- BS-Stepper -->
|
||||
<script src="../../plugins/bs-stepper/js/bs-stepper.min.js"></script>
|
||||
<!-- dropzonejs -->
|
||||
@@ -1755,11 +1741,6 @@
|
||||
$('.my-colorpicker2').on('colorpickerChange', function(event) {
|
||||
$('.my-colorpicker2 .fa-square').css('color', event.color.toString());
|
||||
})
|
||||
|
||||
$("input[data-bootstrap-switch]").each(function(){
|
||||
$(this).bootstrapSwitch('state', $(this).prop('checked'));
|
||||
})
|
||||
|
||||
})
|
||||
// BS-Stepper Init
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
|
||||
@@ -16,8 +16,6 @@
|
||||
<!-- CodeMirror -->
|
||||
<link rel="stylesheet" href="../../plugins/codemirror/codemirror.css">
|
||||
<link rel="stylesheet" href="../../plugins/codemirror/theme/monokai.css">
|
||||
<!-- SimpleMDE -->
|
||||
<link rel="stylesheet" href="../../plugins/simplemde/simplemde.min.css">
|
||||
</head>
|
||||
<body class="hold-transition sidebar-mini">
|
||||
<div class="wrapper">
|
||||
|
||||
@@ -1,510 +0,0 @@
|
||||
/**
|
||||
* bootstrap-switch - Turn checkboxes and radio buttons into toggle switches.
|
||||
*
|
||||
* @version v3.3.4
|
||||
* @homepage https://bttstrp.github.io/bootstrap-switch
|
||||
* @author Mattia Larentis <mattia@larentis.eu> (http://larentis.eu)
|
||||
* @license Apache-2.0
|
||||
*/
|
||||
|
||||
.clearfix {
|
||||
*zoom: 1;
|
||||
}
|
||||
.clearfix:before,
|
||||
.clearfix:after {
|
||||
display: table;
|
||||
content: "";
|
||||
line-height: 0;
|
||||
}
|
||||
.clearfix:after {
|
||||
clear: both;
|
||||
}
|
||||
.hide-text {
|
||||
font: 0/0 a;
|
||||
color: transparent;
|
||||
text-shadow: none;
|
||||
background-color: transparent;
|
||||
border: 0;
|
||||
}
|
||||
.input-block-level {
|
||||
display: block;
|
||||
width: 100%;
|
||||
min-height: 30px;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.bootstrap-switch {
|
||||
display: inline-block;
|
||||
direction: ltr;
|
||||
cursor: pointer;
|
||||
-webkit-border-radius: 5px;
|
||||
-moz-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
border: 1px solid;
|
||||
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
|
||||
position: relative;
|
||||
text-align: left;
|
||||
overflow: hidden;
|
||||
line-height: 8px;
|
||||
z-index: 0;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
-o-user-select: none;
|
||||
user-select: none;
|
||||
vertical-align: middle;
|
||||
-webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
|
||||
-moz-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
|
||||
-o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
|
||||
transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
|
||||
}
|
||||
.bootstrap-switch .bootstrap-switch-container {
|
||||
display: inline-block;
|
||||
top: 0;
|
||||
-webkit-border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
-webkit-transform: translate3d(0, 0, 0);
|
||||
-moz-transform: translate3d(0, 0, 0);
|
||||
-o-transform: translate3d(0, 0, 0);
|
||||
transform: translate3d(0, 0, 0);
|
||||
}
|
||||
.bootstrap-switch .bootstrap-switch-handle-on,
|
||||
.bootstrap-switch .bootstrap-switch-handle-off,
|
||||
.bootstrap-switch .bootstrap-switch-label {
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
cursor: pointer;
|
||||
display: inline-block !important;
|
||||
padding-top: 4px;
|
||||
padding-bottom: 4px;
|
||||
padding-left: 8px;
|
||||
padding-right: 8px;
|
||||
font-size: 14px;
|
||||
line-height: 20px;
|
||||
}
|
||||
.bootstrap-switch .bootstrap-switch-handle-on,
|
||||
.bootstrap-switch .bootstrap-switch-handle-off {
|
||||
text-align: center;
|
||||
z-index: 1;
|
||||
}
|
||||
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-primary,
|
||||
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-primary {
|
||||
color: #fff;
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
|
||||
background-color: #005fcc;
|
||||
background-image: -moz-linear-gradient(top, #0044cc, #08c);
|
||||
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0044cc), to(#08c));
|
||||
background-image: -webkit-linear-gradient(top, #0044cc, #08c);
|
||||
background-image: -o-linear-gradient(top, #0044cc, #08c);
|
||||
background-image: linear-gradient(to bottom, #0044cc, #08c);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0044cc', endColorstr='#ff0088cc', GradientType=0);
|
||||
border-color: #08c #08c #005580;
|
||||
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
|
||||
*background-color: #08c;
|
||||
/* Darken IE7 buttons by default so they stand out more given they won't have borders */
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
||||
}
|
||||
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-primary:hover,
|
||||
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-primary:hover,
|
||||
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-primary:focus,
|
||||
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-primary:focus,
|
||||
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-primary:active,
|
||||
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-primary:active,
|
||||
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-primary.active,
|
||||
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-primary.active,
|
||||
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-primary.disabled,
|
||||
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-primary.disabled,
|
||||
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-primary[disabled],
|
||||
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-primary[disabled] {
|
||||
color: #fff;
|
||||
background-color: #08c;
|
||||
*background-color: #0077b3;
|
||||
}
|
||||
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-primary:active,
|
||||
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-primary:active,
|
||||
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-primary.active,
|
||||
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-primary.active {
|
||||
background-color: #006699 \9;
|
||||
}
|
||||
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-info,
|
||||
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-info {
|
||||
color: #fff;
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
|
||||
background-color: #41a7c5;
|
||||
background-image: -moz-linear-gradient(top, #2f96b4, #5bc0de);
|
||||
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#2f96b4), to(#5bc0de));
|
||||
background-image: -webkit-linear-gradient(top, #2f96b4, #5bc0de);
|
||||
background-image: -o-linear-gradient(top, #2f96b4, #5bc0de);
|
||||
background-image: linear-gradient(to bottom, #2f96b4, #5bc0de);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff2f96b4', endColorstr='#ff5bc0de', GradientType=0);
|
||||
border-color: #5bc0de #5bc0de #28a1c5;
|
||||
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
|
||||
*background-color: #5bc0de;
|
||||
/* Darken IE7 buttons by default so they stand out more given they won't have borders */
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
||||
}
|
||||
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-info:hover,
|
||||
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-info:hover,
|
||||
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-info:focus,
|
||||
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-info:focus,
|
||||
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-info:active,
|
||||
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-info:active,
|
||||
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-info.active,
|
||||
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-info.active,
|
||||
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-info.disabled,
|
||||
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-info.disabled,
|
||||
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-info[disabled],
|
||||
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-info[disabled] {
|
||||
color: #fff;
|
||||
background-color: #5bc0de;
|
||||
*background-color: #46b8da;
|
||||
}
|
||||
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-info:active,
|
||||
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-info:active,
|
||||
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-info.active,
|
||||
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-info.active {
|
||||
background-color: #31b0d5 \9;
|
||||
}
|
||||
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-success,
|
||||
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-success {
|
||||
color: #fff;
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
|
||||
background-color: #58b058;
|
||||
background-image: -moz-linear-gradient(top, #51a351, #62c462);
|
||||
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#51a351), to(#62c462));
|
||||
background-image: -webkit-linear-gradient(top, #51a351, #62c462);
|
||||
background-image: -o-linear-gradient(top, #51a351, #62c462);
|
||||
background-image: linear-gradient(to bottom, #51a351, #62c462);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff51a351', endColorstr='#ff62c462', GradientType=0);
|
||||
border-color: #62c462 #62c462 #3b9e3b;
|
||||
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
|
||||
*background-color: #62c462;
|
||||
/* Darken IE7 buttons by default so they stand out more given they won't have borders */
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
||||
}
|
||||
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-success:hover,
|
||||
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-success:hover,
|
||||
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-success:focus,
|
||||
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-success:focus,
|
||||
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-success:active,
|
||||
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-success:active,
|
||||
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-success.active,
|
||||
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-success.active,
|
||||
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-success.disabled,
|
||||
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-success.disabled,
|
||||
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-success[disabled],
|
||||
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-success[disabled] {
|
||||
color: #fff;
|
||||
background-color: #62c462;
|
||||
*background-color: #4fbd4f;
|
||||
}
|
||||
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-success:active,
|
||||
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-success:active,
|
||||
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-success.active,
|
||||
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-success.active {
|
||||
background-color: #42b142 \9;
|
||||
}
|
||||
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-warning,
|
||||
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-warning {
|
||||
color: #fff;
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
|
||||
background-color: #f9a123;
|
||||
background-image: -moz-linear-gradient(top, #f89406, #fbb450);
|
||||
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f89406), to(#fbb450));
|
||||
background-image: -webkit-linear-gradient(top, #f89406, #fbb450);
|
||||
background-image: -o-linear-gradient(top, #f89406, #fbb450);
|
||||
background-image: linear-gradient(to bottom, #f89406, #fbb450);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff89406', endColorstr='#fffbb450', GradientType=0);
|
||||
border-color: #fbb450 #fbb450 #f89406;
|
||||
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
|
||||
*background-color: #fbb450;
|
||||
/* Darken IE7 buttons by default so they stand out more given they won't have borders */
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
||||
}
|
||||
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-warning:hover,
|
||||
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-warning:hover,
|
||||
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-warning:focus,
|
||||
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-warning:focus,
|
||||
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-warning:active,
|
||||
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-warning:active,
|
||||
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-warning.active,
|
||||
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-warning.active,
|
||||
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-warning.disabled,
|
||||
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-warning.disabled,
|
||||
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-warning[disabled],
|
||||
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-warning[disabled] {
|
||||
color: #fff;
|
||||
background-color: #fbb450;
|
||||
*background-color: #faa937;
|
||||
}
|
||||
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-warning:active,
|
||||
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-warning:active,
|
||||
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-warning.active,
|
||||
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-warning.active {
|
||||
background-color: #fa9f1e \9;
|
||||
}
|
||||
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-danger,
|
||||
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-danger {
|
||||
color: #fff;
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
|
||||
background-color: #d14641;
|
||||
background-image: -moz-linear-gradient(top, #bd362f, #ee5f5b);
|
||||
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#bd362f), to(#ee5f5b));
|
||||
background-image: -webkit-linear-gradient(top, #bd362f, #ee5f5b);
|
||||
background-image: -o-linear-gradient(top, #bd362f, #ee5f5b);
|
||||
background-image: linear-gradient(to bottom, #bd362f, #ee5f5b);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffbd362f', endColorstr='#ffee5f5b', GradientType=0);
|
||||
border-color: #ee5f5b #ee5f5b #e51d18;
|
||||
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
|
||||
*background-color: #ee5f5b;
|
||||
/* Darken IE7 buttons by default so they stand out more given they won't have borders */
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
||||
}
|
||||
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-danger:hover,
|
||||
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-danger:hover,
|
||||
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-danger:focus,
|
||||
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-danger:focus,
|
||||
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-danger:active,
|
||||
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-danger:active,
|
||||
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-danger.active,
|
||||
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-danger.active,
|
||||
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-danger.disabled,
|
||||
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-danger.disabled,
|
||||
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-danger[disabled],
|
||||
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-danger[disabled] {
|
||||
color: #fff;
|
||||
background-color: #ee5f5b;
|
||||
*background-color: #ec4844;
|
||||
}
|
||||
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-danger:active,
|
||||
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-danger:active,
|
||||
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-danger.active,
|
||||
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-danger.active {
|
||||
background-color: #e9322d \9;
|
||||
}
|
||||
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-default,
|
||||
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-default {
|
||||
color: #333;
|
||||
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
|
||||
background-color: #f0f0f0;
|
||||
background-image: -moz-linear-gradient(top, #e6e6e6, #fff);
|
||||
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#e6e6e6), to(#fff));
|
||||
background-image: -webkit-linear-gradient(top, #e6e6e6, #fff);
|
||||
background-image: -o-linear-gradient(top, #e6e6e6, #fff);
|
||||
background-image: linear-gradient(to bottom, #e6e6e6, #fff);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe6e6e6', endColorstr='#ffffffff', GradientType=0);
|
||||
border-color: #fff #fff #d9d9d9;
|
||||
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
|
||||
*background-color: #fff;
|
||||
/* Darken IE7 buttons by default so they stand out more given they won't have borders */
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
||||
}
|
||||
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-default:hover,
|
||||
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-default:hover,
|
||||
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-default:focus,
|
||||
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-default:focus,
|
||||
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-default:active,
|
||||
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-default:active,
|
||||
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-default.active,
|
||||
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-default.active,
|
||||
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-default.disabled,
|
||||
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-default.disabled,
|
||||
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-default[disabled],
|
||||
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-default[disabled] {
|
||||
color: #333;
|
||||
background-color: #fff;
|
||||
*background-color: #f2f2f2;
|
||||
}
|
||||
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-default:active,
|
||||
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-default:active,
|
||||
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-default.active,
|
||||
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-default.active {
|
||||
background-color: #e6e6e6 \9;
|
||||
}
|
||||
.bootstrap-switch .bootstrap-switch-label {
|
||||
text-align: center;
|
||||
margin-top: -1px;
|
||||
margin-bottom: -1px;
|
||||
z-index: 100;
|
||||
border-left: 1px solid #ccc;
|
||||
border-right: 1px solid #ccc;
|
||||
color: #333;
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
|
||||
background-color: #f5f5f5;
|
||||
background-image: -moz-linear-gradient(top, #fff, #e6e6e6);
|
||||
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fff), to(#e6e6e6));
|
||||
background-image: -webkit-linear-gradient(top, #fff, #e6e6e6);
|
||||
background-image: -o-linear-gradient(top, #fff, #e6e6e6);
|
||||
background-image: linear-gradient(to bottom, #fff, #e6e6e6);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);
|
||||
border-color: #e6e6e6 #e6e6e6 #bfbfbf;
|
||||
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
|
||||
*background-color: #e6e6e6;
|
||||
/* Darken IE7 buttons by default so they stand out more given they won't have borders */
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
||||
}
|
||||
.bootstrap-switch .bootstrap-switch-label:hover,
|
||||
.bootstrap-switch .bootstrap-switch-label:focus,
|
||||
.bootstrap-switch .bootstrap-switch-label:active,
|
||||
.bootstrap-switch .bootstrap-switch-label.active,
|
||||
.bootstrap-switch .bootstrap-switch-label.disabled,
|
||||
.bootstrap-switch .bootstrap-switch-label[disabled] {
|
||||
color: #333;
|
||||
background-color: #e6e6e6;
|
||||
*background-color: #d9d9d9;
|
||||
}
|
||||
.bootstrap-switch .bootstrap-switch-label:active,
|
||||
.bootstrap-switch .bootstrap-switch-label.active {
|
||||
background-color: #cccccc \9;
|
||||
}
|
||||
.bootstrap-switch span::before {
|
||||
content: "\200b";
|
||||
}
|
||||
.bootstrap-switch .bootstrap-switch-handle-on {
|
||||
-webkit-border-top-left-radius: 4px;
|
||||
-moz-border-radius-topleft: 4px;
|
||||
border-top-left-radius: 4px;
|
||||
-webkit-border-bottom-left-radius: 4px;
|
||||
-moz-border-radius-bottomleft: 4px;
|
||||
border-bottom-left-radius: 4px;
|
||||
}
|
||||
.bootstrap-switch .bootstrap-switch-handle-off {
|
||||
-webkit-border-top-right-radius: 4px;
|
||||
-moz-border-radius-topright: 4px;
|
||||
border-top-right-radius: 4px;
|
||||
-webkit-border-bottom-right-radius: 4px;
|
||||
-moz-border-radius-bottomright: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
}
|
||||
.bootstrap-switch input[type='radio'],
|
||||
.bootstrap-switch input[type='checkbox'] {
|
||||
position: absolute !important;
|
||||
top: 0;
|
||||
left: 0;
|
||||
opacity: 0;
|
||||
filter: alpha(opacity=0);
|
||||
z-index: -1;
|
||||
visibility: hidden;
|
||||
}
|
||||
.bootstrap-switch input[type='radio'].form-control,
|
||||
.bootstrap-switch input[type='checkbox'].form-control {
|
||||
height: auto;
|
||||
}
|
||||
.bootstrap-switch.bootstrap-switch-mini {
|
||||
min-width: 71px;
|
||||
}
|
||||
.bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-handle-on,
|
||||
.bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-handle-off,
|
||||
.bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-label {
|
||||
padding: 3px 6px;
|
||||
font-size: 10px;
|
||||
line-height: 9px;
|
||||
}
|
||||
.bootstrap-switch.bootstrap-switch-small {
|
||||
min-width: 79px;
|
||||
}
|
||||
.bootstrap-switch.bootstrap-switch-small .bootstrap-switch-handle-on,
|
||||
.bootstrap-switch.bootstrap-switch-small .bootstrap-switch-handle-off,
|
||||
.bootstrap-switch.bootstrap-switch-small .bootstrap-switch-label {
|
||||
padding: 3px 6px;
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
}
|
||||
.bootstrap-switch.bootstrap-switch-large {
|
||||
min-width: 120px;
|
||||
}
|
||||
.bootstrap-switch.bootstrap-switch-large .bootstrap-switch-handle-on,
|
||||
.bootstrap-switch.bootstrap-switch-large .bootstrap-switch-handle-off,
|
||||
.bootstrap-switch.bootstrap-switch-large .bootstrap-switch-label {
|
||||
padding: 9px 12px;
|
||||
font-size: 16px;
|
||||
line-height: normal;
|
||||
}
|
||||
.bootstrap-switch.bootstrap-switch-disabled,
|
||||
.bootstrap-switch.bootstrap-switch-readonly,
|
||||
.bootstrap-switch.bootstrap-switch-indeterminate {
|
||||
cursor: default !important;
|
||||
}
|
||||
.bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-handle-on,
|
||||
.bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-handle-on,
|
||||
.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-handle-on,
|
||||
.bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-handle-off,
|
||||
.bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-handle-off,
|
||||
.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-handle-off,
|
||||
.bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-label,
|
||||
.bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-label,
|
||||
.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-label {
|
||||
opacity: 0.5;
|
||||
filter: alpha(opacity=50);
|
||||
cursor: default !important;
|
||||
}
|
||||
.bootstrap-switch.bootstrap-switch-animate .bootstrap-switch-container {
|
||||
-webkit-transition: margin-left 0.5s;
|
||||
-moz-transition: margin-left 0.5s;
|
||||
-o-transition: margin-left 0.5s;
|
||||
transition: margin-left 0.5s;
|
||||
}
|
||||
.bootstrap-switch.bootstrap-switch-inverse .bootstrap-switch-handle-on {
|
||||
-webkit-border-top-left-radius: 0;
|
||||
-moz-border-radius-topleft: 0;
|
||||
border-top-left-radius: 0;
|
||||
-webkit-border-bottom-left-radius: 0;
|
||||
-moz-border-radius-bottomleft: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
-webkit-border-top-right-radius: 4px;
|
||||
-moz-border-radius-topright: 4px;
|
||||
border-top-right-radius: 4px;
|
||||
-webkit-border-bottom-right-radius: 4px;
|
||||
-moz-border-radius-bottomright: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
}
|
||||
.bootstrap-switch.bootstrap-switch-inverse .bootstrap-switch-handle-off {
|
||||
-webkit-border-top-right-radius: 0;
|
||||
-moz-border-radius-topright: 0;
|
||||
border-top-right-radius: 0;
|
||||
-webkit-border-bottom-right-radius: 0;
|
||||
-moz-border-radius-bottomright: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
-webkit-border-top-left-radius: 4px;
|
||||
-moz-border-radius-topleft: 4px;
|
||||
border-top-left-radius: 4px;
|
||||
-webkit-border-bottom-left-radius: 4px;
|
||||
-moz-border-radius-bottomleft: 4px;
|
||||
border-bottom-left-radius: 4px;
|
||||
}
|
||||
.bootstrap-switch.bootstrap-switch-focused {
|
||||
border-color: rgba(82, 168, 236, 0.8);
|
||||
outline: 0;
|
||||
outline: thin dotted \9;
|
||||
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82, 168, 236, .6);
|
||||
-moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82, 168, 236, .6);
|
||||
box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82, 168, 236, .6);
|
||||
}
|
||||
.bootstrap-switch.bootstrap-switch-on .bootstrap-switch-label,
|
||||
.bootstrap-switch.bootstrap-switch-inverse.bootstrap-switch-off .bootstrap-switch-label {
|
||||
-webkit-border-top-right-radius: 4px;
|
||||
-moz-border-radius-topright: 4px;
|
||||
border-top-right-radius: 4px;
|
||||
-webkit-border-bottom-right-radius: 4px;
|
||||
-moz-border-radius-bottomright: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
}
|
||||
.bootstrap-switch.bootstrap-switch-off .bootstrap-switch-label,
|
||||
.bootstrap-switch.bootstrap-switch-inverse.bootstrap-switch-on .bootstrap-switch-label {
|
||||
-webkit-border-top-left-radius: 4px;
|
||||
-moz-border-radius-topleft: 4px;
|
||||
border-top-left-radius: 4px;
|
||||
-webkit-border-bottom-left-radius: 4px;
|
||||
-moz-border-radius-bottomleft: 4px;
|
||||
border-bottom-left-radius: 4px;
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -1,187 +0,0 @@
|
||||
/**
|
||||
* bootstrap-switch - Turn checkboxes and radio buttons into toggle switches.
|
||||
*
|
||||
* @version v3.3.4
|
||||
* @homepage https://bttstrp.github.io/bootstrap-switch
|
||||
* @author Mattia Larentis <mattia@larentis.eu> (http://larentis.eu)
|
||||
* @license Apache-2.0
|
||||
*/
|
||||
|
||||
.bootstrap-switch {
|
||||
display: inline-block;
|
||||
direction: ltr;
|
||||
cursor: pointer;
|
||||
border-radius: 4px;
|
||||
border: 1px solid;
|
||||
border-color: #ccc;
|
||||
position: relative;
|
||||
text-align: left;
|
||||
overflow: hidden;
|
||||
line-height: 8px;
|
||||
z-index: 0;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
vertical-align: middle;
|
||||
-webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
|
||||
-o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
|
||||
transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
|
||||
}
|
||||
.bootstrap-switch .bootstrap-switch-container {
|
||||
display: inline-block;
|
||||
top: 0;
|
||||
border-radius: 4px;
|
||||
-webkit-transform: translate3d(0, 0, 0);
|
||||
transform: translate3d(0, 0, 0);
|
||||
}
|
||||
.bootstrap-switch .bootstrap-switch-handle-on,
|
||||
.bootstrap-switch .bootstrap-switch-handle-off,
|
||||
.bootstrap-switch .bootstrap-switch-label {
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
cursor: pointer;
|
||||
display: table-cell;
|
||||
vertical-align: middle;
|
||||
padding: 6px 12px;
|
||||
font-size: 14px;
|
||||
line-height: 20px;
|
||||
}
|
||||
.bootstrap-switch .bootstrap-switch-handle-on,
|
||||
.bootstrap-switch .bootstrap-switch-handle-off {
|
||||
text-align: center;
|
||||
z-index: 1;
|
||||
}
|
||||
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-primary,
|
||||
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-primary {
|
||||
color: #fff;
|
||||
background: #337ab7;
|
||||
}
|
||||
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-info,
|
||||
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-info {
|
||||
color: #fff;
|
||||
background: #5bc0de;
|
||||
}
|
||||
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-success,
|
||||
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-success {
|
||||
color: #fff;
|
||||
background: #5cb85c;
|
||||
}
|
||||
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-warning,
|
||||
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-warning {
|
||||
background: #f0ad4e;
|
||||
color: #fff;
|
||||
}
|
||||
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-danger,
|
||||
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-danger {
|
||||
color: #fff;
|
||||
background: #d9534f;
|
||||
}
|
||||
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-default,
|
||||
.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-default {
|
||||
color: #000;
|
||||
background: #eeeeee;
|
||||
}
|
||||
.bootstrap-switch .bootstrap-switch-label {
|
||||
text-align: center;
|
||||
margin-top: -1px;
|
||||
margin-bottom: -1px;
|
||||
z-index: 100;
|
||||
color: #333;
|
||||
background: #fff;
|
||||
}
|
||||
.bootstrap-switch span::before {
|
||||
content: "\200b";
|
||||
}
|
||||
.bootstrap-switch .bootstrap-switch-handle-on {
|
||||
border-bottom-left-radius: 3px;
|
||||
border-top-left-radius: 3px;
|
||||
}
|
||||
.bootstrap-switch .bootstrap-switch-handle-off {
|
||||
border-bottom-right-radius: 3px;
|
||||
border-top-right-radius: 3px;
|
||||
}
|
||||
.bootstrap-switch input[type='radio'],
|
||||
.bootstrap-switch input[type='checkbox'] {
|
||||
position: absolute !important;
|
||||
top: 0;
|
||||
left: 0;
|
||||
margin: 0;
|
||||
z-index: -1;
|
||||
opacity: 0;
|
||||
filter: alpha(opacity=0);
|
||||
visibility: hidden;
|
||||
}
|
||||
.bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-handle-on,
|
||||
.bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-handle-off,
|
||||
.bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-label {
|
||||
padding: 1px 5px;
|
||||
font-size: 12px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
.bootstrap-switch.bootstrap-switch-small .bootstrap-switch-handle-on,
|
||||
.bootstrap-switch.bootstrap-switch-small .bootstrap-switch-handle-off,
|
||||
.bootstrap-switch.bootstrap-switch-small .bootstrap-switch-label {
|
||||
padding: 5px 10px;
|
||||
font-size: 12px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
.bootstrap-switch.bootstrap-switch-large .bootstrap-switch-handle-on,
|
||||
.bootstrap-switch.bootstrap-switch-large .bootstrap-switch-handle-off,
|
||||
.bootstrap-switch.bootstrap-switch-large .bootstrap-switch-label {
|
||||
padding: 6px 16px;
|
||||
font-size: 18px;
|
||||
line-height: 1.3333333;
|
||||
}
|
||||
.bootstrap-switch.bootstrap-switch-disabled,
|
||||
.bootstrap-switch.bootstrap-switch-readonly,
|
||||
.bootstrap-switch.bootstrap-switch-indeterminate {
|
||||
cursor: default !important;
|
||||
}
|
||||
.bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-handle-on,
|
||||
.bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-handle-on,
|
||||
.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-handle-on,
|
||||
.bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-handle-off,
|
||||
.bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-handle-off,
|
||||
.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-handle-off,
|
||||
.bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-label,
|
||||
.bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-label,
|
||||
.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-label {
|
||||
opacity: 0.5;
|
||||
filter: alpha(opacity=50);
|
||||
cursor: default !important;
|
||||
}
|
||||
.bootstrap-switch.bootstrap-switch-animate .bootstrap-switch-container {
|
||||
-webkit-transition: margin-left 0.5s;
|
||||
-o-transition: margin-left 0.5s;
|
||||
transition: margin-left 0.5s;
|
||||
}
|
||||
.bootstrap-switch.bootstrap-switch-inverse .bootstrap-switch-handle-on {
|
||||
border-bottom-left-radius: 0;
|
||||
border-top-left-radius: 0;
|
||||
border-bottom-right-radius: 3px;
|
||||
border-top-right-radius: 3px;
|
||||
}
|
||||
.bootstrap-switch.bootstrap-switch-inverse .bootstrap-switch-handle-off {
|
||||
border-bottom-right-radius: 0;
|
||||
border-top-right-radius: 0;
|
||||
border-bottom-left-radius: 3px;
|
||||
border-top-left-radius: 3px;
|
||||
}
|
||||
.bootstrap-switch.bootstrap-switch-focused {
|
||||
border-color: #66afe9;
|
||||
outline: 0;
|
||||
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
|
||||
box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
|
||||
}
|
||||
.bootstrap-switch.bootstrap-switch-on .bootstrap-switch-label,
|
||||
.bootstrap-switch.bootstrap-switch-inverse.bootstrap-switch-off .bootstrap-switch-label {
|
||||
border-bottom-right-radius: 3px;
|
||||
border-top-right-radius: 3px;
|
||||
}
|
||||
.bootstrap-switch.bootstrap-switch-off .bootstrap-switch-label,
|
||||
.bootstrap-switch.bootstrap-switch-inverse.bootstrap-switch-on .bootstrap-switch-label {
|
||||
border-bottom-left-radius: 3px;
|
||||
border-top-left-radius: 3px;
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
784
plugins/bootstrap-switch/js/bootstrap-switch.js
vendored
784
plugins/bootstrap-switch/js/bootstrap-switch.js
vendored
@@ -1,784 +0,0 @@
|
||||
/**
|
||||
* bootstrap-switch - Turn checkboxes and radio buttons into toggle switches.
|
||||
*
|
||||
* @version v3.3.4
|
||||
* @homepage https://bttstrp.github.io/bootstrap-switch
|
||||
* @author Mattia Larentis <mattia@larentis.eu> (http://larentis.eu)
|
||||
* @license Apache-2.0
|
||||
*/
|
||||
|
||||
(function (global, factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define(['jquery'], factory);
|
||||
} else if (typeof exports !== "undefined") {
|
||||
factory(require('jquery'));
|
||||
} else {
|
||||
var mod = {
|
||||
exports: {}
|
||||
};
|
||||
factory(global.jquery);
|
||||
global.bootstrapSwitch = mod.exports;
|
||||
}
|
||||
})(this, function (_jquery) {
|
||||
'use strict';
|
||||
|
||||
var _jquery2 = _interopRequireDefault(_jquery);
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : {
|
||||
default: obj
|
||||
};
|
||||
}
|
||||
|
||||
var _extends = Object.assign || function (target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i];
|
||||
|
||||
for (var key in source) {
|
||||
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return target;
|
||||
};
|
||||
|
||||
function _classCallCheck(instance, Constructor) {
|
||||
if (!(instance instanceof Constructor)) {
|
||||
throw new TypeError("Cannot call a class as a function");
|
||||
}
|
||||
}
|
||||
|
||||
var _createClass = function () {
|
||||
function defineProperties(target, props) {
|
||||
for (var i = 0; i < props.length; i++) {
|
||||
var descriptor = props[i];
|
||||
descriptor.enumerable = descriptor.enumerable || false;
|
||||
descriptor.configurable = true;
|
||||
if ("value" in descriptor) descriptor.writable = true;
|
||||
Object.defineProperty(target, descriptor.key, descriptor);
|
||||
}
|
||||
}
|
||||
|
||||
return function (Constructor, protoProps, staticProps) {
|
||||
if (protoProps) defineProperties(Constructor.prototype, protoProps);
|
||||
if (staticProps) defineProperties(Constructor, staticProps);
|
||||
return Constructor;
|
||||
};
|
||||
}();
|
||||
|
||||
var $ = _jquery2.default || window.jQuery || window.$;
|
||||
|
||||
var BootstrapSwitch = function () {
|
||||
function BootstrapSwitch(element) {
|
||||
var _this = this;
|
||||
|
||||
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
||||
|
||||
_classCallCheck(this, BootstrapSwitch);
|
||||
|
||||
this.$element = $(element);
|
||||
this.options = $.extend({}, $.fn.bootstrapSwitch.defaults, this._getElementOptions(), options);
|
||||
this.prevOptions = {};
|
||||
this.$wrapper = $('<div>', {
|
||||
class: function _class() {
|
||||
var classes = [];
|
||||
classes.push(_this.options.state ? 'on' : 'off');
|
||||
if (_this.options.size) {
|
||||
classes.push(_this.options.size);
|
||||
}
|
||||
if (_this.options.disabled) {
|
||||
classes.push('disabled');
|
||||
}
|
||||
if (_this.options.readonly) {
|
||||
classes.push('readonly');
|
||||
}
|
||||
if (_this.options.indeterminate) {
|
||||
classes.push('indeterminate');
|
||||
}
|
||||
if (_this.options.inverse) {
|
||||
classes.push('inverse');
|
||||
}
|
||||
if (_this.$element.attr('id')) {
|
||||
classes.push('id-' + _this.$element.attr('id'));
|
||||
}
|
||||
return classes.map(_this._getClass.bind(_this)).concat([_this.options.baseClass], _this._getClasses(_this.options.wrapperClass)).join(' ');
|
||||
}
|
||||
});
|
||||
this.$container = $('<div>', { class: this._getClass('container') });
|
||||
this.$on = $('<span>', {
|
||||
html: this.options.onText,
|
||||
class: this._getClass('handle-on') + ' ' + this._getClass(this.options.onColor)
|
||||
});
|
||||
this.$off = $('<span>', {
|
||||
html: this.options.offText,
|
||||
class: this._getClass('handle-off') + ' ' + this._getClass(this.options.offColor)
|
||||
});
|
||||
this.$label = $('<span>', {
|
||||
html: this.options.labelText,
|
||||
class: this._getClass('label')
|
||||
});
|
||||
|
||||
this.$element.on('init.bootstrapSwitch', this.options.onInit.bind(this, element));
|
||||
this.$element.on('switchChange.bootstrapSwitch', function () {
|
||||
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
||||
args[_key] = arguments[_key];
|
||||
}
|
||||
|
||||
if (_this.options.onSwitchChange.apply(element, args) === false) {
|
||||
if (_this.$element.is(':radio')) {
|
||||
$('[name="' + _this.$element.attr('name') + '"]').trigger('previousState.bootstrapSwitch', true);
|
||||
} else {
|
||||
_this.$element.trigger('previousState.bootstrapSwitch', true);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
this.$container = this.$element.wrap(this.$container).parent();
|
||||
this.$wrapper = this.$container.wrap(this.$wrapper).parent();
|
||||
this.$element.before(this.options.inverse ? this.$off : this.$on).before(this.$label).before(this.options.inverse ? this.$on : this.$off);
|
||||
|
||||
if (this.options.indeterminate) {
|
||||
this.$element.prop('indeterminate', true);
|
||||
}
|
||||
|
||||
this._init();
|
||||
this._elementHandlers();
|
||||
this._handleHandlers();
|
||||
this._labelHandlers();
|
||||
this._formHandler();
|
||||
this._externalLabelHandler();
|
||||
this.$element.trigger('init.bootstrapSwitch', this.options.state);
|
||||
}
|
||||
|
||||
_createClass(BootstrapSwitch, [{
|
||||
key: 'setPrevOptions',
|
||||
value: function setPrevOptions() {
|
||||
this.prevOptions = _extends({}, this.options);
|
||||
}
|
||||
}, {
|
||||
key: 'state',
|
||||
value: function state(value, skip) {
|
||||
if (typeof value === 'undefined') {
|
||||
return this.options.state;
|
||||
}
|
||||
if (this.options.disabled || this.options.readonly || this.options.state && !this.options.radioAllOff && this.$element.is(':radio')) {
|
||||
return this.$element;
|
||||
}
|
||||
if (this.$element.is(':radio')) {
|
||||
$('[name="' + this.$element.attr('name') + '"]').trigger('setPreviousOptions.bootstrapSwitch');
|
||||
} else {
|
||||
this.$element.trigger('setPreviousOptions.bootstrapSwitch');
|
||||
}
|
||||
if (this.options.indeterminate) {
|
||||
this.indeterminate(false);
|
||||
}
|
||||
this.$element.prop('checked', Boolean(value)).trigger('change.bootstrapSwitch', skip);
|
||||
return this.$element;
|
||||
}
|
||||
}, {
|
||||
key: 'toggleState',
|
||||
value: function toggleState(skip) {
|
||||
if (this.options.disabled || this.options.readonly) {
|
||||
return this.$element;
|
||||
}
|
||||
if (this.options.indeterminate) {
|
||||
this.indeterminate(false);
|
||||
return this.state(true);
|
||||
} else {
|
||||
return this.$element.prop('checked', !this.options.state).trigger('change.bootstrapSwitch', skip);
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: 'size',
|
||||
value: function size(value) {
|
||||
if (typeof value === 'undefined') {
|
||||
return this.options.size;
|
||||
}
|
||||
if (this.options.size != null) {
|
||||
this.$wrapper.removeClass(this._getClass(this.options.size));
|
||||
}
|
||||
if (value) {
|
||||
this.$wrapper.addClass(this._getClass(value));
|
||||
}
|
||||
this._width();
|
||||
this._containerPosition();
|
||||
this.options.size = value;
|
||||
return this.$element;
|
||||
}
|
||||
}, {
|
||||
key: 'animate',
|
||||
value: function animate(value) {
|
||||
if (typeof value === 'undefined') {
|
||||
return this.options.animate;
|
||||
}
|
||||
if (this.options.animate === Boolean(value)) {
|
||||
return this.$element;
|
||||
}
|
||||
return this.toggleAnimate();
|
||||
}
|
||||
}, {
|
||||
key: 'toggleAnimate',
|
||||
value: function toggleAnimate() {
|
||||
this.options.animate = !this.options.animate;
|
||||
this.$wrapper.toggleClass(this._getClass('animate'));
|
||||
return this.$element;
|
||||
}
|
||||
}, {
|
||||
key: 'disabled',
|
||||
value: function disabled(value) {
|
||||
if (typeof value === 'undefined') {
|
||||
return this.options.disabled;
|
||||
}
|
||||
if (this.options.disabled === Boolean(value)) {
|
||||
return this.$element;
|
||||
}
|
||||
return this.toggleDisabled();
|
||||
}
|
||||
}, {
|
||||
key: 'toggleDisabled',
|
||||
value: function toggleDisabled() {
|
||||
this.options.disabled = !this.options.disabled;
|
||||
this.$element.prop('disabled', this.options.disabled);
|
||||
this.$wrapper.toggleClass(this._getClass('disabled'));
|
||||
return this.$element;
|
||||
}
|
||||
}, {
|
||||
key: 'readonly',
|
||||
value: function readonly(value) {
|
||||
if (typeof value === 'undefined') {
|
||||
return this.options.readonly;
|
||||
}
|
||||
if (this.options.readonly === Boolean(value)) {
|
||||
return this.$element;
|
||||
}
|
||||
return this.toggleReadonly();
|
||||
}
|
||||
}, {
|
||||
key: 'toggleReadonly',
|
||||
value: function toggleReadonly() {
|
||||
this.options.readonly = !this.options.readonly;
|
||||
this.$element.prop('readonly', this.options.readonly);
|
||||
this.$wrapper.toggleClass(this._getClass('readonly'));
|
||||
return this.$element;
|
||||
}
|
||||
}, {
|
||||
key: 'indeterminate',
|
||||
value: function indeterminate(value) {
|
||||
if (typeof value === 'undefined') {
|
||||
return this.options.indeterminate;
|
||||
}
|
||||
if (this.options.indeterminate === Boolean(value)) {
|
||||
return this.$element;
|
||||
}
|
||||
return this.toggleIndeterminate();
|
||||
}
|
||||
}, {
|
||||
key: 'toggleIndeterminate',
|
||||
value: function toggleIndeterminate() {
|
||||
this.options.indeterminate = !this.options.indeterminate;
|
||||
this.$element.prop('indeterminate', this.options.indeterminate);
|
||||
this.$wrapper.toggleClass(this._getClass('indeterminate'));
|
||||
this._containerPosition();
|
||||
return this.$element;
|
||||
}
|
||||
}, {
|
||||
key: 'inverse',
|
||||
value: function inverse(value) {
|
||||
if (typeof value === 'undefined') {
|
||||
return this.options.inverse;
|
||||
}
|
||||
if (this.options.inverse === Boolean(value)) {
|
||||
return this.$element;
|
||||
}
|
||||
return this.toggleInverse();
|
||||
}
|
||||
}, {
|
||||
key: 'toggleInverse',
|
||||
value: function toggleInverse() {
|
||||
this.$wrapper.toggleClass(this._getClass('inverse'));
|
||||
var $on = this.$on.clone(true);
|
||||
var $off = this.$off.clone(true);
|
||||
this.$on.replaceWith($off);
|
||||
this.$off.replaceWith($on);
|
||||
this.$on = $off;
|
||||
this.$off = $on;
|
||||
this.options.inverse = !this.options.inverse;
|
||||
return this.$element;
|
||||
}
|
||||
}, {
|
||||
key: 'onColor',
|
||||
value: function onColor(value) {
|
||||
if (typeof value === 'undefined') {
|
||||
return this.options.onColor;
|
||||
}
|
||||
if (this.options.onColor) {
|
||||
this.$on.removeClass(this._getClass(this.options.onColor));
|
||||
}
|
||||
this.$on.addClass(this._getClass(value));
|
||||
this.options.onColor = value;
|
||||
return this.$element;
|
||||
}
|
||||
}, {
|
||||
key: 'offColor',
|
||||
value: function offColor(value) {
|
||||
if (typeof value === 'undefined') {
|
||||
return this.options.offColor;
|
||||
}
|
||||
if (this.options.offColor) {
|
||||
this.$off.removeClass(this._getClass(this.options.offColor));
|
||||
}
|
||||
this.$off.addClass(this._getClass(value));
|
||||
this.options.offColor = value;
|
||||
return this.$element;
|
||||
}
|
||||
}, {
|
||||
key: 'onText',
|
||||
value: function onText(value) {
|
||||
if (typeof value === 'undefined') {
|
||||
return this.options.onText;
|
||||
}
|
||||
this.$on.html(value);
|
||||
this._width();
|
||||
this._containerPosition();
|
||||
this.options.onText = value;
|
||||
return this.$element;
|
||||
}
|
||||
}, {
|
||||
key: 'offText',
|
||||
value: function offText(value) {
|
||||
if (typeof value === 'undefined') {
|
||||
return this.options.offText;
|
||||
}
|
||||
this.$off.html(value);
|
||||
this._width();
|
||||
this._containerPosition();
|
||||
this.options.offText = value;
|
||||
return this.$element;
|
||||
}
|
||||
}, {
|
||||
key: 'labelText',
|
||||
value: function labelText(value) {
|
||||
if (typeof value === 'undefined') {
|
||||
return this.options.labelText;
|
||||
}
|
||||
this.$label.html(value);
|
||||
this._width();
|
||||
this.options.labelText = value;
|
||||
return this.$element;
|
||||
}
|
||||
}, {
|
||||
key: 'handleWidth',
|
||||
value: function handleWidth(value) {
|
||||
if (typeof value === 'undefined') {
|
||||
return this.options.handleWidth;
|
||||
}
|
||||
this.options.handleWidth = value;
|
||||
this._width();
|
||||
this._containerPosition();
|
||||
return this.$element;
|
||||
}
|
||||
}, {
|
||||
key: 'labelWidth',
|
||||
value: function labelWidth(value) {
|
||||
if (typeof value === 'undefined') {
|
||||
return this.options.labelWidth;
|
||||
}
|
||||
this.options.labelWidth = value;
|
||||
this._width();
|
||||
this._containerPosition();
|
||||
return this.$element;
|
||||
}
|
||||
}, {
|
||||
key: 'baseClass',
|
||||
value: function baseClass(value) {
|
||||
return this.options.baseClass;
|
||||
}
|
||||
}, {
|
||||
key: 'wrapperClass',
|
||||
value: function wrapperClass(value) {
|
||||
if (typeof value === 'undefined') {
|
||||
return this.options.wrapperClass;
|
||||
}
|
||||
if (!value) {
|
||||
value = $.fn.bootstrapSwitch.defaults.wrapperClass;
|
||||
}
|
||||
this.$wrapper.removeClass(this._getClasses(this.options.wrapperClass).join(' '));
|
||||
this.$wrapper.addClass(this._getClasses(value).join(' '));
|
||||
this.options.wrapperClass = value;
|
||||
return this.$element;
|
||||
}
|
||||
}, {
|
||||
key: 'radioAllOff',
|
||||
value: function radioAllOff(value) {
|
||||
if (typeof value === 'undefined') {
|
||||
return this.options.radioAllOff;
|
||||
}
|
||||
var val = Boolean(value);
|
||||
if (this.options.radioAllOff === val) {
|
||||
return this.$element;
|
||||
}
|
||||
this.options.radioAllOff = val;
|
||||
return this.$element;
|
||||
}
|
||||
}, {
|
||||
key: 'onInit',
|
||||
value: function onInit(value) {
|
||||
if (typeof value === 'undefined') {
|
||||
return this.options.onInit;
|
||||
}
|
||||
if (!value) {
|
||||
value = $.fn.bootstrapSwitch.defaults.onInit;
|
||||
}
|
||||
this.options.onInit = value;
|
||||
return this.$element;
|
||||
}
|
||||
}, {
|
||||
key: 'onSwitchChange',
|
||||
value: function onSwitchChange(value) {
|
||||
if (typeof value === 'undefined') {
|
||||
return this.options.onSwitchChange;
|
||||
}
|
||||
if (!value) {
|
||||
value = $.fn.bootstrapSwitch.defaults.onSwitchChange;
|
||||
}
|
||||
this.options.onSwitchChange = value;
|
||||
return this.$element;
|
||||
}
|
||||
}, {
|
||||
key: 'destroy',
|
||||
value: function destroy() {
|
||||
var $form = this.$element.closest('form');
|
||||
if ($form.length) {
|
||||
$form.off('reset.bootstrapSwitch').removeData('bootstrap-switch');
|
||||
}
|
||||
this.$container.children().not(this.$element).remove();
|
||||
this.$element.unwrap().unwrap().off('.bootstrapSwitch').removeData('bootstrap-switch');
|
||||
return this.$element;
|
||||
}
|
||||
}, {
|
||||
key: '_getElementOptions',
|
||||
value: function _getElementOptions() {
|
||||
return {
|
||||
state: this.$element.is(':checked'),
|
||||
size: this.$element.data('size'),
|
||||
animate: this.$element.data('animate'),
|
||||
disabled: this.$element.is(':disabled'),
|
||||
readonly: this.$element.is('[readonly]'),
|
||||
indeterminate: this.$element.data('indeterminate'),
|
||||
inverse: this.$element.data('inverse'),
|
||||
radioAllOff: this.$element.data('radio-all-off'),
|
||||
onColor: this.$element.data('on-color'),
|
||||
offColor: this.$element.data('off-color'),
|
||||
onText: this.$element.data('on-text'),
|
||||
offText: this.$element.data('off-text'),
|
||||
labelText: this.$element.data('label-text'),
|
||||
handleWidth: this.$element.data('handle-width'),
|
||||
labelWidth: this.$element.data('label-width'),
|
||||
baseClass: this.$element.data('base-class'),
|
||||
wrapperClass: this.$element.data('wrapper-class')
|
||||
};
|
||||
}
|
||||
}, {
|
||||
key: '_width',
|
||||
value: function _width() {
|
||||
var _this2 = this;
|
||||
|
||||
var $handles = this.$on.add(this.$off).add(this.$label).css('width', '');
|
||||
var handleWidth = this.options.handleWidth === 'auto' ? Math.round(Math.max(this.$on.width(), this.$off.width())) : this.options.handleWidth;
|
||||
$handles.width(handleWidth);
|
||||
this.$label.width(function (index, width) {
|
||||
if (_this2.options.labelWidth !== 'auto') {
|
||||
return _this2.options.labelWidth;
|
||||
}
|
||||
if (width < handleWidth) {
|
||||
return handleWidth;
|
||||
}
|
||||
return width;
|
||||
});
|
||||
this._handleWidth = this.$on.outerWidth();
|
||||
this._labelWidth = this.$label.outerWidth();
|
||||
this.$container.width(this._handleWidth * 2 + this._labelWidth);
|
||||
return this.$wrapper.width(this._handleWidth + this._labelWidth);
|
||||
}
|
||||
}, {
|
||||
key: '_containerPosition',
|
||||
value: function _containerPosition() {
|
||||
var _this3 = this;
|
||||
|
||||
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.options.state;
|
||||
var callback = arguments[1];
|
||||
|
||||
this.$container.css('margin-left', function () {
|
||||
var values = [0, '-' + _this3._handleWidth + 'px'];
|
||||
if (_this3.options.indeterminate) {
|
||||
return '-' + _this3._handleWidth / 2 + 'px';
|
||||
}
|
||||
if (state) {
|
||||
if (_this3.options.inverse) {
|
||||
return values[1];
|
||||
} else {
|
||||
return values[0];
|
||||
}
|
||||
} else {
|
||||
if (_this3.options.inverse) {
|
||||
return values[0];
|
||||
} else {
|
||||
return values[1];
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: '_init',
|
||||
value: function _init() {
|
||||
var _this4 = this;
|
||||
|
||||
var init = function init() {
|
||||
_this4.setPrevOptions();
|
||||
_this4._width();
|
||||
_this4._containerPosition();
|
||||
setTimeout(function () {
|
||||
if (_this4.options.animate) {
|
||||
return _this4.$wrapper.addClass(_this4._getClass('animate'));
|
||||
}
|
||||
}, 50);
|
||||
};
|
||||
if (this.$wrapper.is(':visible')) {
|
||||
init();
|
||||
return;
|
||||
}
|
||||
var initInterval = window.setInterval(function () {
|
||||
if (_this4.$wrapper.is(':visible')) {
|
||||
init();
|
||||
return window.clearInterval(initInterval);
|
||||
}
|
||||
}, 50);
|
||||
}
|
||||
}, {
|
||||
key: '_elementHandlers',
|
||||
value: function _elementHandlers() {
|
||||
var _this5 = this;
|
||||
|
||||
return this.$element.on({
|
||||
'setPreviousOptions.bootstrapSwitch': this.setPrevOptions.bind(this),
|
||||
|
||||
'previousState.bootstrapSwitch': function previousStateBootstrapSwitch() {
|
||||
_this5.options = _this5.prevOptions;
|
||||
if (_this5.options.indeterminate) {
|
||||
_this5.$wrapper.addClass(_this5._getClass('indeterminate'));
|
||||
}
|
||||
_this5.$element.prop('checked', _this5.options.state).trigger('change.bootstrapSwitch', true);
|
||||
},
|
||||
|
||||
'change.bootstrapSwitch': function changeBootstrapSwitch(event, skip) {
|
||||
event.preventDefault();
|
||||
event.stopImmediatePropagation();
|
||||
var state = _this5.$element.is(':checked');
|
||||
_this5._containerPosition(state);
|
||||
if (state === _this5.options.state) {
|
||||
return;
|
||||
}
|
||||
_this5.options.state = state;
|
||||
_this5.$wrapper.toggleClass(_this5._getClass('off')).toggleClass(_this5._getClass('on'));
|
||||
if (!skip) {
|
||||
if (_this5.$element.is(':radio')) {
|
||||
$('[name="' + _this5.$element.attr('name') + '"]').not(_this5.$element).prop('checked', false).trigger('change.bootstrapSwitch', true);
|
||||
}
|
||||
_this5.$element.trigger('switchChange.bootstrapSwitch', [state]);
|
||||
}
|
||||
},
|
||||
|
||||
'focus.bootstrapSwitch': function focusBootstrapSwitch(event) {
|
||||
event.preventDefault();
|
||||
_this5.$wrapper.addClass(_this5._getClass('focused'));
|
||||
},
|
||||
|
||||
'blur.bootstrapSwitch': function blurBootstrapSwitch(event) {
|
||||
event.preventDefault();
|
||||
_this5.$wrapper.removeClass(_this5._getClass('focused'));
|
||||
},
|
||||
|
||||
'keydown.bootstrapSwitch': function keydownBootstrapSwitch(event) {
|
||||
if (!event.which || _this5.options.disabled || _this5.options.readonly) {
|
||||
return;
|
||||
}
|
||||
if (event.which === 37 || event.which === 39) {
|
||||
event.preventDefault();
|
||||
event.stopImmediatePropagation();
|
||||
_this5.state(event.which === 39);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: '_handleHandlers',
|
||||
value: function _handleHandlers() {
|
||||
var _this6 = this;
|
||||
|
||||
this.$on.on('click.bootstrapSwitch', function (event) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
_this6.state(false);
|
||||
return _this6.$element.trigger('focus.bootstrapSwitch');
|
||||
});
|
||||
return this.$off.on('click.bootstrapSwitch', function (event) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
_this6.state(true);
|
||||
return _this6.$element.trigger('focus.bootstrapSwitch');
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: '_labelHandlers',
|
||||
value: function _labelHandlers() {
|
||||
var _this7 = this;
|
||||
|
||||
var handlers = {
|
||||
click: function click(event) {
|
||||
event.stopPropagation();
|
||||
},
|
||||
|
||||
|
||||
'mousedown.bootstrapSwitch touchstart.bootstrapSwitch': function mousedownBootstrapSwitchTouchstartBootstrapSwitch(event) {
|
||||
if (_this7._dragStart || _this7.options.disabled || _this7.options.readonly) {
|
||||
return;
|
||||
}
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
_this7._dragStart = (event.pageX || event.originalEvent.touches[0].pageX) - parseInt(_this7.$container.css('margin-left'), 10);
|
||||
if (_this7.options.animate) {
|
||||
_this7.$wrapper.removeClass(_this7._getClass('animate'));
|
||||
}
|
||||
_this7.$element.trigger('focus.bootstrapSwitch');
|
||||
},
|
||||
|
||||
'mousemove.bootstrapSwitch touchmove.bootstrapSwitch': function mousemoveBootstrapSwitchTouchmoveBootstrapSwitch(event) {
|
||||
if (_this7._dragStart == null) {
|
||||
return;
|
||||
}
|
||||
var difference = (event.pageX || event.originalEvent.touches[0].pageX) - _this7._dragStart;
|
||||
event.preventDefault();
|
||||
if (difference < -_this7._handleWidth || difference > 0) {
|
||||
return;
|
||||
}
|
||||
_this7._dragEnd = difference;
|
||||
_this7.$container.css('margin-left', _this7._dragEnd + 'px');
|
||||
},
|
||||
|
||||
'mouseup.bootstrapSwitch touchend.bootstrapSwitch': function mouseupBootstrapSwitchTouchendBootstrapSwitch(event) {
|
||||
if (!_this7._dragStart) {
|
||||
return;
|
||||
}
|
||||
event.preventDefault();
|
||||
if (_this7.options.animate) {
|
||||
_this7.$wrapper.addClass(_this7._getClass('animate'));
|
||||
}
|
||||
if (_this7._dragEnd) {
|
||||
var state = _this7._dragEnd > -(_this7._handleWidth / 2);
|
||||
_this7._dragEnd = false;
|
||||
_this7.state(_this7.options.inverse ? !state : state);
|
||||
} else {
|
||||
_this7.state(!_this7.options.state);
|
||||
}
|
||||
_this7._dragStart = false;
|
||||
},
|
||||
|
||||
'mouseleave.bootstrapSwitch': function mouseleaveBootstrapSwitch() {
|
||||
_this7.$label.trigger('mouseup.bootstrapSwitch');
|
||||
}
|
||||
};
|
||||
this.$label.on(handlers);
|
||||
}
|
||||
}, {
|
||||
key: '_externalLabelHandler',
|
||||
value: function _externalLabelHandler() {
|
||||
var _this8 = this;
|
||||
|
||||
var $externalLabel = this.$element.closest('label');
|
||||
$externalLabel.on('click', function (event) {
|
||||
event.preventDefault();
|
||||
event.stopImmediatePropagation();
|
||||
if (event.target === $externalLabel[0]) {
|
||||
_this8.toggleState();
|
||||
}
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: '_formHandler',
|
||||
value: function _formHandler() {
|
||||
var $form = this.$element.closest('form');
|
||||
if ($form.data('bootstrap-switch')) {
|
||||
return;
|
||||
}
|
||||
$form.on('reset.bootstrapSwitch', function () {
|
||||
window.setTimeout(function () {
|
||||
$form.find('input').filter(function () {
|
||||
return $(this).data('bootstrap-switch');
|
||||
}).each(function () {
|
||||
return $(this).bootstrapSwitch('state', this.checked);
|
||||
});
|
||||
}, 1);
|
||||
}).data('bootstrap-switch', true);
|
||||
}
|
||||
}, {
|
||||
key: '_getClass',
|
||||
value: function _getClass(name) {
|
||||
return this.options.baseClass + '-' + name;
|
||||
}
|
||||
}, {
|
||||
key: '_getClasses',
|
||||
value: function _getClasses(classes) {
|
||||
if (!$.isArray(classes)) {
|
||||
return [this._getClass(classes)];
|
||||
}
|
||||
return classes.map(this._getClass.bind(this));
|
||||
}
|
||||
}]);
|
||||
|
||||
return BootstrapSwitch;
|
||||
}();
|
||||
|
||||
$.fn.bootstrapSwitch = function (option) {
|
||||
for (var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
||||
args[_key2 - 1] = arguments[_key2];
|
||||
}
|
||||
|
||||
function reducer(ret, next) {
|
||||
var $this = $(next);
|
||||
var existingData = $this.data('bootstrap-switch');
|
||||
var data = existingData || new BootstrapSwitch(next, option);
|
||||
if (!existingData) {
|
||||
$this.data('bootstrap-switch', data);
|
||||
}
|
||||
if (typeof option === 'string') {
|
||||
return data[option].apply(data, args);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
return Array.prototype.reduce.call(this, reducer, this);
|
||||
};
|
||||
$.fn.bootstrapSwitch.Constructor = BootstrapSwitch;
|
||||
$.fn.bootstrapSwitch.defaults = {
|
||||
state: true,
|
||||
size: null,
|
||||
animate: true,
|
||||
disabled: false,
|
||||
readonly: false,
|
||||
indeterminate: false,
|
||||
inverse: false,
|
||||
radioAllOff: false,
|
||||
onColor: 'primary',
|
||||
offColor: 'default',
|
||||
onText: 'ON',
|
||||
offText: 'OFF',
|
||||
labelText: ' ',
|
||||
handleWidth: 'auto',
|
||||
labelWidth: 'auto',
|
||||
baseClass: 'bootstrap-switch',
|
||||
wrapperClass: 'wrapper',
|
||||
onInit: function onInit() {},
|
||||
onSwitchChange: function onSwitchChange() {}
|
||||
};
|
||||
});
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user