diff options
author | XhmikosR <xhmikosr@gmail.com> | 2019-02-26 14:20:34 +0300 |
---|---|---|
committer | XhmikosR <xhmikosr@gmail.com> | 2019-03-11 18:01:28 +0300 |
commit | 46c037410b8c7eaab3cf50a5cf44093aa2fd41f4 (patch) | |
tree | cb8c857562c4d3f819a5a8fcc563bc8f2c126e4e /js/src/toast.js | |
parent | 44e6abcba50309df4fae56a9c7ef79145b64a356 (diff) |
Comply to the new rules.
Diffstat (limited to 'js/src/toast.js')
-rw-r--r-- | js/src/toast.js | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/js/src/toast.js b/js/src/toast.js index fba559197f..cbf29a104b 100644 --- a/js/src/toast.js +++ b/js/src/toast.js @@ -22,40 +22,40 @@ import Manipulator from './dom/manipulator' * ------------------------------------------------------------------------ */ -const NAME = 'toast' -const VERSION = '4.3.1' -const DATA_KEY = 'bs.toast' +const NAME = 'toast' +const VERSION = '4.3.1' +const DATA_KEY = 'bs.toast' const EVENT_KEY = `.${DATA_KEY}` const Event = { - CLICK_DISMISS : `click.dismiss${EVENT_KEY}`, - HIDE : `hide${EVENT_KEY}`, - HIDDEN : `hidden${EVENT_KEY}`, - SHOW : `show${EVENT_KEY}`, - SHOWN : `shown${EVENT_KEY}` + CLICK_DISMISS: `click.dismiss${EVENT_KEY}`, + HIDE: `hide${EVENT_KEY}`, + HIDDEN: `hidden${EVENT_KEY}`, + SHOW: `show${EVENT_KEY}`, + SHOWN: `shown${EVENT_KEY}` } const ClassName = { - FADE : 'fade', - HIDE : 'hide', - SHOW : 'show', - SHOWING : 'showing' + FADE: 'fade', + HIDE: 'hide', + SHOW: 'show', + SHOWING: 'showing' } const DefaultType = { - animation : 'boolean', - autohide : 'boolean', - delay : 'number' + animation: 'boolean', + autohide: 'boolean', + delay: 'number' } const Default = { - animation : true, - autohide : true, - delay : 500 + animation: true, + autohide: true, + delay: 500 } const Selector = { - DATA_DISMISS : '[data-dismiss="toast"]' + DATA_DISMISS: '[data-dismiss="toast"]' } /** @@ -67,7 +67,7 @@ const Selector = { class Toast { constructor(element, config) { this._element = element - this._config = this._getConfig(config) + this._config = this._getConfig(config) this._timeout = null this._setListeners() Data.setData(element, DATA_KEY, this) @@ -147,7 +147,7 @@ class Toast { Data.removeData(this._element, DATA_KEY) this._element = null - this._config = null + this._config = null } // Private @@ -198,8 +198,8 @@ class Toast { static _jQueryInterface(config) { return this.each(function () { - let data = Data.getData(this, DATA_KEY) - const _config = typeof config === 'object' && config + let data = Data.getData(this, DATA_KEY) + const _config = typeof config === 'object' && config if (!data) { data = new Toast(this, _config) @@ -229,9 +229,9 @@ class Toast { if (typeof $ !== 'undefined') { const JQUERY_NO_CONFLICT = $.fn[NAME] - $.fn[NAME] = Toast._jQueryInterface - $.fn[NAME].Constructor = Toast - $.fn[NAME].noConflict = () => { + $.fn[NAME] = Toast._jQueryInterface + $.fn[NAME].Constructor = Toast + $.fn[NAME].noConflict = () => { $.fn[NAME] = JQUERY_NO_CONFLICT return Toast._jQueryInterface } |