mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-06-11 18:02:28 +03:00
dist
This commit is contained in:
Vendored
+11
-11
@@ -106,7 +106,7 @@ var Tooltip = function ($) {
|
||||
* Popper - https://popper.js.org
|
||||
*/
|
||||
if (typeof Popper === 'undefined') {
|
||||
throw new Error('Bootstrap tooltips require Popper.js (https://popper.js.org)');
|
||||
throw new TypeError('Bootstrap tooltips require Popper.js (https://popper.js.org)');
|
||||
} // private
|
||||
|
||||
|
||||
@@ -114,19 +114,19 @@ var Tooltip = function ($) {
|
||||
this._timeout = 0;
|
||||
this._hoverState = '';
|
||||
this._activeTrigger = {};
|
||||
this._popper = null; // protected
|
||||
this._popper = null; // Protected
|
||||
|
||||
this.element = element;
|
||||
this.config = this._getConfig(config);
|
||||
this.tip = null;
|
||||
|
||||
this._setListeners();
|
||||
} // getters
|
||||
} // Getters
|
||||
|
||||
|
||||
var _proto = Tooltip.prototype;
|
||||
|
||||
// public
|
||||
// Public
|
||||
_proto.enable = function enable() {
|
||||
this._isEnabled = true;
|
||||
};
|
||||
@@ -261,7 +261,7 @@ var Tooltip = function ($) {
|
||||
_this._handlePopperPlacementChange(data);
|
||||
}
|
||||
});
|
||||
$(tip).addClass(ClassName.SHOW); // if this is a touch-enabled device we add extra
|
||||
$(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
|
||||
@@ -324,7 +324,7 @@ var Tooltip = function ($) {
|
||||
return;
|
||||
}
|
||||
|
||||
$(tip).removeClass(ClassName.SHOW); // if this is a touch-enabled device we remove the extra
|
||||
$(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) {
|
||||
@@ -348,7 +348,7 @@ var Tooltip = function ($) {
|
||||
if (this._popper !== null) {
|
||||
this._popper.scheduleUpdate();
|
||||
}
|
||||
}; // protected
|
||||
}; // Protected
|
||||
|
||||
|
||||
_proto.isWithContent = function isWithContent() {
|
||||
@@ -374,7 +374,7 @@ var Tooltip = function ($) {
|
||||
var html = this.config.html;
|
||||
|
||||
if (typeof content === 'object' && (content.nodeType || content.jquery)) {
|
||||
// content is a DOM node or a jQuery
|
||||
// Content is a DOM node or a jQuery
|
||||
if (html) {
|
||||
if (!$(content).parent().is($element)) {
|
||||
$element.empty().append(content);
|
||||
@@ -395,7 +395,7 @@ var Tooltip = function ($) {
|
||||
}
|
||||
|
||||
return title;
|
||||
}; // private
|
||||
}; // Private
|
||||
|
||||
|
||||
_proto._getAttachment = function _getAttachment(placement) {
|
||||
@@ -584,7 +584,7 @@ var Tooltip = function ($) {
|
||||
this.hide();
|
||||
this.show();
|
||||
this.config.animation = initConfigAnimation;
|
||||
}; // static
|
||||
}; // Static
|
||||
|
||||
|
||||
Tooltip._jQueryInterface = function _jQueryInterface(config) {
|
||||
@@ -604,7 +604,7 @@ var Tooltip = function ($) {
|
||||
|
||||
if (typeof config === 'string') {
|
||||
if (typeof data[config] === 'undefined') {
|
||||
throw new Error("No method named \"" + config + "\"");
|
||||
throw new TypeError("No method named \"" + config + "\"");
|
||||
}
|
||||
|
||||
data[config]();
|
||||
|
||||
Reference in New Issue
Block a user