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:
authorBardi Harborow <bardi@bardiharborow.com>2016-11-01 06:32:36 +0300
committerMark Otto <markd.otto@gmail.com>2016-11-01 06:32:36 +0300
commit0974267b8c2b137d563d36c2390b4491fb1e0309 (patch)
tree23cab8912a5860d76720b29d062cd53aa7958568 /js/src/modal.js
parentd6cc0e017dcb205f417b4f74ffd8ec5762b44bf2 (diff)
Move from $.proxy to es6 arrow functions. (#21049)
Diffstat (limited to 'js/src/modal.js')
-rw-r--r--js/src/modal.js10
1 files changed, 4 insertions, 6 deletions
diff --git a/js/src/modal.js b/js/src/modal.js
index 2526374287..a52dcb07fa 100644
--- a/js/src/modal.js
+++ b/js/src/modal.js
@@ -133,7 +133,7 @@ const Modal = (($) => {
$(this._element).on(
Event.CLICK_DISMISS,
Selector.DATA_DISMISS,
- $.proxy(this.hide, this)
+ (event) => this.hide(event)
)
$(this._dialog).on(Event.MOUSEDOWN_DISMISS, () => {
@@ -144,9 +144,7 @@ const Modal = (($) => {
})
})
- this._showBackdrop(
- $.proxy(this._showElement, this, relatedTarget)
- )
+ this._showBackdrop(() => this._showElement(relatedTarget))
}
hide(event) {
@@ -178,7 +176,7 @@ const Modal = (($) => {
($(this._element).hasClass(ClassName.FADE))) {
$(this._element)
- .one(Util.TRANSITION_END, $.proxy(this._hideModal, this))
+ .one(Util.TRANSITION_END, (event) => this._hideModal(event))
.emulateTransitionEnd(TRANSITION_DURATION)
} else {
this._hideModal()
@@ -284,7 +282,7 @@ const Modal = (($) => {
_setResizeEvent() {
if (this._isShown) {
- $(window).on(Event.RESIZE, $.proxy(this._handleUpdate, this))
+ $(window).on(Event.RESIZE, (event) => this._handleUpdate(event))
} else {
$(window).off(Event.RESIZE)
}