Skip to content

Commit

Permalink
Merge branch 'release/2.20.0'
Browse files Browse the repository at this point in the history
* release/2.20.0:
  Fix version
  * bootstrap 3.3.5 * Test against Rails 4.2.2 and 4.1.11
  • Loading branch information
tagliala committed Jun 17, 2015
2 parents 0535f34 + 8d43b15 commit e3b75e8
Show file tree
Hide file tree
Showing 50 changed files with 351 additions and 183 deletions.
6 changes: 3 additions & 3 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
appraise 'rails-3.2' do
gem 'rails', '3.2.21'
gem 'rails', '3.2.22'
gem 'minitest', '~> 4.7'
end

Expand All @@ -8,9 +8,9 @@ appraise 'rails-4.0' do
end

appraise 'rails-4.1' do
gem 'rails', '4.1.10'
gem 'rails', '4.1.11'
end

appraise 'rails-4.2' do
gem 'rails', '4.2.1'
gem 'rails', '4.2.2'
end
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 2.20.0

* bootstrap 3.3.5
* Test against Rails 3.22, 4.1.11 and 4.2.2

## 2.19.0

* bootstrap 3.3.4
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/rails_3.2.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

source "https://rubygems.org"

gem "rails", "3.2.21"
gem "rails", "3.2.22"
gem "minitest", "~> 4.7"

gemspec :path => "../"
2 changes: 1 addition & 1 deletion gemfiles/rails_4.1.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

source "https://rubygems.org"

gem "rails", "4.1.10"
gem "rails", "4.1.11"

gemspec :path => "../"
2 changes: 1 addition & 1 deletion gemfiles/rails_4.2.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

source "https://rubygems.org"

gem "rails", "4.2.1"
gem "rails", "4.2.2"

gemspec :path => "../"
2 changes: 1 addition & 1 deletion lib/twbs_less_rails/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module TwbsLessRails
VERSION = "2.19.0"
VERSION = "2.20.0"
end
2 changes: 1 addition & 1 deletion src/twbs/bootstrap
Submodule bootstrap updated 165 files
6 changes: 3 additions & 3 deletions vendor/assets/javascripts/twbs/bootstrap/affix.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* ========================================================================
* Bootstrap: affix.js v3.3.4
* Bootstrap: affix.js v3.3.5
* http://getbootstrap.com/javascript/#affix
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
Expand Down Expand Up @@ -28,7 +28,7 @@
this.checkPosition()
}

Affix.VERSION = '3.3.4'
Affix.VERSION = '3.3.5'

Affix.RESET = 'affix affix-top affix-bottom'

Expand Down Expand Up @@ -78,7 +78,7 @@
var offset = this.options.offset
var offsetTop = offset.top
var offsetBottom = offset.bottom
var scrollHeight = $(document.body).height()
var scrollHeight = Math.max($(document).height(), $(document.body).height())

if (typeof offset != 'object') offsetBottom = offsetTop = offset
if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element)
Expand Down
4 changes: 2 additions & 2 deletions vendor/assets/javascripts/twbs/bootstrap/alert.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* ========================================================================
* Bootstrap: alert.js v3.3.4
* Bootstrap: alert.js v3.3.5
* http://getbootstrap.com/javascript/#alerts
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
Expand All @@ -18,7 +18,7 @@
$(el).on('click', dismiss, this.close)
}

Alert.VERSION = '3.3.4'
Alert.VERSION = '3.3.5'

Alert.TRANSITION_DURATION = 150

Expand Down
22 changes: 13 additions & 9 deletions vendor/assets/javascripts/twbs/bootstrap/button.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* ========================================================================
* Bootstrap: button.js v3.3.4
* Bootstrap: button.js v3.3.5
* http://getbootstrap.com/javascript/#buttons
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
Expand All @@ -19,7 +19,7 @@
this.isLoading = false
}

Button.VERSION = '3.3.4'
Button.VERSION = '3.3.5'

