diff options
Diffstat (limited to 'assets/javascripts/bootstrap')
-rw-r--r-- | assets/javascripts/bootstrap/modal.js | 2 | ||||
-rw-r--r-- | assets/javascripts/bootstrap/tooltip.js | 24 |
2 files changed, 13 insertions, 13 deletions
diff --git a/assets/javascripts/bootstrap/modal.js b/assets/javascripts/bootstrap/modal.js index 2509c65..5fc8e5d 100644 --- a/assets/javascripts/bootstrap/modal.js +++ b/assets/javascripts/bootstrap/modal.js @@ -138,7 +138,7 @@ var Modal = (function ($) { $(this._dialog).on(Event.MOUSEDOWN_DISMISS, function () { $(_this._element).one(Event.MOUSEUP_DISMISS, function (event) { if ($(event.target).is(_this._element)) { - that._ignoreBackdropClick = true; + _this._ignoreBackdropClick = true; } }); }); diff --git a/assets/javascripts/bootstrap/tooltip.js b/assets/javascripts/bootstrap/tooltip.js index 445ca6e..45c0702 100644 --- a/assets/javascripts/bootstrap/tooltip.js +++ b/assets/javascripts/bootstrap/tooltip.js @@ -1,3 +1,5 @@ +/* global Tether */ + 'use strict'; 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; }; })(); @@ -14,6 +16,14 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons var Tooltip = (function ($) { /** + * Check for Tether dependency + * Tether - http://github.hubspot.com/tether/ + */ + if (window.Tether === undefined) { + throw new Error('Bootstrap tooltips require Tether (http://github.hubspot.com/tether/)'); + } + + /** * ------------------------------------------------------------------------ * Constants * ------------------------------------------------------------------------ @@ -248,7 +258,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); @@ -370,12 +381,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); } } @@ -414,11 +419,6 @@ var Tooltip = (function ($) { } } }, { - key: '_removeTetherClasses', - value: function _removeTetherClasses(i, css) { - return ((css.baseVal || css).match(new RegExp('(^|\\s)' + CLASS_PREFIX + '-\\S+', 'g')) || []).join(' '); - } - }, { key: '_fixTitle', value: function _fixTitle() { var titleType = typeof this.element.getAttribute('data-original-title'); |