Skip to content

Commit

Permalink
rake convert[v3.4.0]
Browse files Browse the repository at this point in the history
  • Loading branch information
glebm committed Dec 14, 2018
1 parent 07b9b64 commit cd1542b
Show file tree
Hide file tree
Showing 32 changed files with 552 additions and 511 deletions.
126 changes: 71 additions & 55 deletions assets/javascripts/bootstrap.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Bootstrap v3.4.0 (http://getbootstrap.com)
* Bootstrap v3.4.0 (https://getbootstrap.com/)
* Copyright 2011-2018 Twitter, Inc.
* Licensed under the MIT license
*/
Expand All @@ -18,17 +18,17 @@ if (typeof jQuery === 'undefined') {

/* ========================================================================
* Bootstrap: transition.js v3.4.0
* http://getbootstrap.com/javascript/#transitions
* https://getbootstrap.com/docs/3.4/javascript/#transitions
* ========================================================================
* Copyright 2011-2016 Twitter, Inc.
* Copyright 2011-2018 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */


+function ($) {
'use strict';

// CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
// CSS TRANSITION SUPPORT (Shoutout: https://modernizr.com/)
// ============================================================

function transitionEnd() {
Expand All @@ -50,7 +50,7 @@ if (typeof jQuery === 'undefined') {
return false // explicit for ie8 ( ._.)
}

// http://blog.alexmaccaw.com/css-transitions
// https://blog.alexmaccaw.com/css-transitions
$.fn.emulateTransitionEnd = function (duration) {
var called = false
var $el = this
Expand Down Expand Up @@ -78,9 +78,9 @@ if (typeof jQuery === 'undefined') {

/* ========================================================================
* Bootstrap: alert.js v3.4.0
* http://getbootstrap.com/javascript/#alerts
* https://getbootstrap.com/docs/3.4/javascript/#alerts
* ========================================================================
* Copyright 2011-2016 Twitter, Inc.
* Copyright 2011-2018 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */

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

/* ========================================================================
* Bootstrap: button.js v3.4.0
* http://getbootstrap.com/javascript/#buttons
* https://getbootstrap.com/docs/3.4/javascript/#buttons
* ========================================================================
* Copyright 2011-2016 Twitter, Inc.
* Copyright 2011-2018 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */

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

/* ========================================================================
* Bootstrap: carousel.js v3.4.0
* http://getbootstrap.com/javascript/#carousel
* https://getbootstrap.com/docs/3.4/javascript/#carousel
* ========================================================================
* Copyright 2011-2016 Twitter, Inc.
* Copyright 2011-2018 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */

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

/* ========================================================================
* Bootstrap: collapse.js v3.4.0
* http://getbootstrap.com/javascript/#collapse
* https://getbootstrap.com/docs/3.4/javascript/#collapse
* ========================================================================
* Copyright 2011-2016 Twitter, Inc.
* Copyright 2011-2018 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */

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

/* ========================================================================
* Bootstrap: dropdown.js v3.4.0
* http://getbootstrap.com/javascript/#dropdowns
* https://getbootstrap.com/docs/3.4/javascript/#dropdowns
* ========================================================================
* Copyright 2011-2016 Twitter, Inc.
* Copyright 2011-2018 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */

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

/* ========================================================================
* Bootstrap: modal.js v3.4.0
* http://getbootstrap.com/javascript/#modals
* https://getbootstrap.com/docs/3.4/javascript/#modals
* ========================================================================
* Copyright 2011-2016 Twitter, Inc.
* Copyright 2011-2018 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */

Expand All @@ -940,15 +940,16 @@ if (typeof jQuery === 'undefined') {
// ======================

var Modal = function (element, options) {
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.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
this.fixedContent = '.navbar-fixed-top, .navbar-fixed-bottom'

if (this.options.remote) {
this.$element
Expand All @@ -959,7 +960,7 @@ if (typeof jQuery === 'undefined') {
}
}

Modal.VERSION = '3.4.0'
Modal.VERSION = '3.4.0'

Modal.TRANSITION_DURATION = 300
Modal.BACKDROP_TRANSITION_DURATION = 150
Expand All @@ -976,7 +977,7 @@ if (typeof jQuery === 'undefined') {

Modal.prototype.show = function (_relatedTarget) {
var that = this
var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })

this.$element.trigger(e)

Expand Down Expand Up @@ -1067,8 +1068,8 @@ if (typeof jQuery === 'undefined') {
.off('focusin.bs.modal') // guard against infinite focus loop
.on('focusin.bs.modal', $.proxy(function (e) {
if (document !== e.target &&
this.$element[0] !== e.target &&
!this.$element.has(e.target).length) {
this.$element[0] !== e.target &&
!this.$element.has(e.target).length) {
this.$element.trigger('focus')
}
}, this))
Expand Down Expand Up @@ -1170,7 +1171,7 @@ if (typeof jQuery === 'undefined') {
var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight

this.$element.css({
paddingLeft: !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '',
paddingLeft: !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '',
paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : ''
})
}
Expand All @@ -1195,11 +1196,26 @@ if (typeof jQuery === 'undefined') {
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)
var scrollbarWidth = this.scrollbarWidth
if (this.bodyIsOverflowing) {
this.$body.css('padding-right', bodyPad + scrollbarWidth)
$(this.fixedContent).each(function (index, element) {
var actualPadding = element.style.paddingRight
var calculatedPadding = $(element).css('padding-right')
$(element)
.data('padding-right', actualPadding)
.css('padding-right', parseFloat(calculatedPadding) + scrollbarWidth + 'px')
})
}
}

Modal.prototype.resetScrollbar = function () {
this.$body.css('padding-right', this.originalBodyPad)
$(this.fixedContent).each(function (index, element) {
var padding = $(element).data('padding-right')
$(element).removeData('padding-right')
element.style.paddingRight = padding ? padding : ''
})
}

Modal.prototype.measureScrollbar = function () { // thx walsh
Expand All @@ -1217,8 +1233,8 @@ if (typeof jQuery === 'undefined') {

function Plugin(option, _relatedTarget) {
return this.each(function () {
var $this = $(this)
var data = $this.data('bs.modal')
var $this = $(this)
var data = $this.data('bs.modal')
var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)

if (!data) $this.data('bs.modal', (data = new Modal(this, options)))
Expand All @@ -1229,7 +1245,7 @@ if (typeof jQuery === 'undefined') {

var old = $.fn.modal

$.fn.modal = Plugin
$.fn.modal = Plugin
$.fn.modal.Constructor = Modal


Expand All @@ -1246,13 +1262,13 @@ if (typeof jQuery === 'undefined') {
// ==============

$(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) {
var $this = $(this)
var href = $this.attr('href')
var target = $this.attr('data-target') ||
var $this = $(this)
var href = $this.attr('href')
var target = $this.attr('data-target') ||
(href && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7

var $target = $(document).find(target)
var option = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
var option = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())

if ($this.is('a')) e.preventDefault()

Expand All @@ -1269,10 +1285,10 @@ if (typeof jQuery === 'undefined') {

/* ========================================================================
* Bootstrap: tooltip.js v3.4.0
* http://getbootstrap.com/javascript/#tooltip
* https://getbootstrap.com/docs/3.4/javascript/#tooltip
* Inspired by the original jQuery.tipsy by Jason Frame
* ========================================================================
* Copyright 2011-2016 Twitter, Inc.
* Copyright 2011-2018 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */

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

/* ========================================================================
* Bootstrap: popover.js v3.4.0
* http://getbootstrap.com/javascript/#popovers
* https://getbootstrap.com/docs/3.4/javascript/#popovers
* ========================================================================
* Copyright 2011-2016 Twitter, Inc.
* Copyright 2011-2018 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */

Expand Down Expand Up @@ -1857,8 +1873,8 @@ if (typeof jQuery === 'undefined') {

return $e.attr('data-content')
|| (typeof o.content == 'function' ?
o.content.call($e[0]) :
o.content)
o.content.call($e[0]) :
o.content)
}

Popover.prototype.arrow = function () {
Expand Down Expand Up @@ -1899,9 +1915,9 @@ if (typeof jQuery === 'undefined') {

/* ========================================================================
* Bootstrap: scrollspy.js v3.4.0
* http://getbootstrap.com/javascript/#scrollspy
* https://getbootstrap.com/docs/3.4/javascript/#scrollspy
* ========================================================================
* Copyright 2011-2016 Twitter, Inc.
* Copyright 2011-2018 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */

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

/* ========================================================================
* Bootstrap: tab.js v3.4.0
* http://getbootstrap.com/javascript/#tabs
* https://getbootstrap.com/docs/3.4/javascript/#tabs
* ========================================================================
* Copyright 2011-2016 Twitter, Inc.
* Copyright 2011-2018 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */

Expand Down Expand Up @@ -2145,15 +2161,15 @@ if (typeof jQuery === 'undefined') {
$active
.removeClass('active')
.find('> .dropdown-menu > .active')
.removeClass('active')
.removeClass('active')
.end()
.find('[data-toggle="tab"]')
.attr('aria-expanded', false)
.attr('aria-expanded', false)

element
.addClass('active')
.find('[data-toggle="tab"]')
.attr('aria-expanded', true)
.attr('aria-expanded', true)

if (transition) {
element[0].offsetWidth // reflow for transition
Expand All @@ -2165,10 +2181,10 @@ if (typeof jQuery === 'undefined') {
if (element.parent('.dropdown-menu').length) {
element
.closest('li.dropdown')
.addClass('active')
.addClass('active')
.end()
.find('[data-toggle="tab"]')
.attr('aria-expanded', true)
.attr('aria-expanded', true)
}

callback && callback()
Expand Down Expand Up @@ -2228,9 +2244,9 @@ if (typeof jQuery === 'undefined') {

/* ========================================================================
* Bootstrap: affix.js v3.4.0
* http://getbootstrap.com/javascript/#affix
* https://getbootstrap.com/docs/3.4/javascript/#affix
* ========================================================================
* Copyright 2011-2016 Twitter, Inc.
* Copyright 2011-2018 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */

Expand Down
7 changes: 6 additions & 1 deletion 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,8 +1,8 @@
/* ========================================================================
* Bootstrap: affix.js v3.4.0
* http://getbootstrap.com/javascript/#affix
* https://getbootstrap.com/docs/3.4/javascript/#affix
* ========================================================================
* Copyright 2011-2016 Twitter, Inc.
* Copyright 2011-2018 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */

Expand Down
4 changes: 2 additions & 2 deletions assets/javascripts/bootstrap/alert.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/* ========================================================================
* Bootstrap: alert.js v3.4.0
* http://getbootstrap.com/javascript/#alerts
* https://getbootstrap.com/docs/3.4/javascript/#alerts
* ========================================================================
* Copyright 2011-2016 Twitter, Inc.
* Copyright 2011-2018 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */

Expand Down
4 changes: 2 additions & 2 deletions assets/javascripts/bootstrap/button.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/* ========================================================================
* Bootstrap: button.js v3.4.0
* http://getbootstrap.com/javascript/#buttons
* https://getbootstrap.com/docs/3.4/javascript/#buttons
* ========================================================================
* Copyright 2011-2016 Twitter, Inc.
* Copyright 2011-2018 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */

Expand Down
4 changes: 2 additions & 2 deletions assets/javascripts/bootstrap/carousel.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/* ========================================================================
* Bootstrap: carousel.js v3.4.0
* http://getbootstrap.com/javascript/#carousel
* https://getbootstrap.com/docs/3.4/javascript/#carousel
* ========================================================================
* Copyright 2011-2016 Twitter, Inc.
* Copyright 2011-2018 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */

Expand Down
4 changes: 2 additions & 2 deletions assets/javascripts/bootstrap/collapse.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/* ========================================================================
* Bootstrap: collapse.js v3.4.0
* http://getbootstrap.com/javascript/#collapse
* https://getbootstrap.com/docs/3.4/javascript/#collapse
* ========================================================================
* Copyright 2011-2016 Twitter, Inc.
* Copyright 2011-2018 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */

Expand Down
Loading

0 comments on commit cd1542b

Please sign in to comment.