Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/toast.js')
-rw-r--r--js/src/toast.js52
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
}