From 973e162ff570b9eb14c966f2960adbed7ce94a00 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Mon, 6 Jan 2014 22:34:09 +0100 Subject: [PATCH] Moved to bootstrap 3.0.3. --- .../javascripts/app/lib/bootstrap/button.js | 20 +- .../javascripts/app/lib/bootstrap/collapse.js | 8 +- .../javascripts/app/lib/bootstrap/dropdown.js | 16 +- .../javascripts/app/lib/bootstrap/modal.js | 8 +- .../javascripts/app/lib/bootstrap/popover.js | 8 +- .../javascripts/app/lib/bootstrap/tab.js | 10 +- .../javascripts/app/lib/bootstrap/tooltip.js | 8 +- .../app/lib/bootstrap/transition.js | 6 +- app/assets/stylesheets/bootstrap.css | 855 ++++++++++-------- 9 files changed, 502 insertions(+), 437 deletions(-) diff --git a/app/assets/javascripts/app/lib/bootstrap/button.js b/app/assets/javascripts/app/lib/bootstrap/button.js index fc73b555f..c9fdde5e4 100644 --- a/app/assets/javascripts/app/lib/bootstrap/button.js +++ b/app/assets/javascripts/app/lib/bootstrap/button.js @@ -1,6 +1,6 @@ /* ======================================================================== - * Bootstrap: button.js v3.0.0 - * http://twbs.github.com/bootstrap/javascript.html#buttons + * Bootstrap: button.js v3.0.3 + * http://getbootstrap.com/javascript/#buttons * ======================================================================== * Copyright 2013 Twitter, Inc. * @@ -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') } @@ -106,4 +112,4 @@ e.preventDefault() }) -}(window.jQuery); +}(jQuery); diff --git a/app/assets/javascripts/app/lib/bootstrap/collapse.js b/app/assets/javascripts/app/lib/bootstrap/collapse.js index 92cc0bc76..1a079938e 100644 --- a/app/assets/javascripts/app/lib/bootstrap/collapse.js +++ b/app/assets/javascripts/app/lib/bootstrap/collapse.js @@ -1,8 +1,8 @@ /* ======================================================================== - * Bootstrap: collapse.js v3.0.0 - * http://twbs.github.com/bootstrap/javascript.html#collapse + * Bootstrap: collapse.js v3.0.3 + * http://getbootstrap.com/javascript/#collapse * ======================================================================== - * Copyright 2012 Twitter, Inc. + * Copyright 2013 Twitter, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -176,4 +176,4 @@ $target.collapse(option) }) -}(window.jQuery); +}(jQuery); diff --git a/app/assets/javascripts/app/lib/bootstrap/dropdown.js b/app/assets/javascripts/app/lib/bootstrap/dropdown.js index 6093f11a8..13352ef7c 100644 --- a/app/assets/javascripts/app/lib/bootstrap/dropdown.js +++ b/app/assets/javascripts/app/lib/bootstrap/dropdown.js @@ -1,8 +1,8 @@ /* ======================================================================== - * Bootstrap: dropdown.js v3.0.0 - * http://twbs.github.com/bootstrap/javascript.html#dropdowns + * Bootstrap: dropdown.js v3.0.3 + * http://getbootstrap.com/javascript/#dropdowns * ======================================================================== - * Copyright 2012 Twitter, Inc. + * Copyright 2013 Twitter, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ var backdrop = '.dropdown-backdrop' var toggle = '[data-toggle=dropdown]' var Dropdown = function (element) { - var $el = $(element).on('click.bs.dropdown', this.toggle) + $(element).on('click.bs.dropdown', this.toggle) } Dropdown.prototype.toggle = function (e) { @@ -41,7 +41,7 @@ if (!isActive) { if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) { - // if mobile we we use a backdrop because click events don't delegate + // if mobile we use a backdrop because click events don't delegate $('