Skip to content

Commit

Permalink
Merge branch 'release/2.19.0'
Browse files Browse the repository at this point in the history
* release/2.19.0:
  * Test against Rails 4.2.1 and 4.1.10
  bootstrap 3.3.4 Update changelog Update version
  • Loading branch information
tagliala committed Mar 19, 2015
2 parents 1b2a562 + 82c7f3d commit 0535f34
Show file tree
Hide file tree
Showing 35 changed files with 173 additions and 132 deletions.
4 changes: 2 additions & 2 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ appraise 'rails-4.0' do
end

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

appraise 'rails-4.2' do
gem 'rails', '4.2.0'
gem 'rails', '4.2.1'
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.19.0

* bootstrap 3.3.4
* Test against Rails 4.2.1 and 4.1.10

## 2.18.0

* Font Awesome 4.3.0
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![Code Climate](https://codeclimate.com/github/diowa/twbs_less_rails/badges/gpa.svg)](https://codeclimate.com/github/diowa/twbs_less_rails)
[![Coverage Status](https://coveralls.io/repos/diowa/twbs_less_rails/badge.svg?branch=master)](https://coveralls.io/r/diowa/twbs_less_rails?branch=master)

An opinionated gem which brings [Bootstrap](http://getbootstrap.com/) and [Font Awesome](http://fontawesome.io) assets into your Rails application.
An opinionated gem which brings [Bootstrap](http://getbootstrap.com/), [Font Awesome](http://fontawesome.io) and [Respond.js](http://github.com/scottjehl/Respond) assets into your Rails application.



Expand Down
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.9"
gem "rails", "4.1.10"

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.0"
gem "rails", "4.2.1"

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.18.0"
VERSION = "2.19.0"
end
2 changes: 1 addition & 1 deletion src/twbs/bootstrap
Submodule bootstrap updated 161 files
10 changes: 5 additions & 5 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.2
* Bootstrap: affix.js v3.3.4
* http://getbootstrap.com/javascript/#affix
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
Expand All @@ -21,14 +21,14 @@
.on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this))

this.$element = $(element)
this.affixed =
this.unpin =
this.affixed = null
this.unpin = null
this.pinnedOffset = null

this.checkPosition()
}

Affix.VERSION = '3.3.2'
Affix.VERSION = '3.3.4'

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 = $('body').height()
var scrollHeight = $(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.2
* Bootstrap: alert.js v3.3.4
* 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.2'
Alert.VERSION = '3.3.4'

Alert.TRANSITION_DURATION = 150

Expand Down
4 changes: 2 additions & 2 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.2
* Bootstrap: button.js v3.3.4
* http://getbootstrap.com/javascript/#buttons
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
Expand All @@ -19,7 +19,7 @@
this.isLoading = false
}

Button.VERSION = '3.3.2'
Button.VERSION = '3.3.4'

Button.DEFAULTS = {
loadingText: 'loading...'
Expand Down
12 changes: 6 additions & 6 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.2
* Bootstrap: carousel.js v3.3.4
* http://getbootstrap.com/javascript/#carousel
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
Expand All @@ -17,10 +17,10 @@
this.$element = $(element)
this.$indicators = this.$element.find('.carousel-indicators')
this.options = options
this.paused =
this.sliding =
this.interval =
this.$active =
this.paused = null
this.sliding = null
this.interval = null
this.$active = null
this.$items = null

this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this))
Expand All @@ -30,7 +30,7 @@
.on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
}

Carousel.VERSION = '3.3.2'
Carousel.VERSION = '3.3.4'

Carousel.TRANSITION_DURATION = 600

Expand Down
14 changes: 7 additions & 7 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.2
* Bootstrap: collapse.js v3.3.4
* http://getbootstrap.com/javascript/#collapse
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
Expand All @@ -16,7 +16,8 @@
var Collapse = function (element, options) {
this.$element = $(element)
this.options = $.extend({}, Collapse.DEFAULTS, options)
this.$trigger = $(this.options.trigger).filter('[href="#' + element.id + '"], [data-target="#' + element.id + '"]')
this.$trigger = $('[data-toggle="collapse"][href="#' + element.id + '"],' +
'[data-toggle="collapse"][data-target="#' + element.id + '"]')
this.transitioning = null

if (this.options.parent) {
Expand All @@ -28,13 +29,12 @@
if (this.options.toggle) this.toggle()
}

Collapse.VERSION = '3.3.2'
Collapse.VERSION = '3.3.4'

Collapse.TRANSITION_DURATION = 350

Collapse.DEFAULTS = {
toggle: true,
trigger: '[data-toggle="collapse"]'
toggle: true
}

Collapse.prototype.dimension = function () {
Expand Down Expand Up @@ -172,7 +172,7 @@
var data = $this.data('bs.collapse')
var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)

if (!data && options.toggle && option == 'show') options.toggle = false
if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false
if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
if (typeof option == 'string') data[option]()
})
Expand Down Expand Up @@ -203,7 +203,7 @@

var $target = getTargetFromTrigger($this)
var data = $target.data('bs.collapse')
var option = data ? 'toggle' : $.extend({}, $this.data(), { trigger: this })
var option = data ? 'toggle' : $this.data()

