From 08b8571cb842e9fc668d9faf6c305a51523b27fb Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Wed, 5 Sep 2012 10:00:57 -0700 Subject: version bump to get this started --- docs/assets/js/bootstrap.js | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'docs/assets/js/bootstrap.js') diff --git a/docs/assets/js/bootstrap.js b/docs/assets/js/bootstrap.js index f73fcb8e7..4baf3759c 100644 --- a/docs/assets/js/bootstrap.js +++ b/docs/assets/js/bootstrap.js @@ -1,5 +1,5 @@ /* =================================================== - * bootstrap-transition.js v2.1.1 + * bootstrap-transition.js v2.1.2 * http://twitter.github.com/bootstrap/javascript.html#transitions * =================================================== * Copyright 2012 Twitter, Inc. @@ -58,7 +58,7 @@ }) }(window.jQuery);/* ========================================================== - * bootstrap-alert.js v2.1.1 + * bootstrap-alert.js v2.1.2 * http://twitter.github.com/bootstrap/javascript.html#alerts * ========================================================== * Copyright 2012 Twitter, Inc. @@ -147,7 +147,7 @@ }) }(window.jQuery);/* ============================================================ - * bootstrap-button.js v2.1.1 + * bootstrap-button.js v2.1.2 * http://twitter.github.com/bootstrap/javascript.html#buttons * ============================================================ * Copyright 2012 Twitter, Inc. @@ -242,7 +242,7 @@ }) }(window.jQuery);/* ========================================================== - * bootstrap-carousel.js v2.1.1 + * bootstrap-carousel.js v2.1.2 * http://twitter.github.com/bootstrap/javascript.html#carousel * ========================================================== * Copyright 2012 Twitter, Inc. @@ -417,7 +417,7 @@ }) }(window.jQuery);/* ============================================================= - * bootstrap-collapse.js v2.1.1 + * bootstrap-collapse.js v2.1.2 * http://twitter.github.com/bootstrap/javascript.html#collapse * ============================================================= * Copyright 2012 Twitter, Inc. @@ -574,7 +574,7 @@ }) }(window.jQuery);/* ============================================================ - * bootstrap-dropdown.js v2.1.1 + * bootstrap-dropdown.js v2.1.2 * http://twitter.github.com/bootstrap/javascript.html#dropdowns * ============================================================ * Copyright 2012 Twitter, Inc. @@ -723,7 +723,7 @@ }) }(window.jQuery);/* ========================================================= - * bootstrap-modal.js v2.1.1 + * bootstrap-modal.js v2.1.2 * http://twitter.github.com/bootstrap/javascript.html#modals * ========================================================= * Copyright 2012 Twitter, Inc. @@ -961,7 +961,7 @@ }) }(window.jQuery);/* =========================================================== - * bootstrap-tooltip.js v2.1.1 + * bootstrap-tooltip.js v2.1.2 * http://twitter.github.com/bootstrap/javascript.html#tooltips * Inspired by the original jQuery.tipsy by Jason Frame * =========================================================== @@ -1236,7 +1236,7 @@ }(window.jQuery); /* =========================================================== - * bootstrap-popover.js v2.1.1 + * bootstrap-popover.js v2.1.2 * http://twitter.github.com/bootstrap/javascript.html#popovers * =========================================================== * Copyright 2012 Twitter, Inc. @@ -1338,7 +1338,7 @@ }) }(window.jQuery);/* ============================================================= - * bootstrap-scrollspy.js v2.1.1 + * bootstrap-scrollspy.js v2.1.2 * http://twitter.github.com/bootstrap/javascript.html#scrollspy * ============================================================= * Copyright 2012 Twitter, Inc. @@ -1488,7 +1488,7 @@ }) }(window.jQuery);/* ======================================================== - * bootstrap-tab.js v2.1.1 + * bootstrap-tab.js v2.1.2 * http://twitter.github.com/bootstrap/javascript.html#tabs * ======================================================== * Copyright 2012 Twitter, Inc. @@ -1622,7 +1622,7 @@ }) }(window.jQuery);/* ============================================================= - * bootstrap-typeahead.js v2.1.1 + * bootstrap-typeahead.js v2.1.2 * http://twitter.github.com/bootstrap/javascript.html#typeahead * ============================================================= * Copyright 2012 Twitter, Inc. @@ -1922,7 +1922,7 @@ }(window.jQuery); /* ========================================================== - * bootstrap-affix.js v2.1.1 + * bootstrap-affix.js v2.1.2 * http://twitter.github.com/bootstrap/javascript.html#affix * ========================================================== * Copyright 2012 Twitter, Inc. -- cgit v1.2.3 From fe38d12f122cc0a9e3435ffa0d7de58b6fa941f4 Mon Sep 17 00:00:00 2001 From: Jacob Thornton Date: Thu, 20 Sep 2012 16:26:00 -0700 Subject: rebuild - fix missing ( --- docs/assets/js/bootstrap.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'docs/assets/js/bootstrap.js') diff --git a/docs/assets/js/bootstrap.js b/docs/assets/js/bootstrap.js index 4baf3759c..b6497686d 100644 --- a/docs/assets/js/bootstrap.js +++ b/docs/assets/js/bootstrap.js @@ -1797,7 +1797,7 @@ .on('keypress', $.proxy(this.keypress, this)) .on('keyup', $.proxy(this.keyup, this)) - if ($.browser.chrome || $.browser.webkit || $.browser.msie) { + if (this.eventSupported('keydown')) { this.$element.on('keydown', $.proxy(this.keydown, this)) } @@ -1806,6 +1806,15 @@ .on('mouseenter', 'li', $.proxy(this.mouseenter, this)) } + , eventSupported: function(eventName) { + var isSupported = eventName in this.$element + if (!isSupported) { + this.$element.setAttribute(eventName, 'return;') + isSupported = typeof this.$element[eventName] === 'function' + } + return isSupported + } + , move: function (e) { if (!this.shown) return -- cgit v1.2.3 From ebf94c53a5497ff6d2aa353027d3a2ac3b67b18a Mon Sep 17 00:00:00 2001 From: Jacob Thornton Date: Thu, 20 Sep 2012 16:50:36 -0700 Subject: =?UTF-8?q?change=20transition.js,=20rebuild=E2=80=A6=20travis=20m?= =?UTF-8?q?aybe=20will=20be=20happy=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/assets/js/bootstrap.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'docs/assets/js/bootstrap.js') diff --git a/docs/assets/js/bootstrap.js b/docs/assets/js/bootstrap.js index b6497686d..5a5022be1 100644 --- a/docs/assets/js/bootstrap.js +++ b/docs/assets/js/bootstrap.js @@ -20,13 +20,13 @@ !function ($) { - $(function () { + "use strict"; // jshint ;_; - "use strict"; // jshint ;_; + /* CSS TRANSITION SUPPORT (http://www.modernizr.com/) + * ======================================================= */ - /* CSS TRANSITION SUPPORT (http://www.modernizr.com/) - * ======================================================= */ + $(function () { $.support.transition = (function () { -- cgit v1.2.3 From 003fcccceb869ac0420d542bac9860f5f32e68a1 Mon Sep 17 00:00:00 2001 From: Jacob Thornton Date: Mon, 24 Sep 2012 23:15:36 -0700 Subject: change tooltip/popover html default to false for xss safety net --- 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 5a5022be1..6b23a0206 100644 --- a/docs/assets/js/bootstrap.js +++ b/docs/assets/js/bootstrap.js @@ -1231,7 +1231,7 @@ , trigger: 'hover' , title: '' , delay: 0 - , html: true + , html: false } }(window.jQuery); -- cgit v1.2.3 From 88b1e44dd61afd8f08761346555521bd216ed73a Mon Sep 17 00:00:00 2001 From: Jacob Thornton Date: Mon, 24 Sep 2012 23:28:38 -0700 Subject: change tooltip/popover insert strategy remove modal-open class hopefully resolve z-index headaches --- docs/assets/js/bootstrap.js | 11 +++-------- 1 file changed, 3 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 6b23a0206..bfe68ba92 100644 --- a/docs/assets/js/bootstrap.js +++ b/docs/assets/js/bootstrap.js @@ -773,8 +773,6 @@ if (this.isShown || e.isDefaultPrevented()) return - $('body').addClass('modal-open') - this.isShown = true this.escape() @@ -820,8 +818,6 @@ this.isShown = false - $('body').removeClass('modal-open') - this.escape() $(document).off('focusin.modal') @@ -1083,7 +1079,7 @@ $tip .remove() .css({ top: 0, left: 0, display: 'block' }) - .appendTo(inside ? this.$element : document.body) + .insertAfter(this.$element) pos = this.getPosition(inside) @@ -1106,7 +1102,7 @@ } $tip - .css(tp) + .offset(tp) .addClass(placement) .addClass('in') } @@ -1234,8 +1230,7 @@ , html: false } -}(window.jQuery); -/* =========================================================== +}(window.jQuery);/* =========================================================== * bootstrap-popover.js v2.1.2 * http://twitter.github.com/bootstrap/javascript.html#popovers * =========================================================== -- cgit v1.2.3 From 0540b63ab0a2f9359fbd34967fbb74402534573f Mon Sep 17 00:00:00 2001 From: Jacob Thornton Date: Mon, 24 Sep 2012 23:59:02 -0700 Subject: check affix pos on clicks - use timeout for clicks which scroll --- docs/assets/js/bootstrap.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'docs/assets/js/bootstrap.js') diff --git a/docs/assets/js/bootstrap.js b/docs/assets/js/bootstrap.js index bfe68ba92..d1672330c 100644 --- a/docs/assets/js/bootstrap.js +++ b/docs/assets/js/bootstrap.js @@ -1955,7 +1955,9 @@ var Affix = function (element, options) { this.options = $.extend({}, $.fn.affix.defaults, options) - this.$window = $(window).on('scroll.affix.data-api', $.proxy(this.checkPosition, this)) + this.$window = $(window) + .on('scroll.affix.data-api', $.proxy(this.checkPosition, this)) + .on('click.affix.data-api', $.proxy(function () { setTimeout($.proxy(this.checkPosition, this), 1) }, this)) this.$element = $(element) this.checkPosition() } -- cgit v1.2.3 From e9a648cd39dc6b5e0f126b7272adeac816ece758 Mon Sep 17 00:00:00 2001 From: Erlend Halvorsen Date: Thu, 27 Sep 2012 10:31:40 +0200 Subject: Fixed bug in dropdown toggle where menu would only clear on the first drop down --- docs/assets/js/bootstrap.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'docs/assets/js/bootstrap.js') diff --git a/docs/assets/js/bootstrap.js b/docs/assets/js/bootstrap.js index d1672330c..b539cd499 100644 --- a/docs/assets/js/bootstrap.js +++ b/docs/assets/js/bootstrap.js @@ -674,9 +674,10 @@ } - function clearMenus() { - getParent($(toggle)) - .removeClass('open') + function clearMenus() { + $(toggle).each(function () { + getParent($(this)).removeClass("open") + }) } function getParent($this) { -- cgit v1.2.3 From e24b46b7f3fb9eab5f34fb6e199d24781204c745 Mon Sep 17 00:00:00 2001 From: mfansler Date: Tue, 16 Oct 2012 12:27:43 -0400 Subject: fixes #5336: reorder focus() call to avoid scrolling --- docs/assets/js/bootstrap.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'docs/assets/js/bootstrap.js') diff --git a/docs/assets/js/bootstrap.js b/docs/assets/js/bootstrap.js index d1672330c..e96798039 100644 --- a/docs/assets/js/bootstrap.js +++ b/docs/assets/js/bootstrap.js @@ -794,13 +794,12 @@ that.$element .addClass('in') .attr('aria-hidden', false) - .focus() that.enforceFocus() transition ? - that.$element.one($.support.transition.end, function () { that.$element.trigger('shown') }) : - that.$element.trigger('shown') + that.$element.one($.support.transition.end, function () { that.$element.focus().trigger('shown') }) : + that.$element.focus().trigger('shown') }) } @@ -956,7 +955,8 @@ }) }) -}(window.jQuery);/* =========================================================== +}(window.jQuery); +/* =========================================================== * bootstrap-tooltip.js v2.1.2 * http://twitter.github.com/bootstrap/javascript.html#tooltips * Inspired by the original jQuery.tipsy by Jason Frame -- cgit v1.2.3 From edc3eee5eaae52384de1486639585c0b41318cf8 Mon Sep 17 00:00:00 2001 From: Jacob Thornton Date: Wed, 17 Oct 2012 22:26:44 -0700 Subject: fix carousel event --- docs/assets/js/bootstrap.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'docs/assets/js/bootstrap.js') diff --git a/docs/assets/js/bootstrap.js b/docs/assets/js/bootstrap.js index e96798039..1b2521a96 100644 --- a/docs/assets/js/bootstrap.js +++ b/docs/assets/js/bootstrap.js @@ -337,9 +337,7 @@ , direction = type == 'next' ? 'left' : 'right' , fallback = type == 'next' ? 'first' : 'last' , that = this - , e = $.Event('slide', { - relatedTarget: $next[0] - }) + , e this.sliding = true @@ -347,6 +345,10 @@ $next = $next.length ? $next : this.$element.find('.item')[fallback]() + e = $.Event('slide', { + relatedTarget: $next[0] + }) + if ($next.hasClass('active')) return if ($.support.transition && this.$element.hasClass('slide')) { @@ -410,7 +412,7 @@ $('body').on('click.carousel.data-api', '[data-slide]', function ( e ) { var $this = $(this), href , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7 - , options = !$target.data('modal') && $.extend({}, $target.data(), $this.data()) + , options = !$target.data('carousel') && $.extend({}, $target.data(), $this.data()) $target.carousel(options) e.preventDefault() }) @@ -1193,8 +1195,9 @@ this.enabled = !this.enabled } - , toggle: function () { - this[this.tip().hasClass('in') ? 'hide' : 'show']() + , toggle: function (e) { + var self = $(e.currentTarget)[this.type](this._options).data(this.type) + self[self.tip().hasClass('in') ? 'hide' : 'show']() } , destroy: function () { -- cgit v1.2.3 From 280d4aeb30aa6b29ec74bd801ad1be3fc05e01f4 Mon Sep 17 00:00:00 2001 From: Jacob Thornton Date: Wed, 17 Oct 2012 22:51:39 -0700 Subject: rebuild --- docs/assets/js/bootstrap.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'docs/assets/js/bootstrap.js') diff --git a/docs/assets/js/bootstrap.js b/docs/assets/js/bootstrap.js index 1b2521a96..3aaaa6877 100644 --- a/docs/assets/js/bootstrap.js +++ b/docs/assets/js/bootstrap.js @@ -1079,7 +1079,7 @@ inside = /in/.test(placement) $tip - .remove() + .detach() .css({ top: 0, left: 0, display: 'block' }) .insertAfter(this.$element) @@ -1126,18 +1126,18 @@ function removeWithAnimation() { var timeout = setTimeout(function () { - $tip.off($.support.transition.end).remove() + $tip.off($.support.transition.end).detach() }, 500) $tip.one($.support.transition.end, function () { clearTimeout(timeout) - $tip.remove() + $tip.detach() }) } $.support.transition && this.$tip.hasClass('fade') ? removeWithAnimation() : - $tip.remove() + $tip.detach() return this } @@ -1536,7 +1536,7 @@ if ( $this.parent('li').hasClass('active') ) return - previous = $ul.find('.active a').last()[0] + previous = $ul.find('.active:last a')[0] e = $.Event('show', { relatedTarget: previous -- cgit v1.2.3 From 45046544a671b5bb27f1631c9a1bef453b3ca325 Mon Sep 17 00:00:00 2001 From: Jacob Thornton Date: Wed, 17 Oct 2012 23:36:22 -0700 Subject: when static, refocus on click --- docs/assets/js/bootstrap.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'docs/assets/js/bootstrap.js') diff --git a/docs/assets/js/bootstrap.js b/docs/assets/js/bootstrap.js index be50d9f47..cbad9b939 100644 --- a/docs/assets/js/bootstrap.js +++ b/docs/assets/js/bootstrap.js @@ -878,9 +878,11 @@ this.$backdrop = $('