mirror of https://github.com/twbs/bootstrap.git
build
This commit is contained in:
parent
638b97f19c
commit
ba312c20a5
|
@ -4078,6 +4078,7 @@ tbody.collapse.show {
|
||||||
|
|
||||||
.card-title {
|
.card-title {
|
||||||
margin-bottom: 0.75rem;
|
margin-bottom: 0.75rem;
|
||||||
|
word-break: break-all;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-subtitle {
|
.card-subtitle {
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -8,16 +8,14 @@ if (typeof jQuery === 'undefined') {
|
||||||
throw new Error('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.')
|
throw new Error('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.')
|
||||||
}
|
}
|
||||||
|
|
||||||
+function ($) {
|
(function ($) {
|
||||||
var version = $.fn.jquery.split(' ')[0].split('.')
|
var version = $.fn.jquery.split(' ')[0].split('.')
|
||||||
if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] >= 4)) {
|
if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] >= 4)) {
|
||||||
throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0')
|
throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0')
|
||||||
}
|
}
|
||||||
}(jQuery);
|
})(jQuery);
|
||||||
|
|
||||||
|
|
||||||
+function () {
|
|
||||||
|
|
||||||
|
(function () {
|
||||||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
||||||
|
|
||||||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
||||||
|
@ -551,6 +549,7 @@ var Carousel = function ($) {
|
||||||
var TRANSITION_DURATION = 600;
|
var TRANSITION_DURATION = 600;
|
||||||
var ARROW_LEFT_KEYCODE = 37; // KeyboardEvent.which value for left arrow key
|
var ARROW_LEFT_KEYCODE = 37; // KeyboardEvent.which value for left arrow key
|
||||||
var ARROW_RIGHT_KEYCODE = 39; // KeyboardEvent.which value for right arrow key
|
var ARROW_RIGHT_KEYCODE = 39; // KeyboardEvent.which value for right arrow key
|
||||||
|
var TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch
|
||||||
|
|
||||||
var Default = {
|
var Default = {
|
||||||
interval: 5000,
|
interval: 5000,
|
||||||
|
@ -581,6 +580,7 @@ var Carousel = function ($) {
|
||||||
KEYDOWN: 'keydown' + EVENT_KEY,
|
KEYDOWN: 'keydown' + EVENT_KEY,
|
||||||
MOUSEENTER: 'mouseenter' + EVENT_KEY,
|
MOUSEENTER: 'mouseenter' + EVENT_KEY,
|
||||||
MOUSELEAVE: 'mouseleave' + EVENT_KEY,
|
MOUSELEAVE: 'mouseleave' + EVENT_KEY,
|
||||||
|
TOUCHEND: 'touchend' + EVENT_KEY,
|
||||||
LOAD_DATA_API: 'load' + EVENT_KEY + DATA_API_KEY,
|
LOAD_DATA_API: 'load' + EVENT_KEY + DATA_API_KEY,
|
||||||
CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY
|
CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY
|
||||||
};
|
};
|
||||||
|
@ -623,6 +623,8 @@ var Carousel = function ($) {
|
||||||
this._isPaused = false;
|
this._isPaused = false;
|
||||||
this._isSliding = false;
|
this._isSliding = false;
|
||||||
|
|
||||||
|
this.touchTimeout = null;
|
||||||
|
|
||||||
this._config = this._getConfig(config);
|
this._config = this._getConfig(config);
|
||||||
this._element = $(element)[0];
|
this._element = $(element)[0];
|
||||||
this._indicatorsElement = $(this._element).find(Selector.INDICATORS)[0];
|
this._indicatorsElement = $(this._element).find(Selector.INDICATORS)[0];
|
||||||
|
@ -742,12 +744,30 @@ var Carousel = function ($) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this._config.pause === 'hover' && !('ontouchstart' in document.documentElement)) {
|
if (this._config.pause === 'hover') {
|
||||||
$(this._element).on(Event.MOUSEENTER, function (event) {
|
$(this._element).on(Event.MOUSEENTER, function (event) {
|
||||||
return _this4.pause(event);
|
return _this4.pause(event);
|
||||||
}).on(Event.MOUSELEAVE, function (event) {
|
}).on(Event.MOUSELEAVE, function (event) {
|
||||||
return _this4.cycle(event);
|
return _this4.cycle(event);
|
||||||
});
|
});
|
||||||
|
if ('ontouchstart' in document.documentElement) {
|
||||||
|
// if it's a touch-enabled device, mouseenter/leave are fired as
|
||||||
|
// part of the mouse compatibility events on first tap - the carousel
|
||||||
|
// would stop cycling until user tapped out of it;
|
||||||
|
// here, we listen for touchend, explicitly pause the carousel
|
||||||
|
// (as if it's the second time we tap on it, mouseenter compat event
|
||||||
|
// is NOT fired) and after a timeout (to allow for mouse compatibility
|
||||||
|
// events to fire) we explicitly restart cycling
|
||||||
|
$(this._element).on(Event.TOUCHEND, function () {
|
||||||
|
_this4.pause();
|
||||||
|
if (_this4.touchTimeout) {
|
||||||
|
clearTimeout(_this4.touchTimeout);
|
||||||
|
}
|
||||||
|
_this4.touchTimeout = setTimeout(function (event) {
|
||||||
|
return _this4.cycle(event);
|
||||||
|
}, TOUCHEVENT_COMPAT_WAIT + _this4._config.interval);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1463,7 +1483,7 @@ var Dropdown = function ($) {
|
||||||
// only needed because of broken event delegation on iOS
|
// only needed because of broken event delegation on iOS
|
||||||
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
|
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
|
||||||
if ('ontouchstart' in document.documentElement && !$(parent).closest(Selector.NAVBAR_NAV).length) {
|
if ('ontouchstart' in document.documentElement && !$(parent).closest(Selector.NAVBAR_NAV).length) {
|
||||||
$('body').children().on('mouseover', '*', $.noop);
|
$('body').children().on('mouseover', null, $.noop);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.focus();
|
this.focus();
|
||||||
|
@ -1537,7 +1557,7 @@ var Dropdown = function ($) {
|
||||||
// if this is a touch-enabled device we remove the extra
|
// if this is a touch-enabled device we remove the extra
|
||||||
// empty mouseover listeners we added for iOS support
|
// empty mouseover listeners we added for iOS support
|
||||||
if ('ontouchstart' in document.documentElement) {
|
if ('ontouchstart' in document.documentElement) {
|
||||||
$('body').children().off('mouseover', '*', $.noop);
|
$('body').children().off('mouseover', null, $.noop);
|
||||||
}
|
}
|
||||||
|
|
||||||
toggles[i].setAttribute('aria-expanded', 'false');
|
toggles[i].setAttribute('aria-expanded', 'false');
|
||||||
|
@ -3041,6 +3061,14 @@ var Tooltip = function ($) {
|
||||||
|
|
||||||
$(tip).addClass(ClassName.SHOW);
|
$(tip).addClass(ClassName.SHOW);
|
||||||
|
|
||||||
|
// if this is a touch-enabled device we add extra
|
||||||
|
// empty mouseover listeners to the body's immediate children;
|
||||||
|
// only needed because of broken event delegation on iOS
|
||||||
|
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
|
||||||
|
if ('ontouchstart' in document.documentElement) {
|
||||||
|
$('body').children().on('mouseover', null, $.noop);
|
||||||
|
}
|
||||||
|
|
||||||
var complete = function complete() {
|
var complete = function complete() {
|
||||||
var prevHoverState = _this23._hoverState;
|
var prevHoverState = _this23._hoverState;
|
||||||
_this23._hoverState = null;
|
_this23._hoverState = null;
|
||||||
|
@ -3089,6 +3117,12 @@ var Tooltip = function ($) {
|
||||||
|
|
||||||
$(tip).removeClass(ClassName.SHOW);
|
$(tip).removeClass(ClassName.SHOW);
|
||||||
|
|
||||||
|
// if this is a touch-enabled device we remove the extra
|
||||||
|
// empty mouseover listeners we added for iOS support
|
||||||
|
if ('ontouchstart' in document.documentElement) {
|
||||||
|
$('body').children().off('mouseover', null, $.noop);
|
||||||
|
}
|
||||||
|
|
||||||
this._activeTrigger[Trigger.CLICK] = false;
|
this._activeTrigger[Trigger.CLICK] = false;
|
||||||
this._activeTrigger[Trigger.FOCUS] = false;
|
this._activeTrigger[Trigger.FOCUS] = false;
|
||||||
this._activeTrigger[Trigger.HOVER] = false;
|
this._activeTrigger[Trigger.HOVER] = false;
|
||||||
|
@ -3593,4 +3627,5 @@ var Popover = function ($) {
|
||||||
return Popover;
|
return Popover;
|
||||||
}(jQuery);
|
}(jQuery);
|
||||||
|
|
||||||
}();
|
|
||||||
|
})()
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -4078,6 +4078,7 @@ tbody.collapse.show {
|
||||||
|
|
||||||
.card-title {
|
.card-title {
|
||||||
margin-bottom: 0.75rem;
|
margin-bottom: 0.75rem;
|
||||||
|
word-break: break-all;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-subtitle {
|
.card-subtitle {
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -8,16 +8,14 @@ if (typeof jQuery === 'undefined') {
|
||||||
throw new Error('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.')
|
throw new Error('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.')
|
||||||
}
|
}
|
||||||
|
|
||||||
+function ($) {
|
(function ($) {
|
||||||
var version = $.fn.jquery.split(' ')[0].split('.')
|
var version = $.fn.jquery.split(' ')[0].split('.')
|
||||||
if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] >= 4)) {
|
if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] >= 4)) {
|
||||||
throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0')
|
throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0')
|
||||||
}
|
}
|
||||||
}(jQuery);
|
})(jQuery);
|
||||||
|
|
||||||
|
|
||||||
+function () {
|
|
||||||
|
|
||||||
|
(function () {
|
||||||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
||||||
|
|
||||||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
||||||
|
@ -551,6 +549,7 @@ var Carousel = function ($) {
|
||||||
var TRANSITION_DURATION = 600;
|
var TRANSITION_DURATION = 600;
|
||||||
var ARROW_LEFT_KEYCODE = 37; // KeyboardEvent.which value for left arrow key
|
var ARROW_LEFT_KEYCODE = 37; // KeyboardEvent.which value for left arrow key
|
||||||
var ARROW_RIGHT_KEYCODE = 39; // KeyboardEvent.which value for right arrow key
|
var ARROW_RIGHT_KEYCODE = 39; // KeyboardEvent.which value for right arrow key
|
||||||
|
var TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch
|
||||||
|
|
||||||
var Default = {
|
var Default = {
|
||||||
interval: 5000,
|
interval: 5000,
|
||||||
|
@ -581,6 +580,7 @@ var Carousel = function ($) {
|
||||||
KEYDOWN: 'keydown' + EVENT_KEY,
|
KEYDOWN: 'keydown' + EVENT_KEY,
|
||||||
MOUSEENTER: 'mouseenter' + EVENT_KEY,
|
MOUSEENTER: 'mouseenter' + EVENT_KEY,
|
||||||
MOUSELEAVE: 'mouseleave' + EVENT_KEY,
|
MOUSELEAVE: 'mouseleave' + EVENT_KEY,
|
||||||
|
TOUCHEND: 'touchend' + EVENT_KEY,
|
||||||
LOAD_DATA_API: 'load' + EVENT_KEY + DATA_API_KEY,
|
LOAD_DATA_API: 'load' + EVENT_KEY + DATA_API_KEY,
|
||||||
CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY
|
CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY
|
||||||
};
|
};
|
||||||
|
@ -623,6 +623,8 @@ var Carousel = function ($) {
|
||||||
this._isPaused = false;
|
this._isPaused = false;
|
||||||
this._isSliding = false;
|
this._isSliding = false;
|
||||||
|
|
||||||
|
this.touchTimeout = null;
|
||||||
|
|
||||||
this._config = this._getConfig(config);
|
this._config = this._getConfig(config);
|
||||||
this._element = $(element)[0];
|
this._element = $(element)[0];
|
||||||
this._indicatorsElement = $(this._element).find(Selector.INDICATORS)[0];
|
this._indicatorsElement = $(this._element).find(Selector.INDICATORS)[0];
|
||||||
|
@ -742,12 +744,30 @@ var Carousel = function ($) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this._config.pause === 'hover' && !('ontouchstart' in document.documentElement)) {
|
if (this._config.pause === 'hover') {
|
||||||
$(this._element).on(Event.MOUSEENTER, function (event) {
|
$(this._element).on(Event.MOUSEENTER, function (event) {
|
||||||
return _this4.pause(event);
|
return _this4.pause(event);
|
||||||
}).on(Event.MOUSELEAVE, function (event) {
|
}).on(Event.MOUSELEAVE, function (event) {
|
||||||
return _this4.cycle(event);
|
return _this4.cycle(event);
|
||||||
});
|
});
|
||||||
|
if ('ontouchstart' in document.documentElement) {
|
||||||
|
// if it's a touch-enabled device, mouseenter/leave are fired as
|
||||||
|
// part of the mouse compatibility events on first tap - the carousel
|
||||||
|
// would stop cycling until user tapped out of it;
|
||||||
|
// here, we listen for touchend, explicitly pause the carousel
|
||||||
|
// (as if it's the second time we tap on it, mouseenter compat event
|
||||||
|
// is NOT fired) and after a timeout (to allow for mouse compatibility
|
||||||
|
// events to fire) we explicitly restart cycling
|
||||||
|
$(this._element).on(Event.TOUCHEND, function () {
|
||||||
|
_this4.pause();
|
||||||
|
if (_this4.touchTimeout) {
|
||||||
|
clearTimeout(_this4.touchTimeout);
|
||||||
|
}
|
||||||
|
_this4.touchTimeout = setTimeout(function (event) {
|
||||||
|
return _this4.cycle(event);
|
||||||
|
}, TOUCHEVENT_COMPAT_WAIT + _this4._config.interval);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1463,7 +1483,7 @@ var Dropdown = function ($) {
|
||||||
// only needed because of broken event delegation on iOS
|
// only needed because of broken event delegation on iOS
|
||||||
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
|
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
|
||||||
if ('ontouchstart' in document.documentElement && !$(parent).closest(Selector.NAVBAR_NAV).length) {
|
if ('ontouchstart' in document.documentElement && !$(parent).closest(Selector.NAVBAR_NAV).length) {
|
||||||
$('body').children().on('mouseover', '*', $.noop);
|
$('body').children().on('mouseover', null, $.noop);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.focus();
|
this.focus();
|
||||||
|
@ -1537,7 +1557,7 @@ var Dropdown = function ($) {
|
||||||
// if this is a touch-enabled device we remove the extra
|
// if this is a touch-enabled device we remove the extra
|
||||||
// empty mouseover listeners we added for iOS support
|
// empty mouseover listeners we added for iOS support
|
||||||
if ('ontouchstart' in document.documentElement) {
|
if ('ontouchstart' in document.documentElement) {
|
||||||
$('body').children().off('mouseover', '*', $.noop);
|
$('body').children().off('mouseover', null, $.noop);
|
||||||
}
|
}
|
||||||
|
|
||||||
toggles[i].setAttribute('aria-expanded', 'false');
|
toggles[i].setAttribute('aria-expanded', 'false');
|
||||||
|
@ -3041,6 +3061,14 @@ var Tooltip = function ($) {
|
||||||
|
|
||||||
$(tip).addClass(ClassName.SHOW);
|
$(tip).addClass(ClassName.SHOW);
|
||||||
|
|
||||||
|
// if this is a touch-enabled device we add extra
|
||||||
|
// empty mouseover listeners to the body's immediate children;
|
||||||
|
// only needed because of broken event delegation on iOS
|
||||||
|
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
|
||||||
|
if ('ontouchstart' in document.documentElement) {
|
||||||
|
$('body').children().on('mouseover', null, $.noop);
|
||||||
|
}
|
||||||
|
|
||||||
var complete = function complete() {
|
var complete = function complete() {
|
||||||
var prevHoverState = _this23._hoverState;
|
var prevHoverState = _this23._hoverState;
|
||||||
_this23._hoverState = null;
|
_this23._hoverState = null;
|
||||||
|
@ -3089,6 +3117,12 @@ var Tooltip = function ($) {
|
||||||
|
|
||||||
$(tip).removeClass(ClassName.SHOW);
|
$(tip).removeClass(ClassName.SHOW);
|
||||||
|
|
||||||
|
// if this is a touch-enabled device we remove the extra
|
||||||
|
// empty mouseover listeners we added for iOS support
|
||||||
|
if ('ontouchstart' in document.documentElement) {
|
||||||
|
$('body').children().off('mouseover', null, $.noop);
|
||||||
|
}
|
||||||
|
|
||||||
this._activeTrigger[Trigger.CLICK] = false;
|
this._activeTrigger[Trigger.CLICK] = false;
|
||||||
this._activeTrigger[Trigger.FOCUS] = false;
|
this._activeTrigger[Trigger.FOCUS] = false;
|
||||||
this._activeTrigger[Trigger.HOVER] = false;
|
this._activeTrigger[Trigger.HOVER] = false;
|
||||||
|
@ -3593,4 +3627,5 @@ var Popover = function ($) {
|
||||||
return Popover;
|
return Popover;
|
||||||
}(jQuery);
|
}(jQuery);
|
||||||
|
|
||||||
}();
|
|
||||||
|
})()
|
File diff suppressed because one or more lines are too long
|
@ -180,4 +180,4 @@ var Alert = function ($) {
|
||||||
|
|
||||||
return Alert;
|
return Alert;
|
||||||
}(jQuery);
|
}(jQuery);
|
||||||
//# sourceMappingURL=alert.js.map
|
//# sourceMappingURL=alert.js.map
|
|
@ -168,4 +168,4 @@ var Button = function ($) {
|
||||||
|
|
||||||
return Button;
|
return Button;
|
||||||
}(jQuery);
|
}(jQuery);
|
||||||
//# sourceMappingURL=button.js.map
|
//# sourceMappingURL=button.js.map
|
|
@ -28,6 +28,7 @@ var Carousel = function ($) {
|
||||||
var TRANSITION_DURATION = 600;
|
var TRANSITION_DURATION = 600;
|
||||||
var ARROW_LEFT_KEYCODE = 37; // KeyboardEvent.which value for left arrow key
|
var ARROW_LEFT_KEYCODE = 37; // KeyboardEvent.which value for left arrow key
|
||||||
var ARROW_RIGHT_KEYCODE = 39; // KeyboardEvent.which value for right arrow key
|
var ARROW_RIGHT_KEYCODE = 39; // KeyboardEvent.which value for right arrow key
|
||||||
|
var TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch
|
||||||
|
|
||||||
var Default = {
|
var Default = {
|
||||||
interval: 5000,
|
interval: 5000,
|
||||||
|
@ -58,6 +59,7 @@ var Carousel = function ($) {
|
||||||
KEYDOWN: 'keydown' + EVENT_KEY,
|
KEYDOWN: 'keydown' + EVENT_KEY,
|
||||||
MOUSEENTER: 'mouseenter' + EVENT_KEY,
|
MOUSEENTER: 'mouseenter' + EVENT_KEY,
|
||||||
MOUSELEAVE: 'mouseleave' + EVENT_KEY,
|
MOUSELEAVE: 'mouseleave' + EVENT_KEY,
|
||||||
|
TOUCHEND: 'touchend' + EVENT_KEY,
|
||||||
LOAD_DATA_API: 'load' + EVENT_KEY + DATA_API_KEY,
|
LOAD_DATA_API: 'load' + EVENT_KEY + DATA_API_KEY,
|
||||||
CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY
|
CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY
|
||||||
};
|
};
|
||||||
|
@ -100,6 +102,8 @@ var Carousel = function ($) {
|
||||||
this._isPaused = false;
|
this._isPaused = false;
|
||||||
this._isSliding = false;
|
this._isSliding = false;
|
||||||
|
|
||||||
|
this.touchTimeout = null;
|
||||||
|
|
||||||
this._config = this._getConfig(config);
|
this._config = this._getConfig(config);
|
||||||
this._element = $(element)[0];
|
this._element = $(element)[0];
|
||||||
this._indicatorsElement = $(this._element).find(Selector.INDICATORS)[0];
|
this._indicatorsElement = $(this._element).find(Selector.INDICATORS)[0];
|
||||||
|
@ -219,12 +223,30 @@ var Carousel = function ($) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this._config.pause === 'hover' && !('ontouchstart' in document.documentElement)) {
|
if (this._config.pause === 'hover') {
|
||||||
$(this._element).on(Event.MOUSEENTER, function (event) {
|
$(this._element).on(Event.MOUSEENTER, function (event) {
|
||||||
return _this2.pause(event);
|
return _this2.pause(event);
|
||||||
}).on(Event.MOUSELEAVE, function (event) {
|
}).on(Event.MOUSELEAVE, function (event) {
|
||||||
return _this2.cycle(event);
|
return _this2.cycle(event);
|
||||||
});
|
});
|
||||||
|
if ('ontouchstart' in document.documentElement) {
|
||||||
|
// if it's a touch-enabled device, mouseenter/leave are fired as
|
||||||
|
// part of the mouse compatibility events on first tap - the carousel
|
||||||
|
// would stop cycling until user tapped out of it;
|
||||||
|
// here, we listen for touchend, explicitly pause the carousel
|
||||||
|
// (as if it's the second time we tap on it, mouseenter compat event
|
||||||
|
// is NOT fired) and after a timeout (to allow for mouse compatibility
|
||||||
|
// events to fire) we explicitly restart cycling
|
||||||
|
$(this._element).on(Event.TOUCHEND, function () {
|
||||||
|
_this2.pause();
|
||||||
|
if (_this2.touchTimeout) {
|
||||||
|
clearTimeout(_this2.touchTimeout);
|
||||||
|
}
|
||||||
|
_this2.touchTimeout = setTimeout(function (event) {
|
||||||
|
return _this2.cycle(event);
|
||||||
|
}, TOUCHEVENT_COMPAT_WAIT + _this2._config.interval);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -488,4 +510,4 @@ var Carousel = function ($) {
|
||||||
|
|
||||||
return Carousel;
|
return Carousel;
|
||||||
}(jQuery);
|
}(jQuery);
|
||||||
//# sourceMappingURL=carousel.js.map
|
//# sourceMappingURL=carousel.js.map
|
File diff suppressed because one or more lines are too long
|
@ -352,4 +352,4 @@ var Collapse = function ($) {
|
||||||
|
|
||||||
return Collapse;
|
return Collapse;
|
||||||
}(jQuery);
|
}(jQuery);
|
||||||
//# sourceMappingURL=collapse.js.map
|
//# sourceMappingURL=collapse.js.map
|
|
@ -104,7 +104,7 @@ var Dropdown = function ($) {
|
||||||
// only needed because of broken event delegation on iOS
|
// only needed because of broken event delegation on iOS
|
||||||
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
|
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
|
||||||
if ('ontouchstart' in document.documentElement && !$(parent).closest(Selector.NAVBAR_NAV).length) {
|
if ('ontouchstart' in document.documentElement && !$(parent).closest(Selector.NAVBAR_NAV).length) {
|
||||||
$('body').children().on('mouseover', '*', $.noop);
|
$('body').children().on('mouseover', null, $.noop);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.focus();
|
this.focus();
|
||||||
|
@ -178,7 +178,7 @@ var Dropdown = function ($) {
|
||||||
// if this is a touch-enabled device we remove the extra
|
// if this is a touch-enabled device we remove the extra
|
||||||
// empty mouseover listeners we added for iOS support
|
// empty mouseover listeners we added for iOS support
|
||||||
if ('ontouchstart' in document.documentElement) {
|
if ('ontouchstart' in document.documentElement) {
|
||||||
$('body').children().off('mouseover', '*', $.noop);
|
$('body').children().off('mouseover', null, $.noop);
|
||||||
}
|
}
|
||||||
|
|
||||||
toggles[i].setAttribute('aria-expanded', 'false');
|
toggles[i].setAttribute('aria-expanded', 'false');
|
||||||
|
@ -284,4 +284,4 @@ var Dropdown = function ($) {
|
||||||
|
|
||||||
return Dropdown;
|
return Dropdown;
|
||||||
}(jQuery);
|
}(jQuery);
|
||||||
//# sourceMappingURL=dropdown.js.map
|
//# sourceMappingURL=dropdown.js.map
|
File diff suppressed because one or more lines are too long
|
@ -574,4 +574,4 @@ var Modal = function ($) {
|
||||||
|
|
||||||
return Modal;
|
return Modal;
|
||||||
}(jQuery);
|
}(jQuery);
|
||||||
//# sourceMappingURL=modal.js.map
|
//# sourceMappingURL=modal.js.map
|
|
@ -190,4 +190,4 @@ var Popover = function ($) {
|
||||||
|
|
||||||
return Popover;
|
return Popover;
|
||||||
}(jQuery);
|
}(jQuery);
|
||||||
//# sourceMappingURL=popover.js.map
|
//# sourceMappingURL=popover.js.map
|
|
@ -317,4 +317,4 @@ var ScrollSpy = function ($) {
|
||||||
|
|
||||||
return ScrollSpy;
|
return ScrollSpy;
|
||||||
}(jQuery);
|
}(jQuery);
|
||||||
//# sourceMappingURL=scrollspy.js.map
|
//# sourceMappingURL=scrollspy.js.map
|
|
@ -251,4 +251,4 @@ var Tab = function ($) {
|
||||||
|
|
||||||
return Tab;
|
return Tab;
|
||||||
}(jQuery);
|
}(jQuery);
|
||||||
//# sourceMappingURL=tab.js.map
|
//# sourceMappingURL=tab.js.map
|
|
@ -264,6 +264,14 @@ var Tooltip = function ($) {
|
||||||
|
|
||||||
$(tip).addClass(ClassName.SHOW);
|
$(tip).addClass(ClassName.SHOW);
|
||||||
|
|
||||||
|
// if this is a touch-enabled device we add extra
|
||||||
|
// empty mouseover listeners to the body's immediate children;
|
||||||
|
// only needed because of broken event delegation on iOS
|
||||||
|
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
|
||||||
|
if ('ontouchstart' in document.documentElement) {
|
||||||
|
$('body').children().on('mouseover', null, $.noop);
|
||||||
|
}
|
||||||
|
|
||||||
var complete = function complete() {
|
var complete = function complete() {
|
||||||
var prevHoverState = _this._hoverState;
|
var prevHoverState = _this._hoverState;
|
||||||
_this._hoverState = null;
|
_this._hoverState = null;
|
||||||
|
@ -312,6 +320,12 @@ var Tooltip = function ($) {
|
||||||
|
|
||||||
$(tip).removeClass(ClassName.SHOW);
|
$(tip).removeClass(ClassName.SHOW);
|
||||||
|
|
||||||
|
// if this is a touch-enabled device we remove the extra
|
||||||
|
// empty mouseover listeners we added for iOS support
|
||||||
|
if ('ontouchstart' in document.documentElement) {
|
||||||
|
$('body').children().off('mouseover', null, $.noop);
|
||||||
|
}
|
||||||
|
|
||||||
this._activeTrigger[Trigger.CLICK] = false;
|
this._activeTrigger[Trigger.CLICK] = false;
|
||||||
this._activeTrigger[Trigger.FOCUS] = false;
|
this._activeTrigger[Trigger.FOCUS] = false;
|
||||||
this._activeTrigger[Trigger.HOVER] = false;
|
this._activeTrigger[Trigger.HOVER] = false;
|
||||||
|
@ -632,4 +646,4 @@ var Tooltip = function ($) {
|
||||||
|
|
||||||
return Tooltip;
|
return Tooltip;
|
||||||
}(jQuery); /* global Tether */
|
}(jQuery); /* global Tether */
|
||||||
//# sourceMappingURL=tooltip.js.map
|
//# sourceMappingURL=tooltip.js.map
|
File diff suppressed because one or more lines are too long
|
@ -150,4 +150,4 @@ var Util = function ($) {
|
||||||
|
|
||||||
return Util;
|
return Util;
|
||||||
}(jQuery);
|
}(jQuery);
|
||||||
//# sourceMappingURL=util.js.map
|
//# sourceMappingURL=util.js.map
|
Loading…
Reference in New Issue