Update to Bootstrap 3.0.3

This commit is contained in:
Foxaii
2013-12-05 19:27:34 +00:00
parent 9fca562a61
commit aa59cede7f
56 changed files with 284 additions and 344 deletions

16
assets/js/plugins/bootstrap/button.js Executable file → Normal file
View File

@@ -1,5 +1,5 @@
/* ========================================================================
* Bootstrap: button.js v3.0.2
* 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')
}