Button.DEFAULTS = {
loadingText: 'loading...'
Expand All @@ -31,7 +31,7 @@
var val = $el.is('input') ? 'val' : 'html'
var data = $el.data()

state = state + 'Text'
state += 'Text'

if (data.resetText == null) $el.data('resetText', $el[val]())

Expand All @@ -56,15 +56,19 @@
if ($parent.length) {
var $input = this.$element.find('input')
if ($input.prop('type') == 'radio') {
if ($input.prop('checked') && this.$element.hasClass('active')) changed = false
else $parent.find('.active').removeClass('active')
if ($input.prop('checked')) changed = false
$parent.find('.active').removeClass('active')
this.$element.addClass('active')
} else if ($input.prop('type') == 'checkbox') {
if (($input.prop('checked')) !== this.$element.hasClass('active')) changed = false
this.$element.toggleClass('active')
}
if (changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change')
$input.prop('checked', this.$element.hasClass('active'))
if (changed) $input.trigger('change')
} else {
this.$element.attr('aria-pressed', !this.$element.hasClass('active'))
this.$element.toggleClass('active')
}

if (changed) this.$element.toggleClass('active')
}


Expand Down Expand Up @@ -107,7 +111,7 @@
var $btn = $(e.target)
if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
Plugin.call($btn, 'toggle')
e.preventDefault()
if (!($(e.target).is('input[type="radio"]') || $(e.target).is('input[type="checkbox"]'))) e.preventDefault()
})
.on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {
$(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))
Expand Down
4 changes: 2 additions & 2 deletions vendor/assets/javascripts/twbs/bootstrap/carousel.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* ========================================================================
* Bootstrap: carousel.js v3.3.4
* Bootstrap: carousel.js v3.3.5
* http://getbootstrap.com/javascript/#carousel
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
Expand Down Expand Up @@ -30,7 +30,7 @@
.on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
}

Carousel.VERSION = '3.3.4'
Carousel.VERSION = '3.3.5'

Carousel.TRANSITION_DURATION = 600

Expand Down
4 changes: 2 additions & 2 deletions vendor/assets/javascripts/twbs/bootstrap/collapse.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* ========================================================================
* Bootstrap: collapse.js v3.3.4
* Bootstrap: collapse.js v3.3.5
* http://getbootstrap.com/javascript/#collapse
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
Expand Down Expand Up @@ -29,7 +29,7 @@
if (this.options.toggle) this.toggle()
}

Collapse.VERSION = '3.3.4'
Collapse.VERSION = '3.3.5'

Collapse.TRANSITION_DURATION = 350

Expand Down
88 changes: 46 additions & 42 deletions vendor/assets/javascripts/twbs/bootstrap/dropdown.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* ========================================================================
* Bootstrap: dropdown.js v3.3.4
* Bootstrap: dropdown.js v3.3.5
* http://getbootstrap.com/javascript/#dropdowns
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
Expand All @@ -19,7 +19,41 @@
$(element).on('click.bs.dropdown', this.toggle)
}

Dropdown.VERSION = '3.3.4'
Dropdown.VERSION = '3.3.5'

function getParent($this) {
var selector = $this.attr('data-target')

if (!selector) {
selector = $this.attr('href')
selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
}

var $parent = selector && $(selector)

return $parent && $parent.length ? $parent : $this.parent()
}

function clearMenus(e) {
if (e && e.which === 3) return
$(backdrop).remove()
$(toggle).each(function () {
var $this = $(this)
var $parent = getParent($this)
var relatedTarget = { relatedTarget: this }

if (!$parent.hasClass('open')) return

if (e && e.type == 'click' && /input|textarea/i.test(e.target.tagName) && $.contains($parent[0], e.target)) return

$parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))

if (e.isDefaultPrevented()) return

$this.attr('aria-expanded', 'false')
$parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget)
})
}