Plugin.call($target, option)
})
Expand Down
6 changes: 3 additions & 3 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.2
* Bootstrap: dropdown.js v3.3.4
* http://getbootstrap.com/javascript/#dropdowns
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
Expand All @@ -19,7 +19,7 @@
$(element).on('click.bs.dropdown', this.toggle)
}

Dropdown.VERSION = '3.3.2'
Dropdown.VERSION = '3.3.4'

Dropdown.prototype.toggle = function (e) {
var $this = $(this)
Expand Down Expand Up @@ -72,7 +72,7 @@
return $this.trigger('click')
}

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

if (!$items.length) return
Expand Down
67 changes: 41 additions & 26 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.2
* Bootstrap: modal.js v3.3.4
* http://getbootstrap.com/javascript/#modals
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
Expand All @@ -14,12 +14,15 @@
// ======================

var Modal = function (element, options) {
this.options = options
this.$body = $(document.body)
this.$element = $(element)
this.$backdrop =
this.isShown = null
this.scrollbarWidth = 0
this.options = options
this.$body = $(document.body)
this.$element = $(element)
this.$dialog = this.$element.find('.modal-dialog')
this.$backdrop = null
this.isShown = null
this.originalBodyPad = null
this.scrollbarWidth = 0
this.ignoreBackdropClick = false

if (this.options.remote) {
this.$element
Expand All @@ -30,7 +33,7 @@
}
}

Modal.VERSION = '3.3.2'
Modal.VERSION = '3.3.4'

Modal.TRANSITION_DURATION = 300
Modal.BACKDROP_TRANSITION_DURATION = 150
Expand Down Expand Up @@ -64,6 +67,12 @@

this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))

this.$dialog.on('mousedown.dismiss.bs.modal', function () {
that.$element.one('mouseup.dismiss.bs.modal', function (e) {
if ($(e.target).is(that.$element)) that.ignoreBackdropClick = true
})
})

this.backdrop(function () {
var transition = $.support.transition && that.$element.hasClass('fade')

Expand All @@ -75,7 +84,6 @@
.show()
.scrollTop(0)

if (that.options.backdrop) that.adjustBackdrop()
that.adjustDialog()

if (transition) {
Expand All @@ -91,7 +99,7 @@
var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })

transition ?
that.$element.find('.modal-dialog') // wait for modal to slide in
that.$dialog // wait for modal to slide in
.one('bsTransitionEnd', function () {
that.$element.trigger('focus').trigger(e)
})
Expand Down Expand Up @@ -120,6 +128,9 @@
.removeClass('in')
.attr('aria-hidden', true)
.off('click.dismiss.bs.modal')
.off('mouseup.dismiss.bs.modal')

this.$dialog.off('mousedown.dismiss.bs.modal')

$.support.transition && this.$element.hasClass('fade') ?
this.$element
Expand Down Expand Up @@ -180,13 +191,18 @@
var doAnimate = $.support.transition && animate

this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
.prependTo(this.$element)
.on('click.dismiss.bs.modal', $.proxy(function (e) {
if (e.target !== e.currentTarget) return
this.options.backdrop == 'static'
? this.$element[0].focus.call(this.$element[0])
: this.hide.call(this)
}, this))
.appendTo(this.$body)

this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {
if (this.ignoreBackdropClick) {
this.ignoreBackdropClick = false
return
}
if (e.target !== e.currentTarget) return
this.options.backdrop == 'static'
? this.$element[0].focus()
: this.hide()
}, this))

if (doAnimate) this.$backdrop[0].offsetWidth // force reflow

Expand Down Expand Up @@ -221,16 +237,9 @@
// these following methods are used to handle overflowing modals

Modal.prototype.handleUpdate = function () {
if (this.options.backdrop) this.adjustBackdrop()
this.adjustDialog()
}

Modal.prototype.adjustBackdrop = function () {
this.$backdrop
.css('height', 0)
.css('height', this.$element[0].scrollHeight)
}

Modal.prototype.adjustDialog = function () {
var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight

Expand All @@ -248,17 +257,23 @@
}

Modal.prototype.checkScrollbar = function () {
this.bodyIsOverflowing = document.body.scrollHeight > document.documentElement.clientHeight
var fullWindowWidth = window.innerWidth
if (!fullWindowWidth) { // workaround for missing window.innerWidth in IE8
var documentElementRect = document.documentElement.getBoundingClientRect()
fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left)
}
this.bodyIsOverflowing = document.body.clientWidth < fullWindowWidth
this.scrollbarWidth = this.measureScrollbar()
}

Modal.prototype.setScrollbar = function () {
var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10)
this.originalBodyPad = document.body.style.paddingRight || ''
if (this.bodyIsOverflowing) this.$body.css('padding-right', bodyPad + this.scrollbarWidth)
}

Modal.prototype.resetScrollbar = function () {
this.$body.css('padding-right', '')
this.$body.css('padding-right', this.originalBodyPad)
}

Modal.prototype.measureScrollbar = function () { // thx walsh
Expand Down

0 comments on commit 0535f34

Please sign in to comment.