mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-29 21:52:22 +01:00
use Tether addTargetClasses: false option instead of manually removing them
This commit is contained in:
parent
6b1cf58d58
commit
926fb11158
@ -4,19 +4,20 @@
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
if (typeof jQuery === 'undefined') {
|
||||
throw new Error('Bootstrap\'s JavaScript requires jQuery')
|
||||
throw new Error('Bootstrap\'s JavaScript requires jQuery');
|
||||
}
|
||||
|
||||
+function ($) {
|
||||
var version = $.fn.jquery.split(' ')[0].split('.')
|
||||
if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1)) {
|
||||
throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher')
|
||||
+(function ($) {
|
||||
var version = $.fn.jquery.split(' ')[0].split('.');
|
||||
if (version[0] < 2 && version[1] < 9 || version[0] == 1 && version[1] == 9 && version[2] < 1) {
|
||||
throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher');
|
||||
}
|
||||
}(jQuery);
|
||||
})(jQuery);
|
||||
|
||||
|
||||
+function ($) {
|
||||
+(function ($) {
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
@ -27,13 +28,47 @@ if (typeof jQuery === 'undefined') {
|
||||
|
||||
'use strict';
|
||||
|
||||
var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
|
||||
var _get = function get(_x, _x2, _x3) {
|
||||
var _again = true;_function: while (_again) {
|
||||
var object = _x,
|
||||
property = _x2,
|
||||
receiver = _x3;desc = parent = getter = undefined;_again = false;if (object === null) object = Function.prototype;var desc = Object.getOwnPropertyDescriptor(object, property);if (desc === undefined) {
|
||||
var parent = Object.getPrototypeOf(object);if (parent === null) {
|
||||
return undefined;
|
||||
} else {
|
||||
_x = parent;_x2 = property;_x3 = receiver;_again = true;continue _function;
|
||||
}
|
||||
} else if ('value' in desc) {
|
||||
return desc.value;
|
||||
} else {
|
||||
var getter = desc.get;if (getter === undefined) {
|
||||
return undefined;
|
||||
}return getter.call(receiver);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
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;
|
||||
};
|
||||
})();
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
||||
function _inherits(subClass, superClass) {
|
||||
if (typeof superClass !== 'function' && superClass !== null) {
|
||||
throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass);
|
||||
}subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
|
||||
}
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
|
||||
function _classCallCheck(instance, Constructor) {
|
||||
if (!(instance instanceof Constructor)) {
|
||||
throw new TypeError('Cannot call a class as a function');
|
||||
}
|
||||
}
|
||||
|
||||
var Util = (function ($) {
|
||||
|
||||
@ -2971,7 +3006,8 @@ var Tooltip = (function ($) {
|
||||
classes: TetherClass,
|
||||
classPrefix: CLASS_PREFIX,
|
||||
offset: this.config.offset,
|
||||
constraints: this.config.constraints
|
||||
constraints: this.config.constraints,
|
||||
addTargetClasses: false
|
||||
});
|
||||
|
||||
Util.reflow(tip);
|
||||
@ -3078,12 +3114,6 @@ var Tooltip = (function ($) {
|
||||
value: function cleanupTether() {
|
||||
if (this._tether) {
|
||||
this._tether.destroy();
|
||||
|
||||
// clean up after tether's junk classes
|
||||
// remove after they fix issue
|
||||
// (https://github.com/HubSpot/tether/issues/36)
|
||||
$(this.element).removeClass(this._removeTetherClasses);
|
||||
$(this.tip).removeClass(this._removeTetherClasses);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3515,5 +3545,4 @@ var Popover = (function ($) {
|
||||
|
||||
return Popover;
|
||||
})(jQuery);
|
||||
|
||||
}(jQuery);
|
||||
})(jQuery);
|
||||
|
2
dist/js/bootstrap.min.js
vendored
2
dist/js/bootstrap.min.js
vendored
File diff suppressed because one or more lines are too long
9
dist/js/umd/tooltip.js
vendored
9
dist/js/umd/tooltip.js
vendored
@ -265,7 +265,8 @@
|
||||
classes: TetherClass,
|
||||
classPrefix: CLASS_PREFIX,
|
||||
offset: this.config.offset,
|
||||
constraints: this.config.constraints
|
||||
constraints: this.config.constraints,
|
||||
addTargetClasses: false
|
||||
});
|
||||
|
||||
_Util['default'].reflow(tip);
|
||||
@ -372,12 +373,6 @@
|
||||
value: function cleanupTether() {
|
||||
if (this._tether) {
|
||||
this._tether.destroy();
|
||||
|
||||
// clean up after tether's junk classes
|
||||
// remove after they fix issue
|
||||
// (https://github.com/HubSpot/tether/issues/36)
|
||||
$(this.element).removeClass(this._removeTetherClasses);
|
||||
$(this.tip).removeClass(this._removeTetherClasses);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2971,7 +2971,8 @@ var Tooltip = (function ($) {
|
||||
classes: TetherClass,
|
||||
classPrefix: CLASS_PREFIX,
|
||||
offset: this.config.offset,
|
||||
constraints: this.config.constraints
|
||||
constraints: this.config.constraints,
|
||||
addTargetClasses: false
|
||||
});
|
||||
|
||||
Util.reflow(tip);
|
||||
@ -3078,12 +3079,6 @@ var Tooltip = (function ($) {
|
||||
value: function cleanupTether() {
|
||||
if (this._tether) {
|
||||
this._tether.destroy();
|
||||
|
||||
// clean up after tether's junk classes
|
||||
// remove after they fix issue
|
||||
// (https://github.com/HubSpot/tether/issues/36)
|
||||
$(this.element).removeClass(this._removeTetherClasses);
|
||||
$(this.tip).removeClass(this._removeTetherClasses);
|
||||
}
|
||||
}
|
||||
|
||||
|
2
docs/dist/js/bootstrap.min.js
vendored
2
docs/dist/js/bootstrap.min.js
vendored
File diff suppressed because one or more lines are too long
9
docs/dist/js/umd/tooltip.js
vendored
9
docs/dist/js/umd/tooltip.js
vendored
@ -265,7 +265,8 @@
|
||||
classes: TetherClass,
|
||||
classPrefix: CLASS_PREFIX,
|
||||
offset: this.config.offset,
|
||||
constraints: this.config.constraints
|
||||
constraints: this.config.constraints,
|
||||
addTargetClasses: false
|
||||
});
|
||||
|
||||
_Util['default'].reflow(tip);
|
||||
@ -372,12 +373,6 @@
|
||||
value: function cleanupTether() {
|
||||
if (this._tether) {
|
||||
this._tether.destroy();
|
||||
|
||||
// clean up after tether's junk classes
|
||||
// remove after they fix issue
|
||||
// (https://github.com/HubSpot/tether/issues/36)
|
||||
$(this.element).removeClass(this._removeTetherClasses);
|
||||
$(this.tip).removeClass(this._removeTetherClasses);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -275,7 +275,8 @@ const Tooltip = (($) => {
|
||||
classes : TetherClass,
|
||||
classPrefix : CLASS_PREFIX,
|
||||
offset : this.config.offset,
|
||||
constraints : this.config.constraints
|
||||
constraints : this.config.constraints,
|
||||
addTargetClasses: false
|
||||
})
|
||||
|
||||
Util.reflow(tip)
|
||||
@ -384,12 +385,6 @@ const Tooltip = (($) => {
|
||||
cleanupTether() {
|
||||
if (this._tether) {
|
||||
this._tether.destroy()
|
||||
|
||||
// clean up after tether's junk classes
|
||||
// remove after they fix issue
|
||||
// (https://github.com/HubSpot/tether/issues/36)
|
||||
$(this.element).removeClass(this._removeTetherClasses)
|
||||
$(this.tip).removeClass(this._removeTetherClasses)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user