Skip to content

Commit

Permalink
rake convert
Browse files Browse the repository at this point in the history
  • Loading branch information
glebm committed Jul 25, 2016
1 parent 63f0a72 commit 563a9ba
Show file tree
Hide file tree
Showing 23 changed files with 83 additions and 76 deletions.
6 changes: 3 additions & 3 deletions assets/javascripts/bootstrap-sprockets.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
//= require ./bootstrap/affix
//= require ./bootstrap/transition
//= require ./bootstrap/alert
//= require ./bootstrap/button
//= require ./bootstrap/carousel
//= require ./bootstrap/collapse
//= require ./bootstrap/dropdown
//= require ./bootstrap/modal
//= require ./bootstrap/scrollspy
//= require ./bootstrap/tab
//= require ./bootstrap/transition
//= require ./bootstrap/affix
//= require ./bootstrap/scrollspy
//= require ./bootstrap/tooltip
//= require ./bootstrap/popover
72 changes: 39 additions & 33 deletions assets/javascripts/bootstrap.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Bootstrap v3.3.6 (http://getbootstrap.com)
* Bootstrap v3.3.7 (http://getbootstrap.com)
* Copyright 2011-2016 Twitter, Inc.
* Licensed under the MIT license
*/
Expand All @@ -11,13 +11,13 @@ if (typeof jQuery === 'undefined') {
+function ($) {
'use strict';
var version = $.fn.jquery.split(' ')[0].split('.')
if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] > 2)) {
throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3')
if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] > 3)) {
throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4')
}
}(jQuery);

