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.js57
-rw-r--r--bower_components/bootstrap/js/alert.js20
-rw-r--r--bower_components/bootstrap/js/button.js50
-rw-r--r--bower_components/bootstrap/js/carousel.js44
-rw-r--r--bower_components/bootstrap/js/collapse.js23
-rw-r--r--bower_components/bootstrap/js/dropdown.js45
-rw-r--r--bower_components/bootstrap/js/modal.js53
-rw-r--r--bower_components/bootstrap/js/popover.js35
-rw-r--r--bower_components/bootstrap/js/scrollspy.js37
-rw-r--r--bower_components/bootstrap/js/tab.js24
-rw-r--r--bower_components/bootstrap/js/tooltip.js91
-rw-r--r--bower_components/bootstrap/js/transition.js30
12 files changed, 227 insertions, 282 deletions
diff --git a/bower_components/bootstrap/js/affix.js b/bower_components/bootstrap/js/affix.js
index 552bffa3..d447b094 100644
--- a/bower_components/bootstrap/js/affix.js
+++ b/bower_components/bootstrap/js/affix.js
@@ -1,24 +1,14 @@
/* ========================================================================
- * Bootstrap: affix.js v3.0.3
+ * Bootstrap: affix.js v3.1.0
* http://getbootstrap.com/javascript/#affix
* ========================================================================
- * Copyright 2013 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
-+function ($) { "use strict";
++function ($) {
+ 'use strict';
// AFFIX CLASS DEFINITION
// ======================
@@ -29,9 +19,10 @@
.on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))
.on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this))
- this.$element = $(element)
- this.affixed =
- this.unpin = null
+ this.$element = $(element)
+ this.affixed =
+ this.unpin =
+ this.pinnedOffset = null
this.checkPosition()
}
@@ -42,6 +33,14 @@
offset: 0
}
+ Affix.prototype.getPinnedOffset = function () {
+ if (this.pinnedOffset) return this.pinnedOffset
+ this.$element.removeClass(Affix.RESET).addClass('affix')
+ var scrollTop = this.$window.scrollTop()
+ var position = this.$element.offset()
+ return (this.pinnedOffset = position.top - scrollTop)
+ }
+
Affix.prototype.checkPositionWithEventLoop = function () {
setTimeout($.proxy(this.checkPosition, this), 1)
}
@@ -56,9 +55,11 @@
var offsetTop = offset.top
var offsetBottom = offset.bottom
+ if (this.affixed == 'top') position.top += scrollTop
+
if (typeof offset != 'object') offsetBottom = offsetTop = offset
- if (typeof offsetTop == 'function') offsetTop = offset.top()
- if (typeof offsetBottom == 'function') offsetBottom = offset.bottom()
+ if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element)
+ if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element)
var affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ? false :
offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ? 'bottom' :
@@ -67,13 +68,23 @@
if (this.affixed === affix) return
if (this.unpin) this.$element.css('top', '')
+ var affixType = 'affix' + (affix ? '-' + affix : '')
+ var e = $.Event(affixType + '.bs.affix')
+
+ this.$element.trigger(e)
+
+ if (e.isDefaultPrevented()) return
+
this.affixed = affix
- this.unpin = affix == 'bottom' ? position.top - scrollTop : null
+ this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null
- this.$element.removeClass(Affix.RESET).addClass('affix' + (affix ? '-' + affix : ''))
+ this.$element
+ .removeClass(Affix.RESET)
+ .addClass(affixType)
+ .trigger($.Event(affixType.replace('affix', 'affixed')))
if (affix == 'bottom') {
- this.$element.offset({ top: document.body.offsetHeight - offsetBottom - this.$element.height() })
+ this.$element.offset({ top: scrollHeight - offsetBottom - this.$element.height() })
}
}
diff --git a/bower_components/bootstrap/js/alert.js b/bower_components/bootstrap/js/alert.js
index 695ad74d..1c0756a9 100644
--- a/bower_components/bootstrap/js/alert.js
+++ b/bower_components/bootstrap/js/alert.js
@@ -1,24 +1,14 @@
/* ========================================================================
- * Bootstrap: alert.js v3.0.3
+ * Bootstrap: alert.js v3.1.0
* http://getbootstrap.com/javascript/#alerts
* ========================================================================
- * Copyright 2013 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
-+function ($) { "use strict";
++function ($) {
+ 'use strict';
// ALERT CLASS DEFINITION
// ======================
diff --git a/bower_components/bootstrap/js/button.js b/bower_components/bootstrap/js/button.js
index c9fdde5e..2be72d53 100644
--- a/bower_components/bootstrap/js/button.js
+++ b/bower_components/bootstrap/js/button.js
@@ -1,31 +1,22 @@
/* ========================================================================
- * Bootstrap: button.js v3.0.3
+ * Bootstrap: button.js v3.1.0
* http://getbootstrap.com/javascript/#buttons
* ========================================================================
- * Copyright 2013 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
-+function ($) { "use strict";
++function ($) {
+ 'use strict';
// BUTTON PUBLIC CLASS DEFINITION
// ==============================
var Button = function (element, options) {
- this.$element = $(element)
- this.options = $.extend({}, Button.DEFAULTS, options)
+ this.$element = $(element)
+ this.options = $.extend({}, Button.DEFAULTS, options)
+ this.isLoading = false
}
Button.DEFAULTS = {
@@ -45,25 +36,26 @@
$el[val](data[state] || this.options[state])
// push to event loop to allow forms to submit
- setTimeout(function () {
- state == 'loadingText' ?
- $el.addClass(d).attr(d, d) :
- $el.removeClass(d).removeAttr(d);
- }, 0)
+ setTimeout($.proxy(function () {
+ if (state == 'loadingText') {
+ this.isLoading = true
+ $el.addClass(d).attr(d, d)
+ } else if (this.isLoading) {
+ this.isLoading = false
+ $el.removeClass(d).removeAttr(d)
+ }
+ }, this), 0)
}
Button.prototype.toggle = function () {
- var $parent = this.$element.closest('[data-toggle="buttons"]')
var changed = true
+ var $parent = this.$element.closest('[data-toggle="buttons"]')
if ($parent.length) {
var $input = this.$element.find('input')
- if ($input.prop('type') === 'radio') {
- // see if clicking on current one
- if ($input.prop('checked') && this.$element.hasClass('active'))
- changed = false
- else
- $parent.find('.active').removeClass('active')
+ if ($input.prop('type') == 'radio') {
+ if ($input.prop('checked') && this.$element.hasClass('active')) changed = false
+ else $parent.find('.active').removeClass('active')
}
if (changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change')
}
diff --git a/bower_components/bootstrap/js/carousel.js b/bower_components/bootstrap/js/carousel.js
index 6391a36d..88c9b23d 100644
--- a/bower_components/bootstrap/js/carousel.js
+++ b/bower_components/bootstrap/js/carousel.js
@@ -1,24 +1,14 @@
/* ========================================================================
- * Bootstrap: carousel.js v3.0.3
+ * Bootstrap: carousel.js v3.1.0
* http://getbootstrap.com/javascript/#carousel
* ========================================================================
- * Copyright 2013 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
-+function ($) { "use strict";
++function ($) {
+ 'use strict';
// CAROUSEL CLASS DEFINITION
// =========================
@@ -39,9 +29,9 @@
}
Carousel.DEFAULTS = {
- interval: 5000
- , pause: 'hover'
- , wrap: true
+ interval: 5000,
+ pause: 'hover',
+ wrap: true
}
Carousel.prototype.cycle = function (e) {
@@ -78,7 +68,7 @@
Carousel.prototype.pause = function (e) {
e || (this.paused = true)
- if (this.$element.find('.next, .prev').length && $.support.transition.end) {
+ if (this.$element.find('.next, .prev').length && $.support.transition) {
this.$element.trigger($.support.transition.end)
this.cycle(true)
}
@@ -111,13 +101,15 @@
$next = this.$element.find('.item')[fallback]()
}
- this.sliding = true
-
- isCycling && this.pause()
+ if ($next.hasClass('active')) return this.sliding = false
var e = $.Event('slide.bs.carousel', { relatedTarget: $next[0], direction: direction })
+ this.$element.trigger(e)
+ if (e.isDefaultPrevented()) return
- if ($next.hasClass('active')) return
+ this.sliding = true
+
+ isCycling && this.pause()
if (this.$indicators.length) {
this.$indicators.find('.active').removeClass('active')
@@ -128,8 +120,6 @@
}
if ($.support.transition && this.$element.hasClass('slide')) {
- this.$element.trigger(e)
- if (e.isDefaultPrevented()) return
$next.addClass(type)
$next[0].offsetWidth // force reflow
$active.addClass(direction)
@@ -141,10 +131,8 @@
that.sliding = false
setTimeout(function () { that.$element.trigger('slid.bs.carousel') }, 0)
})
- .emulateTransitionEnd(600)
+ .emulateTransitionEnd($active.css('transition-duration').slice(0, -1) * 1000)
} else {
- this.$element.trigger(e)
- if (e.isDefaultPrevented()) return
$active.removeClass('active')
$next.addClass('active')
this.sliding = false
diff --git a/bower_components/bootstrap/js/collapse.js b/bower_components/bootstrap/js/collapse.js
index 1a079938..1abafd6a 100644
--- a/bower_components/bootstrap/js/collapse.js
+++ b/bower_components/bootstrap/js/collapse.js
@@ -1,24 +1,14 @@
/* ========================================================================
- * Bootstrap: collapse.js v3.0.3
+ * Bootstrap: collapse.js v3.1.0
* http://getbootstrap.com/javascript/#collapse
* ========================================================================
- * Copyright 2013 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
-+function ($) { "use strict";
++function ($) {
+ 'use strict';
// COLLAPSE PUBLIC CLASS DEFINITION
// ================================
@@ -69,7 +59,7 @@
var complete = function () {
this.$element
.removeClass('collapsing')
- .addClass('in')
+ .addClass('collapse in')
[dimension]('auto')
this.transitioning = 0
this.$element.trigger('shown.bs.collapse')
@@ -137,6 +127,7 @@
var data = $this.data('bs.collapse')
var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
+ if (!data && options.toggle && option == 'show') option = !option
if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
if (typeof option == 'string') data[option]()
})
diff --git a/bower_components/bootstrap/js/dropdown.js b/bower_components/bootstrap/js/dropdown.js
index 13352ef7..9c13aac9 100644
--- a/bower_components/bootstrap/js/dropdown.js
+++ b/bower_components/bootstrap/js/dropdown.js
@@ -1,24 +1,14 @@
/* ========================================================================
- * Bootstrap: dropdown.js v3.0.3
+ * Bootstrap: dropdown.js v3.1.0
* http://getbootstrap.com/javascript/#dropdowns
* ========================================================================
- * Copyright 2013 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
-+function ($) { "use strict";
++function ($) {
+ 'use strict';
// DROPDOWN CLASS DEFINITION
// =========================
@@ -45,13 +35,14 @@
$('<div class="dropdown-backdrop"/>').insertAfter($(this)).on('click', clearMenus)
}
- $parent.trigger(e = $.Event('show.bs.dropdown'))
+ var relatedTarget = { relatedTarget: this }
+ $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget))
if (e.isDefaultPrevented()) return
$parent
.toggleClass('open')
- .trigger('shown.bs.dropdown')
+ .trigger('shown.bs.dropdown', relatedTarget)
$this.focus()
}
@@ -77,7 +68,8 @@
return $this.click()
}
- var $items = $('[role=menu] li:not(.divider):visible a', $parent)
+ var desc = ' li:not(.divider):visible a'
+ var $items = $parent.find('[role=menu]' + desc + ', [role=listbox]' + desc)
if (!$items.length) return
@@ -85,19 +77,20 @@
if (e.keyCode == 38 && index > 0) index-- // up
if (e.keyCode == 40 && index < $items.length - 1) index++ // down
- if (!~index) index=0
+ if (!~index) index = 0
$items.eq(index).focus()
}
- function clearMenus() {
+ function clearMenus(e) {
$(backdrop).remove()
- $(toggle).each(function (e) {
+ $(toggle).each(function () {
var $parent = getParent($(this))
+ var relatedTarget = { relatedTarget: this }
if (!$parent.hasClass('open')) return
- $parent.trigger(e = $.Event('hide.bs.dropdown'))
+ $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))
if (e.isDefaultPrevented()) return
- $parent.removeClass('open').trigger('hidden.bs.dropdown')
+ $parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget)
})
}
@@ -106,7 +99,7 @@
if (!selector) {
selector = $this.attr('href')
- selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
+ selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
}
var $parent = selector && $(selector)
@@ -148,7 +141,7 @@
$(document)
.on('click.bs.dropdown.data-api', clearMenus)
.on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
- .on('click.bs.dropdown.data-api' , toggle, Dropdown.prototype.toggle)
- .on('keydown.bs.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
+ .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)
+ .on('keydown.bs.dropdown.data-api', toggle + ', [role=menu], [role=listbox]', Dropdown.prototype.keydown)
}(jQuery);
diff --git a/bower_components/bootstrap/js/modal.js b/bower_components/bootstrap/js/modal.js
index 3ead5ee8..24506ea2 100644
--- a/bower_components/bootstrap/js/modal.js
+++ b/bower_components/bootstrap/js/modal.js
@@ -1,24 +1,14 @@
/* ========================================================================
- * Bootstrap: modal.js v3.0.3
+ * Bootstrap: modal.js v3.1.0
* http://getbootstrap.com/javascript/#modals
* ========================================================================
- * Copyright 2013 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
-+function ($) { "use strict";
++function ($) {
+ 'use strict';
// MODAL CLASS DEFINITION
// ======================
@@ -29,13 +19,19 @@
this.$backdrop =
this.isShown = null
- if (this.options.remote) this.$element.load(this.options.remote)
+ if (this.options.remote) {
+ this.$element
+ .find('.modal-content')
+ .load(this.options.remote, $.proxy(function () {
+ this.$element.trigger('loaded.bs.modal')
+ }, this))
+ }
}
Modal.DEFAULTS = {
- backdrop: true
- , keyboard: true
- , show: true
+ backdrop: true,
+ keyboard: true,
+ show: true
}
Modal.prototype.toggle = function (_relatedTarget) {
@@ -54,7 +50,7 @@
this.escape()
- this.$element.on('click.dismiss.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
+ this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
this.backdrop(function () {
var transition = $.support.transition && that.$element.hasClass('fade')
@@ -63,7 +59,9 @@
that.$element.appendTo(document.body) // don't move modals dom position
}
- that.$element.show()
+ that.$element
+ .show()
+ .scrollTop(0)
if (transition) {
that.$element[0].offsetWidth // force reflow
@@ -105,7 +103,7 @@
this.$element
.removeClass('in')
.attr('aria-hidden', true)
- .off('click.dismiss.modal')
+ .off('click.dismiss.bs.modal')
$.support.transition && this.$element.hasClass('fade') ?
this.$element
@@ -149,7 +147,6 @@
}
Modal.prototype.backdrop = function (callback) {
- var that = this
var animate = this.$element.hasClass('fade') ? 'fade' : ''
if (this.isShown && this.options.backdrop) {
@@ -158,7 +155,7 @@
this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
.appendTo(document.body)
- this.$element.on('click.dismiss.modal', $.proxy(function (e) {
+ this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {
if (e.target !== e.currentTarget) return
this.options.backdrop == 'static'
? this.$element[0].focus.call(this.$element[0])
@@ -180,7 +177,7 @@
} else if (!this.isShown && this.$backdrop) {
this.$backdrop.removeClass('in')
- $.support.transition && this.$element.hasClass('fade')?
+ $.support.transition && this.$element.hasClass('fade') ?
this.$backdrop
.one($.support.transition.end, callback)
.emulateTransitionEnd(150) :
@@ -228,9 +225,9 @@
var $this = $(this)
var href = $this.attr('href')
var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
- var option = $target.data('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())
- e.preventDefault()
+ if ($this.is('a')) e.preventDefault()
$target
.modal(option, this)
@@ -240,7 +237,7 @@
})
$(document)
- .on('show.bs.modal', '.modal', function () { $(document.body).addClass('modal-open') })
+ .on('show.bs.modal', '.modal', function () { $(document.body).addClass('modal-open') })
.on('hidden.bs.modal', '.modal', function () { $(document.body).removeClass('modal-open') })
}(jQuery);
diff --git a/bower_components/bootstrap/js/popover.js b/bower_components/bootstrap/js/popover.js
index 996962aa..193cf06f 100644
--- a/bower_components/bootstrap/js/popover.js
+++ b/bower_components/bootstrap/js/popover.js
@@ -1,24 +1,14 @@
/* ========================================================================
- * Bootstrap: popover.js v3.0.3
+ * Bootstrap: popover.js v3.1.0
* http://getbootstrap.com/javascript/#popovers
* ========================================================================
- * Copyright 2013 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
-+function ($) { "use strict";
++function ($) {
+ 'use strict';
// POPOVER PUBLIC CLASS DEFINITION
// ===============================
@@ -29,11 +19,11 @@
if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
- Popover.DEFAULTS = $.extend({} , $.fn.tooltip.Constructor.DEFAULTS, {
- placement: 'right'
- , trigger: 'click'
- , content: ''
- , template: '<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
+ Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
+ placement: 'right',
+ trigger: 'click',
+ content: '',
+ template: '<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
})
@@ -54,7 +44,9 @@
var content = this.getContent()
$tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
- $tip.find('.popover-content')[this.options.html ? 'html' : 'text'](content)
+ $tip.find('.popover-content')[ // we use append for html objects to maintain js events
+ this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text'
+ ](content)
$tip.removeClass('fade top bottom left right in')
@@ -98,6 +90,7 @@
var data = $this.data('bs.popover')
var options = typeof option == 'object' && option
+ if (!data && option == 'destroy') return
if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
if (typeof option == 'string') data[option]()
})
diff --git a/bower_components/bootstrap/js/scrollspy.js b/bower_components/bootstrap/js/scrollspy.js
index 2efe14fd..04958a58 100644
--- a/bower_components/bootstrap/js/scrollspy.js
+++ b/bower_components/bootstrap/js/scrollspy.js
@@ -1,24 +1,14 @@
/* ========================================================================
- * Bootstrap: scrollspy.js v3.0.3
+ * Bootstrap: scrollspy.js v3.1.0
* http://getbootstrap.com/javascript/#scrollspy
* ========================================================================
- * Copyright 2013 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
-+function ($) { "use strict";
++function ($) {
+ 'use strict';
// SCROLLSPY CLASS DEFINITION
// ==========================
@@ -58,10 +48,11 @@
.map(function () {
var $el = $(this)
var href = $el.data('target') || $el.attr('href')
- var $href = /^#\w/.test(href) && $(href)
+ var $href = /^#./.test(href) && $(href)
return ($href
&& $href.length
+ && $href.is(':visible')
&& [[ $href[offsetMethod]().top + (!$.isWindow(self.$scrollElement.get(0)) && self.$scrollElement.scrollTop()), href ]]) || null
})
.sort(function (a, b) { return a[0] - b[0] })
@@ -84,6 +75,10 @@
return activeTarget != (i = targets.last()[0]) && this.activate(i)
}
+ if (activeTarget && scrollTop <= offsets[0]) {
+ return activeTarget != (i = targets[0]) && this.activate(i)
+ }
+
for (i = offsets.length; i--;) {
activeTarget != targets[i]
&& scrollTop >= offsets[i]
@@ -96,18 +91,18 @@
this.activeTarget = target
$(this.selector)
- .parents('.active')
+ .parentsUntil(this.options.target, '.active')
.removeClass('active')
- var selector = this.selector
- + '[data-target="' + target + '"],'
- + this.selector + '[href="' + target + '"]'
+ var selector = this.selector +
+ '[data-target="' + target + '"],' +
+ this.selector + '[href="' + target + '"]'
var active = $(selector)
.parents('li')
.addClass('active')
- if (active.parent('.dropdown-menu').length) {
+ if (active.parent('.dropdown-menu').length) {
active = active
.closest('li.dropdown')
.addClass('active')
diff --git a/bower_components/bootstrap/js/tab.js b/bower_components/bootstrap/js/tab.js
index 6b0f5f67..6f0fd455 100644
--- a/bower_components/bootstrap/js/tab.js
+++ b/bower_components/bootstrap/js/tab.js
@@ -1,24 +1,14 @@
/* ========================================================================
- * Bootstrap: tab.js v3.0.3
+ * Bootstrap: tab.js v3.1.0
* http://getbootstrap.com/javascript/#tabs
* ========================================================================
- * Copyright 2013 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
-+function ($) { "use strict";
++function ($) {
+ 'use strict';
// TAB CLASS DEFINITION
// ====================
@@ -53,8 +43,8 @@
this.activate($this.parent('li'), $ul)
this.activate($target, $target.parent(), function () {
$this.trigger({
- type: 'shown.bs.tab'
- , relatedTarget: previous
+ type: 'shown.bs.tab',
+ relatedTarget: previous
})
})
}
diff --git a/bower_components/bootstrap/js/tooltip.js b/bower_components/bootstrap/js/tooltip.js
index 4c848f0e..6cf2b0f8 100644
--- a/bower_components/bootstrap/js/tooltip.js
+++ b/bower_components/bootstrap/js/tooltip.js
@@ -1,25 +1,15 @@
/* ========================================================================
- * Bootstrap: tooltip.js v3.0.3
+ * Bootstrap: tooltip.js v3.1.0
* http://getbootstrap.com/javascript/#tooltip
* Inspired by the original jQuery.tipsy by Jason Frame
* ========================================================================
- * Copyright 2013 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
-+function ($) { "use strict";
++function ($) {
+ 'use strict';
// TOOLTIP PUBLIC CLASS DEFINITION
// ===============================
@@ -36,15 +26,15 @@
}
Tooltip.DEFAULTS = {
- animation: true
- , placement: 'top'
- , selector: false
- , template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'
- , trigger: 'hover focus'
- , title: ''
- , delay: 0
- , html: false
- , container: false
+ animation: true,
+ placement: 'top',
+ selector: false,
+ template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',
+ trigger: 'hover focus',
+ title: '',
+ delay: 0,
+ html: false,
+ container: false
}
Tooltip.prototype.init = function (type, element, options) {
@@ -61,8 +51,8 @@
if (trigger == 'click') {
this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
} else if (trigger != 'manual') {
- var eventIn = trigger == 'hover' ? 'mouseenter' : 'focus'
- var eventOut = trigger == 'hover' ? 'mouseleave' : 'blur'
+ var eventIn = trigger == 'hover' ? 'mouseenter' : 'focusin'
+ var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout'
this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
@@ -83,8 +73,8 @@
if (options.delay && typeof options.delay == 'number') {
options.delay = {
- show: options.delay
- , hide: options.delay
+ show: options.delay,
+ hide: options.delay
}
}
@@ -133,12 +123,13 @@
}
Tooltip.prototype.show = function () {
- var e = $.Event('show.bs.'+ this.type)
+ var e = $.Event('show.bs.' + this.type)
if (this.hasContent() && this.enabled) {
this.$element.trigger(e)
if (e.isDefaultPrevented()) return
+ var that = this;
var $tip = this.tip()
@@ -188,11 +179,21 @@
var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)
this.applyPlacement(calculatedOffset, placement)
- this.$element.trigger('shown.bs.' + this.type)
+ this.hoverState = null
+
+ var complete = function() {
+ that.$element.trigger('shown.bs.' + that.type)
+ }
+
+ $.support.transition && this.$tip.hasClass('fade') ?
+ $tip
+ .one($.support.transition.end, complete)
+ .emulateTransitionEnd(150) :
+ complete()
}
}
- Tooltip.prototype.applyPlacement = function(offset, placement) {
+ Tooltip.prototype.applyPlacement = function (offset, placement) {
var replace
var $tip = this.tip()
var width = $tip[0].offsetWidth
@@ -209,9 +210,18 @@
offset.top = offset.top + marginTop
offset.left = offset.left + marginLeft
- $tip
- .offset(offset)
- .addClass('in')
+ // $.fn.offset doesn't round pixel values
+ // so we use setOffset directly with our own function B-0
+ $.offset.setOffset($tip[0], $.extend({
+ using: function (props) {
+ $tip.css({
+ top: Math.round(props.top),
+ left: Math.round(props.left)
+ })
+ }
+ }, offset), 0)
+
+ $tip.addClass('in')
// check to see if placing tip in new offset caused the tip to resize itself
var actualWidth = $tip[0].offsetWidth
@@ -243,8 +253,8 @@
if (replace) $tip.offset(offset)
}
- Tooltip.prototype.replaceArrow = function(delta, dimension, position) {
- this.arrow().css(position, delta ? (50 * (1 - delta / dimension) + "%") : '')
+ Tooltip.prototype.replaceArrow = function (delta, dimension, position) {
+ this.arrow().css(position, delta ? (50 * (1 - delta / dimension) + '%') : '')
}
Tooltip.prototype.setContent = function () {
@@ -262,6 +272,7 @@
function complete() {
if (that.hoverState != 'in') $tip.detach()
+ that.$element.trigger('hidden.bs.' + that.type)
}
this.$element.trigger(e)
@@ -276,7 +287,7 @@
.emulateTransitionEnd(150) :
complete()
- this.$element.trigger('hidden.bs.' + this.type)
+ this.hoverState = null
return this
}
@@ -295,8 +306,8 @@
Tooltip.prototype.getPosition = function () {
var el = this.$element[0]
return $.extend({}, (typeof el.getBoundingClientRect == 'function') ? el.getBoundingClientRect() : {
- width: el.offsetWidth
- , height: el.offsetHeight
+ width: el.offsetWidth,
+ height: el.offsetHeight
}, this.$element.offset())
}
@@ -352,6 +363,7 @@
}
Tooltip.prototype.destroy = function () {
+ clearTimeout(this.timeout)
this.hide().$element.off('.' + this.type).removeData('bs.' + this.type)
}
@@ -367,6 +379,7 @@
var data = $this.data('bs.tooltip')
var options = typeof option == 'object' && option
+ if (!data && option == 'destroy') return
if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))
if (typeof option == 'string') data[option]()
})
diff --git a/bower_components/bootstrap/js/transition.js b/bower_components/bootstrap/js/transition.js
index 773dbe69..0bcbdcd4 100644
--- a/bower_components/bootstrap/js/transition.js
+++ b/bower_components/bootstrap/js/transition.js
@@ -1,24 +1,14 @@
/* ========================================================================
- * Bootstrap: transition.js v3.0.3
+ * Bootstrap: transition.js v3.1.0
* http://getbootstrap.com/javascript/#transitions
* ========================================================================
- * Copyright 2013 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
-+function ($) { "use strict";
++function ($) {
+ 'use strict';
// CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
// ============================================================
@@ -27,10 +17,10 @@
var el = document.createElement('bootstrap')
var transEndEventNames = {
- 'WebkitTransition' : 'webkitTransitionEnd'
- , 'MozTransition' : 'transitionend'
- , 'OTransition' : 'oTransitionEnd otransitionend'
- , 'transition' : 'transitionend'
+ 'WebkitTransition' : 'webkitTransitionEnd',
+ 'MozTransition' : 'transitionend',
+ 'OTransition' : 'oTransitionEnd otransitionend',
+ 'transition' : 'transitionend'
}
for (var name in transEndEventNames) {
@@ -38,6 +28,8 @@
return { end: transEndEventNames[name] }
}
}
+
+ return false // explicit for ie8 ( ._.)
}
// http://blog.alexmaccaw.com/css-transitions