diff options
author | XhmikosR <xhmikosr@gmail.com> | 2021-10-13 15:19:28 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-13 15:19:28 +0300 |
commit | e8f702666f285a3e69866ed1f8d29fa6eaaaeabb (patch) | |
tree | 944b2dc894f49f8278d41d096e4388e9ac83157b /js/src/alert.js | |
parent | db44392bda22f3d5319d2880c992f76d27d2a60c (diff) |
JS: minor refactoring (#35183)
* add missing comments
* shorten block comments
* reorder constants
* reorder public/private methods
* sort exports alphabetically in util/index.js
* fix a couple of typos
Diffstat (limited to 'js/src/alert.js')
-rw-r--r-- | js/src/alert.js | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/js/src/alert.js b/js/src/alert.js index 192bea89fe..7d4b555ea0 100644 --- a/js/src/alert.js +++ b/js/src/alert.js @@ -11,9 +11,7 @@ import BaseComponent from './base-component' import { enableDismissTrigger } from './util/component-functions' /** - * ------------------------------------------------------------------------ * Constants - * ------------------------------------------------------------------------ */ const NAME = 'alert' @@ -26,20 +24,16 @@ const CLASS_NAME_FADE = 'fade' const CLASS_NAME_SHOW = 'show' /** - * ------------------------------------------------------------------------ - * Class Definition - * ------------------------------------------------------------------------ + * Class definition */ class Alert extends BaseComponent { // Getters - static get NAME() { return NAME } // Public - close() { const closeEvent = EventHandler.trigger(this._element, EVENT_CLOSE) @@ -61,7 +55,6 @@ class Alert extends BaseComponent { } // Static - static jQueryInterface(config) { return this.each(function () { const data = Alert.getOrCreateInstance(this) @@ -80,18 +73,13 @@ class Alert extends BaseComponent { } /** - * ------------------------------------------------------------------------ - * Data Api implementation - * ------------------------------------------------------------------------ + * Data API implementation */ enableDismissTrigger(Alert, 'close') /** - * ------------------------------------------------------------------------ * jQuery - * ------------------------------------------------------------------------ - * add .Alert to jQuery only if jQuery is present */ defineJQueryPlugin(Alert) |