summaryrefslogtreecommitdiff
path: root/bower_components/bootstrap/js
diff options
context:
space:
mode:
Diffstat (limited to 'bower_components/bootstrap/js')
-rw-r--r--bower_components/bootstrap/js/affix.js4
-rw-r--r--bower_components/bootstrap/js/alert.js4
-rw-r--r--bower_components/bootstrap/js/button.js6
-rw-r--r--bower_components/bootstrap/js/carousel.js5
-rw-r--r--bower_components/bootstrap/js/collapse.js4
-rw-r--r--bower_components/bootstrap/js/dropdown.js6
-rw-r--r--bower_components/bootstrap/js/modal.js53
-rw-r--r--bower_components/bootstrap/js/popover.js4
-rw-r--r--bower_components/bootstrap/js/scrollspy.js4
-rw-r--r--bower_components/bootstrap/js/tab.js4
-rw-r--r--bower_components/bootstrap/js/tooltip.js4
-rw-r--r--bower_components/bootstrap/js/transition.js2
12 files changed, 72 insertions, 28 deletions
diff --git a/bower_components/bootstrap/js/affix.js b/bower_components/bootstrap/js/affix.js
index e4efa20c..deea2948 100644
--- a/bower_components/bootstrap/js/affix.js
+++ b/bower_components/bootstrap/js/affix.js
@@ -1,5 +1,5 @@
/* ========================================================================
- * Bootstrap: affix.js v3.3.0
+ * Bootstrap: affix.js v3.3.1
* http://getbootstrap.com/javascript/#affix
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
@@ -28,7 +28,7 @@
this.checkPosition()
}
- Affix.VERSION = '3.3.0'
+ Affix.VERSION = '3.3.1'
Affix.RESET = 'affix affix-top affix-bottom'
diff --git a/bower_components/bootstrap/js/alert.js b/bower_components/bootstrap/js/alert.js
index d47d85fc..7b775dd0 100644
--- a/bower_components/bootstrap/js/alert.js
+++ b/bower_components/bootstrap/js/alert.js
@@ -1,5 +1,5 @@
/* ========================================================================
- * Bootstrap: alert.js v3.3.0
+ * Bootstrap: alert.js v3.3.1
* http://getbootstrap.com/javascript/#alerts
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
@@ -18,7 +18,7 @@
$(el).on('click', dismiss, this.close)
}
- Alert.VERSION = '3.3.0'
+ Alert.VERSION = '3.3.1'
Alert.TRANSITION_DURATION = 150
diff --git a/bower_components/bootstrap/js/button.js b/bower_components/bootstrap/js/button.js
index 2be02341..7b1e134b 100644
--- a/bower_components/bootstrap/js/button.js
+++ b/bower_components/bootstrap/js/button.js
@@ -1,5 +1,5 @@
/* ========================================================================
- * Bootstrap: button.js v3.3.0
+ * Bootstrap: button.js v3.3.1
* http://getbootstrap.com/javascript/#buttons
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
@@ -19,7 +19,7 @@
this.isLoading = false
}
- Button.VERSION = '3.3.0'
+ Button.VERSION = '3.3.1'
Button.DEFAULTS = {
loadingText: 'loading...'
@@ -110,7 +110,7 @@
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);
diff --git a/bower_components/bootstrap/js/carousel.js b/bower_components/bootstrap/js/carousel.js
index 4e4e4779..282d618f 100644
--- a/bower_components/bootstrap/js/carousel.js
+++ b/bower_components/bootstrap/js/carousel.js
@@ -1,5 +1,5 @@
/* ========================================================================
- * Bootstrap: carousel.js v3.3.0
+ * Bootstrap: carousel.js v3.3.1
* http://getbootstrap.com/javascript/#carousel
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
@@ -30,7 +30,7 @@
.on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
}
- Carousel.VERSION = '3.3.0'
+ Carousel.VERSION = '3.3.1'
Carousel.TRANSITION_DURATION = 600
@@ -42,6 +42,7 @@
}
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
diff --git a/bower_components/bootstrap/js/collapse.js b/bower_components/bootstrap/js/collapse.js
index 4f859644..b2cc1253 100644
--- a/bower_components/bootstrap/js/collapse.js
+++ b/bower_components/bootstrap/js/collapse.js
@@ -1,5 +1,5 @@
/* ========================================================================
- * Bootstrap: collapse.js v3.3.0
+ * Bootstrap: collapse.js v3.3.1
* http://getbootstrap.com/javascript/#collapse
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
@@ -28,7 +28,7 @@
if (this.options.toggle) this.toggle()
}
- Collapse.VERSION = '3.3.0'
+ Collapse.VERSION = '3.3.1'
Collapse.TRANSITION_DURATION = 350
diff --git a/bower_components/bootstrap/js/dropdown.js b/bower_components/bootstrap/js/dropdown.js
index ae192e57..69a40f68 100644
--- a/bower_components/bootstrap/js/dropdown.js
+++ b/bower_components/bootstrap/js/dropdown.js
@@ -1,5 +1,5 @@
/* ========================================================================
- * Bootstrap: dropdown.js v3.3.0
+ * Bootstrap: dropdown.js v3.3.1
* http://getbootstrap.com/javascript/#dropdowns
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
@@ -19,7 +19,7 @@
$(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)
@@ -55,7 +55,7 @@
}
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)
diff --git a/bower_components/bootstrap/js/modal.js b/bower_components/bootstrap/js/modal.js
index 8b0e269b..93891aa4 100644
--- a/bower_components/bootstrap/js/modal.js
+++ b/bower_components/bootstrap/js/modal.js
@@ -1,5 +1,5 @@
/* ========================================================================
- * Bootstrap: modal.js v3.3.0
+ * Bootstrap: modal.js v3.3.1
* http://getbootstrap.com/javascript/#modals
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
@@ -30,7 +30,7 @@
}
}
- Modal.VERSION = '3.3.0'
+ Modal.VERSION = '3.3.1'
Modal.TRANSITION_DURATION = 300
Modal.BACKDROP_TRANSITION_DURATION = 150
@@ -56,10 +56,11 @@
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))
@@ -74,6 +75,9 @@
.show()
.scrollTop(0)
+ if (that.options.backdrop) that.adjustBackdrop()
+ that.adjustDialog()
+
if (transition) {
that.$element[0].offsetWidth // force reflow
}
@@ -108,6 +112,7 @@
this.isShown = false
this.escape()
+ this.resize()
$(document).off('focusin.bs.modal')
@@ -143,11 +148,20 @@
}
}
+ 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')
})
@@ -204,13 +218,43 @@
}
}
+ // 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 () {
@@ -218,7 +262,6 @@
}
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)
diff --git a/bower_components/bootstrap/js/popover.js b/bower_components/bootstrap/js/popover.js
index 35480591..db272bde 100644
--- a/bower_components/bootstrap/js/popover.js
+++ b/bower_components/bootstrap/js/popover.js
@@ -1,5 +1,5 @@
/* ========================================================================
- * Bootstrap: popover.js v3.3.0
+ * Bootstrap: popover.js v3.3.1
* http://getbootstrap.com/javascript/#popovers
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
@@ -19,7 +19,7 @@
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',
diff --git a/bower_components/bootstrap/js/scrollspy.js b/bower_components/bootstrap/js/scrollspy.js
index 973021a9..c468262f 100644
--- a/bower_components/bootstrap/js/scrollspy.js
+++ b/bower_components/bootstrap/js/scrollspy.js
@@ -1,5 +1,5 @@
/* ========================================================================
- * Bootstrap: scrollspy.js v3.3.0
+ * Bootstrap: scrollspy.js v3.3.1
* http://getbootstrap.com/javascript/#scrollspy
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
@@ -30,7 +30,7 @@
this.process()
}
- ScrollSpy.VERSION = '3.3.0'
+ ScrollSpy.VERSION = '3.3.1'
ScrollSpy.DEFAULTS = {
offset: 10
diff --git a/bower_components/bootstrap/js/tab.js b/bower_components/bootstrap/js/tab.js
index 7a681698..d59827f2 100644
--- a/bower_components/bootstrap/js/tab.js
+++ b/bower_components/bootstrap/js/tab.js
@@ -1,5 +1,5 @@
/* ========================================================================
- * Bootstrap: tab.js v3.3.0
+ * Bootstrap: tab.js v3.3.1
* http://getbootstrap.com/javascript/#tabs
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.
@@ -17,7 +17,7 @@
this.element = $(element)
}
- Tab.VERSION = '3.3.0'
+ Tab.VERSION = '3.3.1'
Tab.TRANSITION_DURATION = 150
diff --git a/bower_components/bootstrap/js/tooltip.js b/bower_components/bootstrap/js/tooltip.js
index 68163c17..cda147d9 100644
--- a/bower_components/bootstrap/js/tooltip.js
+++ b/bower_components/bootstrap/js/tooltip.js
@@ -1,5 +1,5 @@
/* ========================================================================
- * 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
* ========================================================================
@@ -25,7 +25,7 @@
this.init('tooltip', element, options)
}
- Tooltip.VERSION = '3.3.0'
+ Tooltip.VERSION = '3.3.1'
Tooltip.TRANSITION_DURATION = 150
diff --git a/bower_components/bootstrap/js/transition.js b/bower_components/bootstrap/js/transition.js
index 81993834..68c2bd60 100644
--- a/bower_components/bootstrap/js/transition.js
+++ b/bower_components/bootstrap/js/transition.js
@@ -1,5 +1,5 @@
/* ========================================================================
- * Bootstrap: transition.js v3.3.0
+ * Bootstrap: transition.js v3.3.1
* http://getbootstrap.com/javascript/#transitions
* ========================================================================
* Copyright 2011-2014 Twitter, Inc.