mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-13 17:14:04 +02:00
grunt test-js, grunt dist-js now working
This commit is contained in:
6
js/dist/carousel.js
vendored
6
js/dist/carousel.js
vendored
@@ -133,7 +133,7 @@ var Carousel = (function ($) {
|
||||
}
|
||||
|
||||
if (this._config.interval && !this._isPaused) {
|
||||
this._interval = setInterval(this.next.bind(this), this._config.interval);
|
||||
this._interval = setInterval($.proxy(this.next, this), this._config.interval);
|
||||
}
|
||||
}
|
||||
}, {
|
||||
@@ -173,11 +173,11 @@ var Carousel = (function ($) {
|
||||
|
||||
value: function _addEventListeners() {
|
||||
if (this._config.keyboard) {
|
||||
$(this._element).on('keydown.bs.carousel', this._keydown.bind(this));
|
||||
$(this._element).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));
|
||||
$(this._element).on('mouseenter.bs.carousel', $.proxy(this.pause, this)).on('mouseleave.bs.carousel', $.proxy(this.cycle, this));
|
||||
}
|
||||
}
|
||||
}, {
|
||||
|
2
js/dist/carousel.js.map
vendored
2
js/dist/carousel.js.map
vendored
File diff suppressed because one or more lines are too long
8
js/dist/modal.js
vendored
8
js/dist/modal.js
vendored
@@ -114,7 +114,7 @@ var Modal = (function ($) {
|
||||
this._setEscapeEvent();
|
||||
this._setResizeEvent();
|
||||
|
||||
$(this._element).on(Event.DISMISS, Selector.DATA_DISMISS, this.hide.bind(this));
|
||||
$(this._element).on(Event.DISMISS, Selector.DATA_DISMISS, $.proxy(this.hide, this));
|
||||
|
||||
$(this._dialog).on(Event.MOUSEDOWN, function () {
|
||||
$(_this._element).one(Event.MOUSEUP, function (event) {
|
||||
@@ -124,7 +124,7 @@ var Modal = (function ($) {
|
||||
});
|
||||
});
|
||||
|
||||
this._showBackdrop(this._showElement.bind(this, relatedTarget));
|
||||
this._showBackdrop($.proxy(this._showElement, this, relatedTarget));
|
||||
}
|
||||
}, {
|
||||
key: 'hide',
|
||||
@@ -155,7 +155,7 @@ var Modal = (function ($) {
|
||||
|
||||
if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE)) {
|
||||
|
||||
$(this._element).one(Util.TRANSITION_END, this._hideModal.bind(this)).emulateTransitionEnd(TRANSITION_DURATION);
|
||||
$(this._element).one(Util.TRANSITION_END, $.proxy(this._hideModal, this)).emulateTransitionEnd(TRANSITION_DURATION);
|
||||
} else {
|
||||
this._hideModal();
|
||||
}
|
||||
@@ -232,7 +232,7 @@ var Modal = (function ($) {
|
||||
key: '_setResizeEvent',
|
||||
value: function _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);
|
||||
}
|
||||
|
2
js/dist/modal.js.map
vendored
2
js/dist/modal.js.map
vendored
File diff suppressed because one or more lines are too long
2
js/dist/popover.js
vendored
2
js/dist/popover.js
vendored
@@ -85,7 +85,7 @@ var Popover = (function ($) {
|
||||
}, {
|
||||
key: 'getTipElement',
|
||||
value: function getTipElement() {
|
||||
return this.tip = this.tip || $(this.config['template'])[0];
|
||||
return this.tip = this.tip || $(this.config.template)[0];
|
||||
}
|
||||
}, {
|
||||
key: 'setContent',
|
||||
|
2
js/dist/popover.js.map
vendored
2
js/dist/popover.js.map
vendored
File diff suppressed because one or more lines are too long
2
js/dist/scrollspy.js
vendored
2
js/dist/scrollspy.js
vendored
@@ -64,7 +64,7 @@ var ScrollSpy = (function ($) {
|
||||
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();
|
||||
|
2
js/dist/scrollspy.js.map
vendored
2
js/dist/scrollspy.js.map
vendored
File diff suppressed because one or more lines are too long
2
js/dist/tab.js
vendored
2
js/dist/tab.js
vendored
@@ -143,7 +143,7 @@ var Tab = (function ($) {
|
||||
var active = $(container).find(Selector.ACTIVE_CHILD)[0];
|
||||
var isTransitioning = callback && Util.supportsTransitionEnd() && (active && $(active).hasClass(ClassName.FADE) || !!$(container).find(Selector.FADE_CHILD)[0]);
|
||||
|
||||
var complete = this._transitionComplete.bind(this, element, active, isTransitioning, callback);
|
||||
var complete = $.proxy(this._transitionComplete, this, element, active, isTransitioning, callback);
|
||||
|
||||
if (active && isTransitioning) {
|
||||
$(active).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
|
||||
|
2
js/dist/tab.js.map
vendored
2
js/dist/tab.js.map
vendored
File diff suppressed because one or more lines are too long
7
js/dist/tooltip.js
vendored
7
js/dist/tooltip.js
vendored
@@ -71,7 +71,8 @@ var Tooltip = (function ($) {
|
||||
|
||||
var Selector = {
|
||||
TOOLTIP: '.tooltip',
|
||||
TOOLTIP_INNER: '.tooltip-inner' };
|
||||
TOOLTIP_INNER: '.tooltip-inner'
|
||||
};
|
||||
|
||||
var TetherClass = {
|
||||
element: false,
|
||||
@@ -339,12 +340,12 @@ var Tooltip = (function ($) {
|
||||
|
||||
triggers.forEach(function (trigger) {
|
||||
if (trigger === 'click') {
|
||||
$(_this4.element).on(_this4.constructor.Event.CLICK, _this4.config.selector, _this4.toggle.bind(_this4));
|
||||
$(_this4.element).on(_this4.constructor.Event.CLICK, _this4.config.selector, $.proxy(_this4.toggle, _this4));
|
||||
} else if (trigger !== Trigger.MANUAL) {
|
||||
var eventIn = trigger == Trigger.HOVER ? _this4.constructor.Event.MOUSEENTER : _this4.constructor.Event.FOCUSIN;
|
||||
var eventOut = trigger == Trigger.HOVER ? _this4.constructor.Event.MOUSELEAVE : _this4.constructor.Event.FOCUSOUT;
|
||||
|
||||
$(_this4.element).on(eventIn, _this4.config.selector, _this4._enter.bind(_this4)).on(eventOut, _this4.config.selector, _this4._leave.bind(_this4));
|
||||
$(_this4.element).on(eventIn, _this4.config.selector, $.proxy(_this4._enter, _this4)).on(eventOut, _this4.config.selector, $.proxy(_this4._leave, _this4));
|
||||
}
|
||||
});
|
||||
|
||||
|
2
js/dist/tooltip.js.map
vendored
2
js/dist/tooltip.js.map
vendored
File diff suppressed because one or more lines are too long
@@ -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)
|
||||
)
|
||||
}
|
||||
})
|
||||
|
@@ -321,7 +321,7 @@ $(function () {
|
||||
var $target = $('<a href="#" rel="tooltip" title="very very very very very very very very long tooltip in one line"/>')
|
||||
.appendTo($container)
|
||||
.bootstrapTooltip({
|
||||
placement: 'right',
|
||||
placement: 'right'
|
||||
})
|
||||
.bootstrapTooltip('show')
|
||||
|
||||
|
Reference in New Issue
Block a user