From 9257bdc0974beef0a2218c76851dc37f3cf9313a Mon Sep 17 00:00:00 2001 From: fat Date: Mon, 27 May 2013 12:45:13 -0700 Subject: fixes #7163 --- docs/assets/js/bootstrap.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'docs/assets/js/bootstrap.js') diff --git a/docs/assets/js/bootstrap.js b/docs/assets/js/bootstrap.js index b7082dc21..69b9b94ab 100644 --- a/docs/assets/js/bootstrap.js +++ b/docs/assets/js/bootstrap.js @@ -434,7 +434,7 @@ // ================= $(document).on('click.bs.carousel.data-api', '[data-slide], [data-slide-to]', function (e) { - var $this = $(this), href + var $this = $(this), href var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7 var options = $.extend({}, $target.data(), $this.data()) var slideIndex @@ -448,6 +448,13 @@ e.preventDefault() }) + $(window).on('load', function () { + $('[data-ride="carousel"]').each(function () { + var $carousel = $(this) + $carousel.carousel($carousel.data()) + }) + }) + }(window.jQuery); /* ======================================================================== * Bootstrap: collapse.js v3.0.0 @@ -1317,7 +1324,7 @@ Tooltip.prototype.toggle = function (e) { var self = e ? $(e.currentTarget)[this.type](this._options).data('bs.' + this.type) : this - self.tip().hasClass('in') ? self.hide() : self.show() + self.tip().hasClass('in') ? self.leave(e) : self.enter(e) } Tooltip.prototype.destroy = function () { -- cgit v1.2.3 From a7a87c8e8c3343f6d9dea868d578178de8907f98 Mon Sep 17 00:00:00 2001 From: fat Date: Mon, 27 May 2013 12:48:16 -0700 Subject: rebuild --- docs/assets/js/bootstrap.js | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'docs/assets/js/bootstrap.js') diff --git a/docs/assets/js/bootstrap.js b/docs/assets/js/bootstrap.js index 69b9b94ab..4ec229c8a 100644 --- a/docs/assets/js/bootstrap.js +++ b/docs/assets/js/bootstrap.js @@ -1100,7 +1100,7 @@ return options } - Tooltip.prototype.enter = function (e) { + Tooltip.prototype.enter = function (obj) { var defaults = this.getDefaults() var options = {} @@ -1108,26 +1108,29 @@ if (defaults[key] != value) options[key] = value }) - var self = $(e.currentTarget)[this.type](options).data('bs.' + this.type) + var self = obj instanceof this.constructor ? + obj : $(obj.currentTarget)[this.type](options).data('bs.' + this.type) if (!self.options.delay || !self.options.delay.show) return self.show() clearTimeout(this.timeout) self.hoverState = 'in' - this.timeout = setTimeout(function() { + this.timeout = setTimeout(function () { if (self.hoverState == 'in') self.show() }, self.options.delay.show) } - Tooltip.prototype.leave = function (e) { - var self = $(e.currentTarget)[this.type](this._options).data('bs.' + this.type) + Tooltip.prototype.leave = function (obj) { + var self = obj instanceof this.constructor ? + obj : $(obj.currentTarget)[this.type](this._options).data('bs.' + this.type) + + clearTimeout(this.timeout) - if (this.timeout) clearTimeout(this.timeout) if (!self.options.delay || !self.options.delay.hide) return self.hide() self.hoverState = 'out' - this.timeout = setTimeout(function() { + this.timeout = setTimeout(function () { if (self.hoverState == 'out') self.hide() }, self.options.delay.hide) } @@ -1324,7 +1327,7 @@ Tooltip.prototype.toggle = function (e) { var self = e ? $(e.currentTarget)[this.type](this._options).data('bs.' + this.type) : this - self.tip().hasClass('in') ? self.leave(e) : self.enter(e) + self.tip().hasClass('in') ? self.leave(self) : self.enter(self) } Tooltip.prototype.destroy = function () { -- cgit v1.2.3 From f5ce66177bba1e5613a481d7d2a0e9bcfab077f0 Mon Sep 17 00:00:00 2001 From: fat Date: Wed, 29 May 2013 11:24:00 -0400 Subject: fix event binding in modal.js --- docs/assets/js/bootstrap.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'docs/assets/js/bootstrap.js') diff --git a/docs/assets/js/bootstrap.js b/docs/assets/js/bootstrap.js index 4ec229c8a..f86cd05f7 100644 --- a/docs/assets/js/bootstrap.js +++ b/docs/assets/js/bootstrap.js @@ -872,18 +872,18 @@ Modal.prototype.enforceFocus = function () { $(document) .off('focusin.bs.modal') // guard against infinite focus loop - .on('focusin.bs.modal', function (e) { - if (this.$element[0] !== e.target && !this.$element.has(e.target).length) { - this.$element.focus() - } - }, this) + .on('focusin.bs.modal', $.proxy(function (e) { + if (this.$element[0] !== e.target && !this.$element.has(e.target).length) { + this.$element.focus() + } + }, this)) } Modal.prototype.escape = function () { if (this.isShown && this.options.keyboard) { - this.$element.on('keyup.dismiss.bs.modal', function ( e ) { + this.$element.on('keyup.dismiss.bs.modal', $.proxy(function (e) { e.which == 27 && this.hide() - }, this) + }, this)) } else if (!this.isShown) { this.$element.off('keyup.dismiss.bs.modal') } -- cgit v1.2.3 From cc684750e5f1143443779ebec2c418c84cec64e7 Mon Sep 17 00:00:00 2001 From: Robert Burns Date: Sat, 1 Jun 2013 08:15:40 -0400 Subject: Fix for carousel indicators --- docs/assets/js/bootstrap.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/assets/js/bootstrap.js') diff --git a/docs/assets/js/bootstrap.js b/docs/assets/js/bootstrap.js index f86cd05f7..744b27676 100644 --- a/docs/assets/js/bootstrap.js +++ b/docs/assets/js/bootstrap.js @@ -442,7 +442,7 @@ $target.carousel(options) if (slideIndex = $this.attr('data-slide-to')) { - $target.data('bs-carousel').pause().to(slideIndex).cycle() + $target.data('bs.carousel').pause().to(slideIndex).cycle() } e.preventDefault() -- cgit v1.2.3