mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-07 14:16:47 +02:00
grunt test-js, grunt dist-js now working
This commit is contained in:
@@ -139,7 +139,7 @@ const Carousel = (($) => {
|
||||
|
||||
if (this._config.interval && !this._isPaused) {
|
||||
this._interval = setInterval(
|
||||
this.next.bind(this), this._config.interval
|
||||
$.proxy(this.next, this), this._config.interval
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -177,14 +177,14 @@ const Carousel = (($) => {
|
||||
_addEventListeners() {
|
||||
if (this._config.keyboard) {
|
||||
$(this._element)
|
||||
.on('keydown.bs.carousel', this._keydown.bind(this))
|
||||
.on('keydown.bs.carousel', $.proxy(this._keydown, this))
|
||||
}
|
||||
|
||||
if (this._config.pause == 'hover' &&
|
||||
!('ontouchstart' in document.documentElement)) {
|
||||
$(this._element)
|
||||
.on('mouseenter.bs.carousel', this.pause.bind(this))
|
||||
.on('mouseleave.bs.carousel', this.cycle.bind(this))
|
||||
.on('mouseenter.bs.carousel', $.proxy(this.pause, this))
|
||||
.on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -121,7 +121,7 @@ const Modal = (($) => {
|
||||
$(this._element).on(
|
||||
Event.DISMISS,
|
||||
Selector.DATA_DISMISS,
|
||||
this.hide.bind(this)
|
||||
$.proxy(this.hide, this)
|
||||
)
|
||||
|
||||
$(this._dialog).on(Event.MOUSEDOWN, () => {
|
||||
@@ -133,7 +133,7 @@ const Modal = (($) => {
|
||||
})
|
||||
|
||||
this._showBackdrop(
|
||||
this._showElement.bind(this, relatedTarget)
|
||||
$.proxy(this._showElement, this, relatedTarget)
|
||||
)
|
||||
}
|
||||
|
||||
@@ -166,7 +166,7 @@ const Modal = (($) => {
|
||||
($(this._element).hasClass(ClassName.FADE))) {
|
||||
|
||||
$(this._element)
|
||||
.one(Util.TRANSITION_END, this._hideModal.bind(this))
|
||||
.one(Util.TRANSITION_END, $.proxy(this._hideModal, this))
|
||||
.emulateTransitionEnd(TRANSITION_DURATION)
|
||||
} else {
|
||||
this._hideModal()
|
||||
@@ -241,7 +241,7 @@ const Modal = (($) => {
|
||||
|
||||
_setResizeEvent() {
|
||||
if (this._isShown) {
|
||||
$(window).on(Event.RESIZE, this._handleUpdate.bind(this))
|
||||
$(window).on(Event.RESIZE, $.proxy(this._handleUpdate, this))
|
||||
} else {
|
||||
$(window).off(Event.RESIZE)
|
||||
}
|
||||
|
@@ -62,7 +62,7 @@ const ScrollSpy = (($) => {
|
||||
this._activeTarget = null
|
||||
this._scrollHeight = 0
|
||||
|
||||
$(this._scrollElement).on(Event.SCROLL, this._process.bind(this))
|
||||
$(this._scrollElement).on(Event.SCROLL, $.proxy(this._process, this))
|
||||
|
||||
this.refresh()
|
||||
this._process()
|
||||
|
@@ -156,8 +156,14 @@ const Tab = (($) => {
|
||||
&& ((active && $(active).hasClass(ClassName.FADE))
|
||||
|| !!$(container).find(Selector.FADE_CHILD)[0])
|
||||
|
||||
let complete = this._transitionComplete.bind(
|
||||
this, element, active, isTransitioning, callback)
|
||||
let complete = $.proxy(
|
||||
this._transitionComplete,
|
||||
this,
|
||||
element,
|
||||
active,
|
||||
isTransitioning,
|
||||
callback
|
||||
)
|
||||
|
||||
if (active && isTransitioning) {
|
||||
$(active)
|
||||
|
@@ -373,7 +373,7 @@ const Tooltip = (($) => {
|
||||
$(this.element).on(
|
||||
this.constructor.Event.CLICK,
|
||||
this.config.selector,
|
||||
this.toggle.bind(this)
|
||||
$.proxy(this.toggle, this)
|
||||
)
|
||||
|
||||
} else if (trigger !== Trigger.MANUAL) {
|
||||
@@ -388,12 +388,12 @@ const Tooltip = (($) => {
|
||||
.on(
|
||||
eventIn,
|
||||
this.config.selector,
|
||||
this._enter.bind(this)
|
||||
$.proxy(this._enter, this)
|
||||
)
|
||||
.on(
|
||||
eventOut,
|
||||
this.config.selector,
|
||||
this._leave.bind(this)
|
||||
$.proxy(this._leave, this)
|
||||
)
|
||||
}
|
||||
})
|
||||
|
Reference in New Issue
Block a user