summaryrefslogtreecommitdiff
path: root/bower_components/bootstrap/dist/js/bootstrap.js
diff options
context:
space:
mode:
Diffstat (limited to 'bower_components/bootstrap/dist/js/bootstrap.js')
-rw-r--r--bower_components/bootstrap/dist/js/bootstrap.js124
1 files changed, 55 insertions, 69 deletions
diff --git a/bower_components/bootstrap/dist/js/bootstrap.js b/bower_components/bootstrap/dist/js/bootstrap.js
index b6ac8d99..4139b6fc 100644
--- a/bower_components/bootstrap/dist/js/bootstrap.js
+++ b/bower_components/bootstrap/dist/js/bootstrap.js
@@ -1,6 +1,6 @@
/*!
- * Bootstrap v3.3.1 (http://getbootstrap.com)
- * Copyright 2011-2014 Twitter, Inc.
+ * Bootstrap v3.3.2 (http://getbootstrap.com)
+ * Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
@@ -9,6 +9,7 @@ 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)) {
throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher')
@@ -16,10 +17,10 @@ if (typeof jQuery === 'undefined') {
}(jQuery);
/* ========================================================================
- * Bootstrap: transition.js v3.3.1
+ * Bootstrap: transition.js v3.3.2
* http://getbootstrap.com/javascript/#transitions
* ========================================================================
- * Copyright 2011-2014 Twitter, Inc.
+ * Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
@@ -76,10 +77,10 @@ if (typeof jQuery === 'undefined') {
}(jQuery);
/* ========================================================================
- * Bootstrap: alert.js v3.3.1
+ * Bootstrap: alert.js v3.3.2
* http://getbootstrap.com/javascript/#alerts
* ========================================================================
- * Copyright 2011-2014 Twitter, Inc.
+ * Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
@@ -95,7 +96,7 @@ if (typeof jQuery === 'undefined') {
$(el).on('click', dismiss, this.close)
}
- Alert.VERSION = '3.3.1'
+ Alert.VERSION = '3.3.2'
Alert.TRANSITION_DURATION = 150
@@ -171,10 +172,10 @@ if (typeof jQuery === 'undefined') {
}(jQuery);
/* ========================================================================
- * Bootstrap: button.js v3.3.1
+ * Bootstrap: button.js v3.3.2
* http://getbootstrap.com/javascript/#buttons
* ========================================================================
- * Copyright 2011-2014 Twitter, Inc.
+ * Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
@@ -191,7 +192,7 @@ if (typeof jQuery === 'undefined') {
this.isLoading = false
}
- Button.VERSION = '3.3.1'
+ Button.VERSION = '3.3.2'
Button.DEFAULTS = {
loadingText: 'loading...'
@@ -288,10 +289,10 @@ if (typeof jQuery === 'undefined') {
}(jQuery);
/* ========================================================================
- * Bootstrap: carousel.js v3.3.1
+ * Bootstrap: carousel.js v3.3.2
* http://getbootstrap.com/javascript/#carousel
* ========================================================================
- * Copyright 2011-2014 Twitter, Inc.
+ * Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
@@ -319,7 +320,7 @@ if (typeof jQuery === 'undefined') {
.on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
}
- Carousel.VERSION = '3.3.1'
+ Carousel.VERSION = '3.3.2'
Carousel.TRANSITION_DURATION = 600
@@ -359,8 +360,11 @@ if (typeof jQuery === 'undefined') {
}
Carousel.prototype.getItemForDirection = function (direction, active) {
- var delta = direction == 'prev' ? -1 : 1
var activeIndex = this.getItemIndex(active)
+ var willWrap = (direction == 'prev' && activeIndex === 0)
+ || (direction == 'next' && activeIndex == (this.$items.length - 1))
+ if (willWrap && !this.options.wrap) return active
+ var delta = direction == 'prev' ? -1 : 1
var itemIndex = (activeIndex + delta) % this.$items.length
return this.$items.eq(itemIndex)
}
@@ -405,14 +409,8 @@ if (typeof jQuery === 'undefined') {
var $next = next || this.getItemForDirection(type, $active)
var isCycling = this.interval
var direction = type == 'next' ? 'left' : 'right'
- var fallback = type == 'next' ? 'first' : 'last'
var that = this
- if (!$next.length) {
- if (!this.options.wrap) return
- $next = this.$element.find('.item')[fallback]()
- }
-
if ($next.hasClass('active')) return (this.sliding = false)
var relatedTarget = $next[0]
@@ -529,10 +527,10 @@ if (typeof jQuery === 'undefined') {
}(jQuery);
/* ========================================================================
- * Bootstrap: collapse.js v3.3.1
+ * Bootstrap: collapse.js v3.3.2
* http://getbootstrap.com/javascript/#collapse
* ========================================================================
- * Copyright 2011-2014 Twitter, Inc.
+ * Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
@@ -558,7 +556,7 @@ if (typeof jQuery === 'undefined') {
if (this.options.toggle) this.toggle()
}
- Collapse.VERSION = '3.3.1'
+ Collapse.VERSION = '3.3.2'
Collapse.TRANSITION_DURATION = 350
@@ -576,7 +574,7 @@ if (typeof jQuery === 'undefined') {
if (this.transitioning || this.$element.hasClass('in')) return
var activesData
- var actives = this.$parent && this.$parent.find('> .panel').children('.in, .collapsing')
+ var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing')
if (actives && actives.length) {
activesData = actives.data('bs.collapse')
@@ -741,10 +739,10 @@ if (typeof jQuery === 'undefined') {
}(jQuery);
/* ========================================================================
- * Bootstrap: dropdown.js v3.3.1
+ * Bootstrap: dropdown.js v3.3.2
* http://getbootstrap.com/javascript/#dropdowns
* ========================================================================
- * Copyright 2011-2014 Twitter, Inc.
+ * Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
@@ -761,7 +759,7 @@ if (typeof jQuery === 'undefined') {
$(element).on('click.bs.dropdown', this.toggle)
}
- Dropdown.VERSION = '3.3.1'
+ Dropdown.VERSION = '3.3.2'
Dropdown.prototype.toggle = function (e) {
var $this = $(this)
@@ -903,10 +901,10 @@ if (typeof jQuery === 'undefined') {
}(jQuery);
/* ========================================================================
- * Bootstrap: modal.js v3.3.1
+ * Bootstrap: modal.js v3.3.2
* http://getbootstrap.com/javascript/#modals
* ========================================================================
- * Copyright 2011-2014 Twitter, Inc.
+ * Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
@@ -934,7 +932,7 @@ if (typeof jQuery === 'undefined') {
}
}
- Modal.VERSION = '3.3.1'
+ Modal.VERSION = '3.3.2'
Modal.TRANSITION_DURATION = 300
Modal.BACKDROP_TRANSITION_DURATION = 150
@@ -1228,11 +1226,11 @@ if (typeof jQuery === 'undefined') {
}(jQuery);
/* ========================================================================
- * Bootstrap: tooltip.js v3.3.1
+ * Bootstrap: tooltip.js v3.3.2
* http://getbootstrap.com/javascript/#tooltip
* Inspired by the original jQuery.tipsy by Jason Frame
* ========================================================================
- * Copyright 2011-2014 Twitter, Inc.
+ * Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
@@ -1254,7 +1252,7 @@ if (typeof jQuery === 'undefined') {
this.init('tooltip', element, options)
}
- Tooltip.VERSION = '3.3.1'
+ Tooltip.VERSION = '3.3.2'
Tooltip.TRANSITION_DURATION = 150
@@ -1575,10 +1573,10 @@ if (typeof jQuery === 'undefined') {
}
Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
- return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } :
- placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :
+ return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } :
+ placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :
placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :
- /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }
+ /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }
}
@@ -1674,18 +1672,12 @@ if (typeof jQuery === 'undefined') {
function Plugin(option) {
return this.each(function () {
- var $this = $(this)
- var data = $this.data('bs.tooltip')
- var options = typeof option == 'object' && option
- var selector = options && options.selector
+ var $this = $(this)
+ var data = $this.data('bs.tooltip')
+ var options = typeof option == 'object' && option
if (!data && option == 'destroy') return
- if (selector) {
- if (!data) $this.data('bs.tooltip', (data = {}))
- if (!data[selector]) data[selector] = new Tooltip(this, options)
- } else {
- if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))
- }
+ if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))
if (typeof option == 'string') data[option]()
})
}
@@ -1707,10 +1699,10 @@ if (typeof jQuery === 'undefined') {
}(jQuery);
/* ========================================================================
- * Bootstrap: popover.js v3.3.1
+ * Bootstrap: popover.js v3.3.2
* http://getbootstrap.com/javascript/#popovers
* ========================================================================
- * Copyright 2011-2014 Twitter, Inc.
+ * Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
@@ -1727,7 +1719,7 @@ if (typeof jQuery === 'undefined') {
if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
- Popover.VERSION = '3.3.1'
+ Popover.VERSION = '3.3.2'
Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
placement: 'right',
@@ -1794,18 +1786,12 @@ if (typeof jQuery === 'undefined') {
function Plugin(option) {
return this.each(function () {
- var $this = $(this)
- var data = $this.data('bs.popover')
- var options = typeof option == 'object' && option
- var selector = options && options.selector
+ var $this = $(this)
+ var data = $this.data('bs.popover')
+ var options = typeof option == 'object' && option
if (!data && option == 'destroy') return
- if (selector) {
- if (!data) $this.data('bs.popover', (data = {}))
- if (!data[selector]) data[selector] = new Popover(this, options)
- } else {
- if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
- }
+ if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
if (typeof option == 'string') data[option]()
})
}
@@ -1827,10 +1813,10 @@ if (typeof jQuery === 'undefined') {
}(jQuery);
/* ========================================================================
- * Bootstrap: scrollspy.js v3.3.1
+ * Bootstrap: scrollspy.js v3.3.2
* http://getbootstrap.com/javascript/#scrollspy
* ========================================================================
- * Copyright 2011-2014 Twitter, Inc.
+ * Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
@@ -1858,7 +1844,7 @@ if (typeof jQuery === 'undefined') {
this.process()
}
- ScrollSpy.VERSION = '3.3.1'
+ ScrollSpy.VERSION = '3.3.2'
ScrollSpy.DEFAULTS = {
offset: 10
@@ -2003,10 +1989,10 @@ if (typeof jQuery === 'undefined') {
}(jQuery);
/* ========================================================================
- * Bootstrap: tab.js v3.3.1
+ * Bootstrap: tab.js v3.3.2
* http://getbootstrap.com/javascript/#tabs
* ========================================================================
- * Copyright 2011-2014 Twitter, Inc.
+ * Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
@@ -2021,7 +2007,7 @@ if (typeof jQuery === 'undefined') {
this.element = $(element)
}
- Tab.VERSION = '3.3.1'
+ Tab.VERSION = '3.3.2'
Tab.TRANSITION_DURATION = 150
@@ -2157,10 +2143,10 @@ if (typeof jQuery === 'undefined') {
}(jQuery);
/* ========================================================================
- * Bootstrap: affix.js v3.3.1
+ * Bootstrap: affix.js v3.3.2
* http://getbootstrap.com/javascript/#affix
* ========================================================================
- * Copyright 2011-2014 Twitter, Inc.
+ * Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
@@ -2186,7 +2172,7 @@ if (typeof jQuery === 'undefined') {
this.checkPosition()
}
- Affix.VERSION = '3.3.1'
+ Affix.VERSION = '3.3.2'
Affix.RESET = 'affix affix-top affix-bottom'
@@ -2211,7 +2197,7 @@ if (typeof jQuery === 'undefined') {
var colliderTop = initializing ? scrollTop : position.top
var colliderHeight = initializing ? targetHeight : height
- if (offsetTop != null && colliderTop <= offsetTop) return 'top'
+ if (offsetTop != null && scrollTop <= offsetTop) return 'top'
if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom'
return false