Skip to content
This repository has been archived by the owner on Dec 23, 2021. It is now read-only.

Commit

Permalink
Minor upgraded to version 3.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Nizar Lazuardy Firmansyah authored and Nizar Lazuardy Firmansyah committed Dec 8, 2014
1 parent 67d91eb commit 5e5868b
Show file tree
Hide file tree
Showing 6 changed files with 82 additions and 38 deletions.
2 changes: 1 addition & 1 deletion assets/css/bootstrap-theme.css.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions assets/css/bootstrap-theme.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/css/bootstrap.css.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions assets/css/bootstrap.min.css

Large diffs are not rendered by default.

102 changes: 73 additions & 29 deletions assets/js/bootstrap.js
@@ -1,5 +1,5 @@
/*!
* Bootstrap v3.3.0 (http://getbootstrap.com)
* Bootstrap v3.3.1 (http://getbootstrap.com)
* Copyright 2011-2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
Expand All @@ -16,7 +16,7 @@ if (typeof jQuery === 'undefined') {
}(jQuery);

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

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

Alert.VERSION = '3.3.0'
Alert.VERSION = '3.3.1'

Alert.TRANSITION_DURATION = 150

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

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

Button.VERSION = '3.3.0'
Button.VERSION = '3.3.1'

Button.DEFAULTS = {
loadingText: 'loading...'
Expand Down Expand Up @@ -282,13 +282,13 @@ if (typeof jQuery === 'undefined') {
e.preventDefault()
})
.on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {
$(e.target).closest('.btn').toggleClass('focus', e.type == 'focus')
$(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))
})

}(jQuery);

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

Carousel.VERSION = '3.3.0'
Carousel.VERSION = '3.3.1'

Carousel.TRANSITION_DURATION = 600

Expand All @@ -331,6 +331,7 @@ if (typeof jQuery === 'undefined') {
}

Carousel.prototype.keydown = function (e) {
if (/input|textarea/i.test(e.target.tagName)) return
switch (e.which) {
case 37: this.prev(); break
case 39: this.next(); break
Expand Down Expand Up @@ -528,7 +529,7 @@ if (typeof jQuery === 'undefined') {
}(jQuery);

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

Collapse.VERSION = '3.3.0'
Collapse.VERSION = '3.3.1'

Collapse.TRANSITION_DURATION = 350

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

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

Dropdown.VERSION = '3.3.0'
Dropdown.VERSION = '3.3.1'

Dropdown.prototype.toggle = function (e) {
var $this = $(this)
Expand Down Expand Up @@ -796,7 +797,7 @@ if (typeof jQuery === 'undefined') {
}

Dropdown.prototype.keydown = function (e) {
if (!/(38|40|27|32)/.test(e.which)) return
if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) return

var $this = $(this)

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

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

Modal.VERSION = '3.3.0'
Modal.VERSION = '3.3.1'

Modal.TRANSITION_DURATION = 300
Modal.BACKDROP_TRANSITION_DURATION = 150
Expand All @@ -959,10 +960,11 @@ if (typeof jQuery === 'undefined') {
this.isShown = true

this.checkScrollbar()
this.setScrollbar()
this.$body.addClass('modal-open')

this.setScrollbar()
this.escape()
this.resize()

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

Expand All @@ -977,6 +979,9 @@ if (typeof jQuery === 'undefined') {
.show()
.scrollTop(0)

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

if (transition) {
that.$element[0].offsetWidth // force reflow
}
Expand Down Expand Up @@ -1011,6 +1016,7 @@ if (typeof jQuery === 'undefined') {
this.isShown = false

this.escape()
this.resize()

$(document).off('focusin.bs.modal')

Expand Down Expand Up @@ -1046,11 +1052,20 @@ if (typeof jQuery === 'undefined') {
}
}

Modal.prototype.resize = function () {
if (this.isShown) {
$(window).on('resize.bs.modal', $.proxy(this.handleUpdate, this))
} else {
$(window).off('resize.bs.modal')
}
}

Modal.prototype.hideModal = function () {
var that = this
this.$element.hide()
this.backdrop(function () {
that.$body.removeClass('modal-open')
that.resetAdjustments()
that.resetScrollbar()
that.$element.trigger('hidden.bs.modal')
})
Expand Down Expand Up @@ -1107,21 +1122,50 @@ if (typeof jQuery === 'undefined') {
}
}

// 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

this.$element.css({
paddingLeft: !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '',
paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : ''
})
}

Modal.prototype.resetAdjustments = function () {
this.$element.css({
paddingLeft: '',
paddingRight: ''
})
}

Modal.prototype.checkScrollbar = function () {
this.bodyIsOverflowing = document.body.scrollHeight > document.documentElement.clientHeight
this.scrollbarWidth = this.measureScrollbar()
}

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

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

Modal.prototype.measureScrollbar = function () { // thx walsh
if (document.body.clientWidth >= window.innerWidth) return 0
var scrollDiv = document.createElement('div')
scrollDiv.className = 'modal-scrollbar-measure'
this.$body.append(scrollDiv)
Expand Down Expand Up @@ -1184,7 +1228,7 @@ if (typeof jQuery === 'undefined') {
}(jQuery);

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

Tooltip.VERSION = '3.3.0'
Tooltip.VERSION = '3.3.1'

Tooltip.TRANSITION_DURATION = 150

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

/* ========================================================================
* Bootstrap: popover.js v3.3.0
* Bootstrap: popover.js v3.3.1
* http://getbootstrap.com/javascript/#popovers
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
Expand All @@ -1683,7 +1727,7 @@ if (typeof jQuery === 'undefined') {

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

Popover.VERSION = '3.3.0'
Popover.VERSION = '3.3.1'

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

/* ========================================================================
* Bootstrap: scrollspy.js v3.3.0
* Bootstrap: scrollspy.js v3.3.1
* http://getbootstrap.com/javascript/#scrollspy
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
Expand Down Expand Up @@ -1814,7 +1858,7 @@ if (typeof jQuery === 'undefined') {
this.process()
}

ScrollSpy.VERSION = '3.3.0'
ScrollSpy.VERSION = '3.3.1'

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

/* ========================================================================
* Bootstrap: tab.js v3.3.0
* Bootstrap: tab.js v3.3.1
* http://getbootstrap.com/javascript/#tabs
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
Expand All @@ -1977,7 +2021,7 @@ if (typeof jQuery === 'undefined') {
this.element = $(element)
}

Tab.VERSION = '3.3.0'
Tab.VERSION = '3.3.1'

Tab.TRANSITION_DURATION = 150

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

/* ========================================================================
* Bootstrap: affix.js v3.3.0
* Bootstrap: affix.js v3.3.1
* http://getbootstrap.com/javascript/#affix
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
Expand Down Expand Up @@ -2142,7 +2186,7 @@ if (typeof jQuery === 'undefined') {
this.checkPosition()
}

Affix.VERSION = '3.3.0'
Affix.VERSION = '3.3.1'

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

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

Large diffs are not rendered by default.

0 comments on commit 5e5868b

Please sign in to comment.