aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/twbs/bootstrap/js/src/alert.js
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2020-11-05 08:46:42 +0000
committerMario <mario@mariovavti.com>2020-11-05 08:46:42 +0000
commitbafbf0416462c6f18c3fb6c8c06a063c8d6fdae6 (patch)
tree8929845be585b09d0f420621281c5531e1efad3e /vendor/twbs/bootstrap/js/src/alert.js
parent6f93d9848c43019d43ea76c27d42d657ba031cd7 (diff)
parentfdefa101d84dc2a9424eaedbdb003a4c30ec5d01 (diff)
downloadvolse-hubzilla-bafbf0416462c6f18c3fb6c8c06a063c8d6fdae6.tar.gz
volse-hubzilla-bafbf0416462c6f18c3fb6c8c06a063c8d6fdae6.tar.bz2
volse-hubzilla-bafbf0416462c6f18c3fb6c8c06a063c8d6fdae6.zip
Merge branch '5.0RC'5.0
Diffstat (limited to 'vendor/twbs/bootstrap/js/src/alert.js')
-rw-r--r--vendor/twbs/bootstrap/js/src/alert.js40
1 files changed, 17 insertions, 23 deletions
diff --git a/vendor/twbs/bootstrap/js/src/alert.js b/vendor/twbs/bootstrap/js/src/alert.js
index 64e8e3843..2cdb0f023 100644
--- a/vendor/twbs/bootstrap/js/src/alert.js
+++ b/vendor/twbs/bootstrap/js/src/alert.js
@@ -1,7 +1,7 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v4.3.1): alert.js
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * Bootstrap (v4.5.2): alert.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -15,27 +15,21 @@ import Util from './util'
*/
const NAME = 'alert'
-const VERSION = '4.3.1'
+const VERSION = '4.5.2'
const DATA_KEY = 'bs.alert'
const EVENT_KEY = `.${DATA_KEY}`
const DATA_API_KEY = '.data-api'
const JQUERY_NO_CONFLICT = $.fn[NAME]
-const Selector = {
- DISMISS : '[data-dismiss="alert"]'
-}
+const SELECTOR_DISMISS = '[data-dismiss="alert"]'
-const Event = {
- CLOSE : `close${EVENT_KEY}`,
- CLOSED : `closed${EVENT_KEY}`,
- CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}`
-}
+const EVENT_CLOSE = `close${EVENT_KEY}`
+const EVENT_CLOSED = `closed${EVENT_KEY}`
+const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`
-const ClassName = {
- ALERT : 'alert',
- FADE : 'fade',
- SHOW : 'show'
-}
+const CLASS_NAME_ALERT = 'alert'
+const CLASS_NAME_FADE = 'fade'
+const CLASS_NAME_SHOW = 'show'
/**
* ------------------------------------------------------------------------
@@ -87,23 +81,23 @@ class Alert {
}
if (!parent) {
- parent = $(element).closest(`.${ClassName.ALERT}`)[0]
+ parent = $(element).closest(`.${CLASS_NAME_ALERT}`)[0]
}
return parent
}
_triggerCloseEvent(element) {
- const closeEvent = $.Event(Event.CLOSE)
+ const closeEvent = $.Event(EVENT_CLOSE)
$(element).trigger(closeEvent)
return closeEvent
}
_removeElement(element) {
- $(element).removeClass(ClassName.SHOW)
+ $(element).removeClass(CLASS_NAME_SHOW)
- if (!$(element).hasClass(ClassName.FADE)) {
+ if (!$(element).hasClass(CLASS_NAME_FADE)) {
this._destroyElement(element)
return
}
@@ -118,7 +112,7 @@ class Alert {
_destroyElement(element) {
$(element)
.detach()
- .trigger(Event.CLOSED)
+ .trigger(EVENT_CLOSED)
.remove()
}
@@ -158,8 +152,8 @@ class Alert {
*/
$(document).on(
- Event.CLICK_DATA_API,
- Selector.DISMISS,
+ EVENT_CLICK_DATA_API,
+ SELECTOR_DISMISS,
Alert._handleDismiss(new Alert())
)