diff options
author | Gleb Mazovetskiy <glex.spb@gmail.com> | 2014-09-13 06:20:45 +0400 |
---|---|---|
committer | Gleb Mazovetskiy <glex.spb@gmail.com> | 2014-09-13 06:20:45 +0400 |
commit | d527f208576e5f513eaac86d78a65fa890974572 (patch) | |
tree | 38ec5a369e949bf3978fcec5d9716585504a6f3e /assets/javascripts/bootstrap | |
parent | 6e7f0f943bed639bc315ba26bc277a6af187fe1a (diff) |
rake convert
Diffstat (limited to 'assets/javascripts/bootstrap')
-rw-r--r-- | assets/javascripts/bootstrap/collapse.js | 2 | ||||
-rw-r--r-- | assets/javascripts/bootstrap/scrollspy.js | 1 | ||||
-rw-r--r-- | assets/javascripts/bootstrap/tooltip.js | 12 |
3 files changed, 12 insertions, 3 deletions
diff --git a/assets/javascripts/bootstrap/collapse.js b/assets/javascripts/bootstrap/collapse.js index 6a837761..d7d56bdd 100644 --- a/assets/javascripts/bootstrap/collapse.js +++ b/assets/javascripts/bootstrap/collapse.js @@ -42,7 +42,7 @@ this.$element.trigger(startEvent) if (startEvent.isDefaultPrevented()) return - var actives = this.$parent && this.$parent.find('> .panel > .in') + var actives = this.$parent && this.$parent.find('> .panel').children('.in, .collapsing') if (actives && actives.length) { var hasData = actives.data('bs.collapse') diff --git a/assets/javascripts/bootstrap/scrollspy.js b/assets/javascripts/bootstrap/scrollspy.js index db237878..841df187 100644 --- a/assets/javascripts/bootstrap/scrollspy.js +++ b/assets/javascripts/bootstrap/scrollspy.js @@ -65,6 +65,7 @@ return ($href && $href.length && $href.is(':visible') + && $el.is(':visible') && [[$href[offsetMethod]().top + offsetBase, href]]) || null }) .sort(function (a, b) { return a[0] - b[0] }) diff --git a/assets/javascripts/bootstrap/tooltip.js b/assets/javascripts/bootstrap/tooltip.js index aa6202f5..1e10af27 100644 --- a/assets/javascripts/bootstrap/tooltip.js +++ b/assets/javascripts/bootstrap/tooltip.js @@ -281,7 +281,7 @@ $tip.removeClass('fade in top bottom left right') } - Tooltip.prototype.hide = function () { + Tooltip.prototype.hide = function (callback) { var that = this var $tip = this.tip() var e = $.Event('hide.bs.' + this.type) @@ -291,6 +291,7 @@ that.$element .removeAttr('aria-describedby') .trigger('hidden.bs.' + that.type) + callback && callback() } this.$element.trigger(e) @@ -329,6 +330,10 @@ var isSvg = window.SVGElement && el instanceof window.SVGElement var elRect = el.getBoundingClientRect() + if (elRect.width == null) { + // width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093 + elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top }) + } var elOffset = isBody ? { top: 0, left: 0 } : $element.offset() var scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() } var outerDims = isSvg ? {} : { @@ -434,8 +439,11 @@ } Tooltip.prototype.destroy = function () { + var that = this clearTimeout(this.timeout) - this.hide().$element.off('.' + this.type).removeData('bs.' + this.type) + this.hide(function () { + that.$element.off('.' + that.type).removeData('bs.' + that.type) + }) } |