From f140084f2beb17b0a266b42ab9a03d0b935e5f66 Mon Sep 17 00:00:00 2001 From: Josh Dague Date: Thu, 22 Aug 2013 14:50:15 -0400 Subject: Don't explicitly reference global jQuery Removes `window.jQuery` in favor of `jQuery`, fixes #10038 --- js/button.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/button.js') diff --git a/js/button.js b/js/button.js index fc73b555f..68c211b57 100644 --- a/js/button.js +++ b/js/button.js @@ -106,4 +106,4 @@ e.preventDefault() }) -}(window.jQuery); +}(jQuery); -- cgit v1.2.3 From 4e0d022de5b0d27b063156533dfcc248fc08257e Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Fri, 1 Nov 2013 17:15:34 -0700 Subject: update version numbers in JS file comment headers to v3.0.1 & regrunt --- js/button.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/button.js') diff --git a/js/button.js b/js/button.js index 44c101a2a..8a518cb0e 100644 --- a/js/button.js +++ b/js/button.js @@ -1,5 +1,5 @@ /* ======================================================================== - * Bootstrap: button.js v3.0.0 + * Bootstrap: button.js v3.0.1 * http://getbootstrap.com/javascript/#buttons * ======================================================================== * Copyright 2013 Twitter, Inc. -- cgit v1.2.3 From 6a4230556532d3d947a84aa0d07f57e40a68a9ff Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Wed, 6 Nov 2013 12:57:28 -0800 Subject: bump versions to v3.0.2 --- js/button.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/button.js') diff --git a/js/button.js b/js/button.js index b4f8f3077..0145689dd 100644 --- a/js/button.js +++ b/js/button.js @@ -1,5 +1,5 @@ /* ======================================================================== - * Bootstrap: button.js v3.0.1 + * Bootstrap: button.js v3.0.2 * http://getbootstrap.com/javascript/#buttons * ======================================================================== * Copyright 2013 Twitter, Inc. -- cgit v1.2.3 From 5d6e9212a642430719702ead322103e19c6aa782 Mon Sep 17 00:00:00 2001 From: Brian Leonard Date: Sun, 1 Sep 2013 22:23:31 -0700 Subject: Don't deselect radio buttons in data-toggle; fixes #9920 Merges #10787 --- js/button.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'js/button.js') diff --git a/js/button.js b/js/button.js index 0145689dd..3c1613506 100644 --- a/js/button.js +++ b/js/button.js @@ -54,15 +54,21 @@ Button.prototype.toggle = function () { var $parent = this.$element.closest('[data-toggle="buttons"]') + var changed = true if ($parent.length) { var $input = this.$element.find('input') - .prop('checked', !this.$element.hasClass('active')) - .trigger('change') - if ($input.prop('type') === 'radio') $parent.find('.active').removeClass('active') + if ($input.prop('type') === 'radio') { + // see if clicking on current one + if ($input.prop('checked') && this.$element.hasClass('active')) + changed = false + else + $parent.find('.active').removeClass('active') + } + if (changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change') } - this.$element.toggleClass('active') + if (changed) this.$element.toggleClass('active') } -- cgit v1.2.3