Dropdown.prototype.toggle = function (e) {
var $this = $(this)
Expand All @@ -34,7 +68,10 @@
if (!isActive) {
if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {
// if mobile we use a backdrop because click events don't delegate
$('<div class="dropdown-backdrop"/>').insertAfter($(this)).on('click', clearMenus)
$(document.createElement('div'))
.addClass('dropdown-backdrop')
.insertAfter($(this))
.on('click', clearMenus)
}

var relatedTarget = { relatedTarget: this }
Expand Down Expand Up @@ -67,57 +104,25 @@
var $parent = getParent($this)
var isActive = $parent.hasClass('open')

if ((!isActive && e.which != 27) || (isActive && e.which == 27)) {
if (!isActive && e.which != 27 || isActive && e.which == 27) {
if (e.which == 27) $parent.find(toggle).trigger('focus')
return $this.trigger('click')
}

var desc = ' li:not(.disabled):visible a'
var $items = $parent.find('[role="menu"]' + desc + ', [role="listbox"]' + desc)
var $items = $parent.find('.dropdown-menu' + desc)

if (!$items.length) return

var index = $items.index(e.target)

if (e.which == 38 && index > 0) index-- // up
if (e.which == 40 && index < $items.length - 1) index++ // down
if (!~index) index = 0
if (e.which == 38 && index > 0) index-- // up
if (e.which == 40 && index < $items.length - 1) index++ // down
if (!~index) index = 0

$items.eq(index).trigger('focus')
}

function clearMenus(e) {
if (e && e.which === 3) return
$(backdrop).remove()
$(toggle).each(function () {
var $this = $(this)
var $parent = getParent($this)
var relatedTarget = { relatedTarget: this }

if (!$parent.hasClass('open')) return

$parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))

if (e.isDefaultPrevented()) return

$this.attr('aria-expanded', 'false')
$parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget)
})
}

function getParent($this) {
var selector = $this.attr('data-target')

if (!selector) {
selector = $this.attr('href')
selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
}

var $parent = selector && $(selector)

return $parent && $parent.length ? $parent : $this.parent()
}


// DROPDOWN PLUGIN DEFINITION
// ==========================
Expand Down Expand Up @@ -155,7 +160,6 @@
.on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
.on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)
.on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown)
.on('keydown.bs.dropdown.data-api', '[role="menu"]', Dropdown.prototype.keydown)
.on('keydown.bs.dropdown.data-api', '[role="listbox"]', Dropdown.prototype.keydown)
.on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown)

}(jQuery);
12 changes: 5 additions & 7 deletions vendor/assets/javascripts/twbs/bootstrap/modal.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* ========================================================================
* Bootstrap: modal.js v3.3.4
* Bootstrap: modal.js v3.3.5
* http://getbootstrap.com/javascript/#modals
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
Expand Down Expand Up @@ -33,7 +33,7 @@
}
}

Modal.VERSION = '3.3.4'
Modal.VERSION = '3.3.5'

Modal.TRANSITION_DURATION = 300
Modal.BACKDROP_TRANSITION_DURATION = 150
Expand Down Expand Up @@ -90,9 +90,7 @@
that.$element[0].offsetWidth // force reflow
}

that.$element
.addClass('in')
.attr('aria-hidden', false)
that.$element.addClass('in')

that.enforceFocus()

Expand Down Expand Up @@ -126,7 +124,6 @@

this.$element
.removeClass('in')
.attr('aria-hidden', true)
.off('click.dismiss.bs.modal')
.off('mouseup.dismiss.bs.modal')

Expand Down Expand Up @@ -190,7 +187,8 @@
if (this.isShown && this.options.backdrop) {
var doAnimate = $.support.transition && animate

this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
this.$backdrop = $(document.createElement('div'))
.addClass('modal-backdrop ' + animate)
.appendTo(this.$body)

this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {
Expand Down
4 changes: 2 additions & 2 deletions vendor/assets/javascripts/twbs/bootstrap/popover.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* ========================================================================
* Bootstrap: popover.js v3.3.4
* Bootstrap: popover.js v3.3.5
* http://getbootstrap.com/javascript/#popovers
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
Expand All @@ -19,7 +19,7 @@

if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')

Popover.VERSION = '3.3.4'
Popover.VERSION = '3.3.5'

Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
placement: 'right',
Expand Down
Loading

0 comments on commit e3b75e8

Please sign in to comment.