1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-25 14:30:46 +02:00

grunt test-js, grunt dist-js now working

This commit is contained in:
fat
2015-05-12 16:52:54 -07:00
parent a58febf71a
commit ab1578465a
23 changed files with 3048 additions and 2122 deletions

6
js/dist/carousel.js vendored
View File

@@ -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));
}
}
}, {

File diff suppressed because one or more lines are too long

8
js/dist/modal.js vendored
View File

@@ -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);
}

File diff suppressed because one or more lines are too long

2
js/dist/popover.js vendored
View File

@@ -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',

File diff suppressed because one or more lines are too long

View File

@@ -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();

File diff suppressed because one or more lines are too long

2
js/dist/tab.js vendored
View File

@@ -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

File diff suppressed because one or more lines are too long

7
js/dist/tooltip.js vendored
View File

@@ -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));
}
});

File diff suppressed because one or more lines are too long