/* ========================================================================
* Bootstrap: transition.js v3.3.6
* Bootstrap: transition.js v3.3.7
* http://getbootstrap.com/javascript/#transitions
* ========================================================================
* Copyright 2011-2016 Twitter, Inc.
Expand Down Expand Up @@ -77,7 +77,7 @@ if (typeof jQuery === 'undefined') {
}(jQuery);

/* ========================================================================
* Bootstrap: alert.js v3.3.6
* Bootstrap: alert.js v3.3.7
* http://getbootstrap.com/javascript/#alerts
* ========================================================================
* Copyright 2011-2016 Twitter, Inc.
Expand All @@ -96,7 +96,7 @@ if (typeof jQuery === 'undefined') {
$(el).on('click', dismiss, this.close)
}

Alert.VERSION = '3.3.6'
Alert.VERSION = '3.3.7'

Alert.TRANSITION_DURATION = 150

Expand All @@ -109,7 +109,7 @@ if (typeof jQuery === 'undefined') {
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
}

var $parent = $(selector)
var $parent = $(selector === '#' ? [] : selector)

if (e) e.preventDefault()

Expand Down Expand Up @@ -172,7 +172,7 @@ if (typeof jQuery === 'undefined') {
}(jQuery);

/* ========================================================================
* Bootstrap: button.js v3.3.6
* Bootstrap: button.js v3.3.7
* http://getbootstrap.com/javascript/#buttons
* ========================================================================
* Copyright 2011-2016 Twitter, Inc.
Expand All @@ -192,7 +192,7 @@ if (typeof jQuery === 'undefined') {
this.isLoading = false
}

Button.VERSION = '3.3.6'
Button.VERSION = '3.3.7'

Button.DEFAULTS = {
loadingText: 'loading...'
Expand All @@ -214,10 +214,10 @@ if (typeof jQuery === 'undefined') {

if (state == 'loadingText') {
this.isLoading = true
$el.addClass(d).attr(d, d)
$el.addClass(d).attr(d, d).prop(d, true)
} else if (this.isLoading) {
this.isLoading = false
$el.removeClass(d).removeAttr(d)
$el.removeClass(d).removeAttr(d).prop(d, false)
}
}, this), 0)
}
Expand Down Expand Up @@ -298,7 +298,7 @@ if (typeof jQuery === 'undefined') {
}(jQuery);

/* ========================================================================
* Bootstrap: carousel.js v3.3.6
* Bootstrap: carousel.js v3.3.7
* http://getbootstrap.com/javascript/#carousel
* ========================================================================
* Copyright 2011-2016 Twitter, Inc.
Expand Down Expand Up @@ -329,7 +329,7 @@ if (typeof jQuery === 'undefined') {
.on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
}

Carousel.VERSION = '3.3.6'
Carousel.VERSION = '3.3.7'

Carousel.TRANSITION_DURATION = 600

Expand Down Expand Up @@ -536,7 +536,7 @@ if (typeof jQuery === 'undefined') {
}(jQuery);

/* ========================================================================
* Bootstrap: collapse.js v3.3.6
* Bootstrap: collapse.js v3.3.7
* http://getbootstrap.com/javascript/#collapse
* ========================================================================
* Copyright 2011-2016 Twitter, Inc.
Expand Down Expand Up @@ -567,7 +567,7 @@ if (typeof jQuery === 'undefined') {
if (this.options.toggle) this.toggle()
}

Collapse.VERSION = '3.3.6'
Collapse.VERSION = '3.3.7'

Collapse.TRANSITION_DURATION = 350

Expand Down Expand Up @@ -749,7 +749,7 @@ if (typeof jQuery === 'undefined') {
}(jQuery);

/* ========================================================================
* Bootstrap: dropdown.js v3.3.6
* Bootstrap: dropdown.js v3.3.7
* http://getbootstrap.com/javascript/#dropdowns
* ========================================================================
* Copyright 2011-2016 Twitter, Inc.
Expand All @@ -769,7 +769,7 @@ if (typeof jQuery === 'undefined') {
$(element).on('click.bs.dropdown', this.toggle)
}

Dropdown.VERSION = '3.3.6'
Dropdown.VERSION = '3.3.7'

function getParent($this) {
var selector = $this.attr('data-target')
Expand Down Expand Up @@ -915,7 +915,7 @@ if (typeof jQuery === 'undefined') {
}(jQuery);

/* ========================================================================
* Bootstrap: modal.js v3.3.6
* Bootstrap: modal.js v3.3.7
* http://getbootstrap.com/javascript/#modals
* ========================================================================
* Copyright 2011-2016 Twitter, Inc.
Expand Down Expand Up @@ -949,7 +949,7 @@ if (typeof jQuery === 'undefined') {
}
}

Modal.VERSION = '3.3.6'
Modal.VERSION = '3.3.7'

Modal.TRANSITION_DURATION = 300
Modal.BACKDROP_TRANSITION_DURATION = 150
Expand Down Expand Up @@ -1255,7 +1255,7 @@ if (typeof jQuery === 'undefined') {
}(jQuery);

/* ========================================================================
* Bootstrap: tooltip.js v3.3.6
* Bootstrap: tooltip.js v3.3.7
* http://getbootstrap.com/javascript/#tooltip
* Inspired by the original jQuery.tipsy by Jason Frame
* ========================================================================
Expand All @@ -1282,7 +1282,7 @@ if (typeof jQuery === 'undefined') {
this.init('tooltip', element, options)
}

Tooltip.VERSION = '3.3.6'
Tooltip.VERSION = '3.3.7'

Tooltip.TRANSITION_DURATION = 150

Expand Down Expand Up @@ -1573,9 +1573,11 @@ if (typeof jQuery === 'undefined') {

function complete() {
if (that.hoverState != 'in') $tip.detach()
that.$element
.removeAttr('aria-describedby')
.trigger('hidden.bs.' + that.type)
if (that.$element) { // TODO: Check whether guarding this code with this `if` is really necessary.
that.$element
.removeAttr('aria-describedby')
.trigger('hidden.bs.' + that.type)
}
callback && callback()
}

Expand Down Expand Up @@ -1618,7 +1620,10 @@ if (typeof jQuery === 'undefined') {
// width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093
elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top })
}
var elOffset = isBody ? { top: 0, left: 0 } : $element.offset()
var isSvg = window.SVGElement && el instanceof window.SVGElement
// Avoid using $.offset() on SVGs since it gives incorrect results in jQuery 3.
// See https://github.com/twbs/bootstrap/issues/20280
var elOffset = isBody ? { top: 0, left: 0 } : (isSvg ? null : $element.offset())
var scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }
var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null

Expand Down Expand Up @@ -1734,6 +1739,7 @@ if (typeof jQuery === 'undefined') {
that.$tip = null
that.$arrow = null
that.$viewport = null
that.$element = null
})
}

Expand Down Expand Up @@ -1770,7 +1776,7 @@ if (typeof jQuery === 'undefined') {
}(jQuery);

/* ========================================================================
* Bootstrap: popover.js v3.3.6
* Bootstrap: popover.js v3.3.7
* http://getbootstrap.com/javascript/#popovers
* ========================================================================
* Copyright 2011-2016 Twitter, Inc.
Expand All @@ -1790,7 +1796,7 @@ if (typeof jQuery === 'undefined') {

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

Popover.VERSION = '3.3.6'
Popover.VERSION = '3.3.7'

Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
placement: 'right',
Expand Down Expand Up @@ -1879,7 +1885,7 @@ if (typeof jQuery === 'undefined') {
}(jQuery);

/* ========================================================================
* Bootstrap: scrollspy.js v3.3.6
* Bootstrap: scrollspy.js v3.3.7
* http://getbootstrap.com/javascript/#scrollspy
* ========================================================================
* Copyright 2011-2016 Twitter, Inc.
Expand Down Expand Up @@ -1908,7 +1914,7 @@ if (typeof jQuery === 'undefined') {
this.process()
}

ScrollSpy.VERSION = '3.3.6'
ScrollSpy.VERSION = '3.3.7'

ScrollSpy.DEFAULTS = {
offset: 10
Expand Down Expand Up @@ -2052,7 +2058,7 @@ if (typeof jQuery === 'undefined') {
}(jQuery);

/* ========================================================================
* Bootstrap: tab.js v3.3.6
* Bootstrap: tab.js v3.3.7
* http://getbootstrap.com/javascript/#tabs
* ========================================================================
* Copyright 2011-2016 Twitter, Inc.
Expand All @@ -2072,7 +2078,7 @@ if (typeof jQuery === 'undefined') {
// jscs:enable requireDollarBeforejQueryAssignment
}

Tab.VERSION = '3.3.6'
Tab.VERSION = '3.3.7'

Tab.TRANSITION_DURATION = 150

Expand Down Expand Up @@ -2208,7 +2214,7 @@ if (typeof jQuery === 'undefined') {
}(jQuery);

/* ========================================================================
* Bootstrap: affix.js v3.3.6
* Bootstrap: affix.js v3.3.7
* http://getbootstrap.com/javascript/#affix
* ========================================================================
* Copyright 2011-2016 Twitter, Inc.
Expand Down Expand Up @@ -2237,7 +2243,7 @@ if (typeof jQuery === 'undefined') {
this.checkPosition()
}

Affix.VERSION = '3.3.6'
Affix.VERSION = '3.3.7'

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

Expand Down
6 changes: 3 additions & 3 deletions assets/javascripts/bootstrap.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions assets/javascripts/bootstrap/affix.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* ========================================================================
* Bootstrap: affix.js v3.3.6
* Bootstrap: affix.js v3.3.7
* http://getbootstrap.com/javascript/#affix
* ========================================================================
* Copyright 2011-2016 Twitter, Inc.
Expand Down Expand Up @@ -28,7 +28,7 @@
this.checkPosition()
}

Affix.VERSION = '3.3.6'
Affix.VERSION = '3.3.7'

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

Expand Down
6 changes: 3 additions & 3 deletions assets/javascripts/bootstrap/alert.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* ========================================================================
* Bootstrap: alert.js v3.3.6
* Bootstrap: alert.js v3.3.7
* http://getbootstrap.com/javascript/#alerts
* ========================================================================
* Copyright 2011-2016 Twitter, Inc.
Expand All @@ -18,7 +18,7 @@
$(el).on('click', dismiss, this.close)
}

Alert.VERSION = '3.3.6'
Alert.VERSION = '3.3.7'

Alert.TRANSITION_DURATION = 150

Expand All @@ -31,7 +31,7 @@
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
}

var $parent = $(selector)
var $parent = $(selector === '#' ? [] : selector)

if (e) e.preventDefault()

Expand Down
8 changes: 4 additions & 4 deletions assets/javascripts/bootstrap/button.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* ========================================================================
* Bootstrap: button.js v3.3.6
* Bootstrap: button.js v3.3.7
* http://getbootstrap.com/javascript/#buttons
* ========================================================================
* Copyright 2011-2016 Twitter, Inc.
Expand All @@ -19,7 +19,7 @@
this.isLoading = false
}

Button.VERSION = '3.3.6'
Button.VERSION = '3.3.7'

Button.DEFAULTS = {
loadingText: 'loading...'
Expand All @@ -41,10 +41,10 @@

if (state == 'loadingText') {
this.isLoading = true
$el.addClass(d).attr(d, d)
$el.addClass(d).attr(d, d).prop(d, true)
} else if (this.isLoading) {
this.isLoading = false
$el.removeClass(d).removeAttr(d)
$el.removeClass(d).removeAttr(d).prop(d, false)
}
}, this), 0)
}
Expand Down
4 changes: 2 additions & 2 deletions assets/javascripts/bootstrap/carousel.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* ========================================================================
* Bootstrap: carousel.js v3.3.6
* Bootstrap: carousel.js v3.3.7
* http://getbootstrap.com/javascript/#carousel
* ========================================================================
* Copyright 2011-2016 Twitter, Inc.
Expand Down Expand Up @@ -30,7 +30,7 @@
.on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
}

Carousel.VERSION = '3.3.6'
Carousel.VERSION = '3.3.7'

Carousel.TRANSITION_DURATION = 600

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

Collapse.VERSION = '3.3.6'
Collapse.VERSION = '3.3.7'

Collapse.TRANSITION_DURATION = 350

Expand Down
Loading

0 comments on commit 563a9ba

Please sign in to comment.