aboutsummaryrefslogtreecommitdiff
path: root/dist/js/bootstrap.js
diff options
context:
space:
mode:
Diffstat (limited to 'dist/js/bootstrap.js')
-rw-r--r--dist/js/bootstrap.js165
1 files changed, 85 insertions, 80 deletions
diff --git a/dist/js/bootstrap.js b/dist/js/bootstrap.js
index 82ebff2b8..dfa3d4e24 100644
--- a/dist/js/bootstrap.js
+++ b/dist/js/bootstrap.js
@@ -1,15 +1,14 @@
/*!
- * Bootstrap v3.0.0 by @fat and @mdo
+ * Bootstrap v3.0.3 (http://getbootstrap.com)
* Copyright 2013 Twitter, Inc.
* Licensed under http://www.apache.org/licenses/LICENSE-2.0
- *
- * Designed and built with all the love in the world by @mdo and @fat.
*/
+
if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery") }
/* ========================================================================
- * Bootstrap: transition.js v3.0.0
- * http://twbs.github.com/bootstrap/javascript.html#transitions
+ * Bootstrap: transition.js v3.0.3
+ * http://getbootstrap.com/javascript/#transitions
* ========================================================================
* Copyright 2013 Twitter, Inc.
*
@@ -27,7 +26,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
* ======================================================================== */
-+function ($) { "use strict";
++function ($) { 'use strict';
// CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
// ============================================================
@@ -62,11 +61,11 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
$.support.transition = transitionEnd()
})
-}(window.jQuery);
+}(jQuery);
/* ========================================================================
- * Bootstrap: alert.js v3.0.0
- * http://twbs.github.com/bootstrap/javascript.html#alerts
+ * Bootstrap: alert.js v3.0.3
+ * http://getbootstrap.com/javascript/#alerts
* ========================================================================
* Copyright 2013 Twitter, Inc.
*
@@ -84,7 +83,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
* ======================================================================== */
-+function ($) { "use strict";
++function ($) { 'use strict';
// ALERT CLASS DEFINITION
// ======================
@@ -161,11 +160,11 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
$(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close)
-}(window.jQuery);
+}(jQuery);
/* ========================================================================
- * Bootstrap: button.js v3.0.0
- * http://twbs.github.com/bootstrap/javascript.html#buttons
+ * Bootstrap: button.js v3.0.3
+ * http://getbootstrap.com/javascript/#buttons
* ========================================================================
* Copyright 2013 Twitter, Inc.
*
@@ -183,7 +182,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
* ======================================================================== */
-+function ($) { "use strict";
++function ($) { 'use strict';
// BUTTON PUBLIC CLASS DEFINITION
// ==============================
@@ -219,15 +218,21 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
Button.prototype.toggle = function () {
var $parent = this.$element.closest('[data-toggle="buttons"]')
+ var changed = true
if ($parent.length) {
var $input = this.$element.find('input')
- .prop('checked', !this.$element.hasClass('active'))
- .trigger('change')
- if ($input.prop('type') === 'radio') $parent.find('.active').removeClass('active')
+ 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 (changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change')
}
- this.$element.toggleClass('active')
+ if (changed) this.$element.toggleClass('active')
}
@@ -271,13 +276,13 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
e.preventDefault()
})
-}(window.jQuery);
+}(jQuery);
/* ========================================================================
- * Bootstrap: carousel.js v3.0.0
- * http://twbs.github.com/bootstrap/javascript.html#carousel
+ * Bootstrap: carousel.js v3.0.3
+ * http://getbootstrap.com/javascript/#carousel
* ========================================================================
- * Copyright 2012 Twitter, Inc.
+ * 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.
@@ -293,7 +298,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
* ======================================================================== */
-+function ($) { "use strict";
++function ($) { 'use strict';
// CAROUSEL CLASS DEFINITION
// =========================
@@ -344,7 +349,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
if (pos > (this.$items.length - 1) || pos < 0) return
- if (this.sliding) return this.$element.one('slid', function () { that.to(pos) })
+ if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) })
if (activeIndex == pos) return this.pause().cycle()
return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos]))
@@ -396,7 +401,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
if (this.$indicators.length) {
this.$indicators.find('.active').removeClass('active')
- this.$element.one('slid', function () {
+ this.$element.one('slid.bs.carousel', function () {
var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()])
$nextIndicator && $nextIndicator.addClass('active')
})
@@ -414,7 +419,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
$next.removeClass([type, direction].join(' ')).addClass('active')
$active.removeClass(['active', direction].join(' '))
that.sliding = false
- setTimeout(function () { that.$element.trigger('slid') }, 0)
+ setTimeout(function () { that.$element.trigger('slid.bs.carousel') }, 0)
})
.emulateTransitionEnd(600)
} else {
@@ -423,7 +428,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
$active.removeClass('active')
$next.addClass('active')
this.sliding = false
- this.$element.trigger('slid')
+ this.$element.trigger('slid.bs.carousel')
}
isCycling && this.cycle()
@@ -489,13 +494,13 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
})
})
-}(window.jQuery);
+}(jQuery);
/* ========================================================================
- * Bootstrap: collapse.js v3.0.0
- * http://twbs.github.com/bootstrap/javascript.html#collapse
+ * Bootstrap: collapse.js v3.0.3
+ * http://getbootstrap.com/javascript/#collapse
* ========================================================================
- * Copyright 2012 Twitter, Inc.
+ * 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.
@@ -511,7 +516,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
* ======================================================================== */
-+function ($) { "use strict";
++function ($) { 'use strict';
// COLLAPSE PUBLIC CLASS DEFINITION
// ================================
@@ -669,13 +674,13 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
$target.collapse(option)
})
-}(window.jQuery);
+}(jQuery);
/* ========================================================================
- * Bootstrap: dropdown.js v3.0.0
- * http://twbs.github.com/bootstrap/javascript.html#dropdowns
+ * Bootstrap: dropdown.js v3.0.3
+ * http://getbootstrap.com/javascript/#dropdowns
* ========================================================================
- * Copyright 2012 Twitter, Inc.
+ * 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.
@@ -691,7 +696,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
* ======================================================================== */
-+function ($) { "use strict";
++function ($) { 'use strict';
// DROPDOWN CLASS DEFINITION
// =========================
@@ -699,7 +704,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
var backdrop = '.dropdown-backdrop'
var toggle = '[data-toggle=dropdown]'
var Dropdown = function (element) {
- var $el = $(element).on('click.bs.dropdown', this.toggle)
+ $(element).on('click.bs.dropdown', this.toggle)
}
Dropdown.prototype.toggle = function (e) {
@@ -714,7 +719,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
if (!isActive) {
if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {
- // if mobile we we use a backdrop because click events don't delegate
+ // if mobile we use a backdrop because click events don't delegate
$('<div class="dropdown-backdrop"/>').insertAfter($(this)).on('click', clearMenus)
}
@@ -758,7 +763,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
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()
}
@@ -796,9 +801,9 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
$.fn.dropdown = function (option) {
return this.each(function () {
var $this = $(this)
- var data = $this.data('dropdown')
+ var data = $this.data('bs.dropdown')
- if (!data) $this.data('dropdown', (data = new Dropdown(this)))
+ if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))
if (typeof option == 'string') data[option].call($this)
})
}
@@ -824,13 +829,13 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
.on('click.bs.dropdown.data-api' , toggle, Dropdown.prototype.toggle)
.on('keydown.bs.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
-}(window.jQuery);
+}(jQuery);
/* ========================================================================
- * Bootstrap: modal.js v3.0.0
- * http://twbs.github.com/bootstrap/javascript.html#modals
+ * Bootstrap: modal.js v3.0.3
+ * http://getbootstrap.com/javascript/#modals
* ========================================================================
- * Copyright 2012 Twitter, Inc.
+ * 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.
@@ -846,7 +851,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
* ======================================================================== */
-+function ($) { "use strict";
++function ($) { 'use strict';
// MODAL CLASS DEFINITION
// ======================
@@ -1008,7 +1013,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
} 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) :
@@ -1071,14 +1076,14 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
.on('show.bs.modal', '.modal', function () { $(document.body).addClass('modal-open') })
.on('hidden.bs.modal', '.modal', function () { $(document.body).removeClass('modal-open') })
-}(window.jQuery);
+}(jQuery);
/* ========================================================================
- * Bootstrap: tooltip.js v3.0.0
- * http://twbs.github.com/bootstrap/javascript.html#tooltip
+ * Bootstrap: tooltip.js v3.0.3
+ * http://getbootstrap.com/javascript/#tooltip
* Inspired by the original jQuery.tipsy by Jason Frame
* ========================================================================
- * Copyright 2012 Twitter, Inc.
+ * 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.
@@ -1094,7 +1099,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
* ======================================================================== */
-+function ($) { "use strict";
++function ($) { 'use strict';
// TOOLTIP PUBLIC CLASS DEFINITION
// ===============================
@@ -1208,7 +1213,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
}
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)
@@ -1267,7 +1272,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
}
}
- Tooltip.prototype.applyPlacement = function(offset, placement) {
+ Tooltip.prototype.applyPlacement = function (offset, placement) {
var replace
var $tip = this.tip()
var width = $tip[0].offsetWidth
@@ -1318,8 +1323,8 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
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 () {
@@ -1458,13 +1463,13 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
return this
}
-}(window.jQuery);
+}(jQuery);
/* ========================================================================
- * Bootstrap: popover.js v3.0.0
- * http://twbs.github.com/bootstrap/javascript.html#popovers
+ * Bootstrap: popover.js v3.0.3
+ * http://getbootstrap.com/javascript/#popovers
* ========================================================================
- * Copyright 2012 Twitter, Inc.
+ * 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.
@@ -1480,7 +1485,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
* ======================================================================== */
-+function ($) { "use strict";
++function ($) { 'use strict';
// POPOVER PUBLIC CLASS DEFINITION
// ===============================
@@ -1576,13 +1581,13 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
return this
}
-}(window.jQuery);
+}(jQuery);
/* ========================================================================
- * Bootstrap: scrollspy.js v3.0.0
- * http://twbs.github.com/bootstrap/javascript.html#scrollspy
+ * Bootstrap: scrollspy.js v3.0.3
+ * http://getbootstrap.com/javascript/#scrollspy
* ========================================================================
- * Copyright 2012 Twitter, Inc.
+ * 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.
@@ -1598,7 +1603,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
* ======================================================================== */
-+function ($) { "use strict";
++function ($) { 'use strict';
// SCROLLSPY CLASS DEFINITION
// ==========================
@@ -1693,7 +1698,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
.addClass('active')
}
- active.trigger('activate')
+ active.trigger('activate.bs.scrollspy')
}
@@ -1735,13 +1740,13 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
})
})
-}(window.jQuery);
+}(jQuery);
/* ========================================================================
- * Bootstrap: tab.js v3.0.0
- * http://twbs.github.com/bootstrap/javascript.html#tabs
+ * Bootstrap: tab.js v3.0.3
+ * http://getbootstrap.com/javascript/#tabs
* ========================================================================
- * Copyright 2012 Twitter, Inc.
+ * 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.
@@ -1757,7 +1762,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
* ======================================================================== */
-+function ($) { "use strict";
++function ($) { 'use strict';
// TAB CLASS DEFINITION
// ====================
@@ -1769,7 +1774,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
Tab.prototype.show = function () {
var $this = this.element
var $ul = $this.closest('ul:not(.dropdown-menu)')
- var selector = $this.attr('data-target')
+ var selector = $this.data('target')
if (!selector) {
selector = $this.attr('href')
@@ -1871,13 +1876,13 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
$(this).tab('show')
})
-}(window.jQuery);
+}(jQuery);
/* ========================================================================
- * Bootstrap: affix.js v3.0.0
- * http://twbs.github.com/bootstrap/javascript.html#affix
+ * Bootstrap: affix.js v3.0.3
+ * http://getbootstrap.com/javascript/#affix
* ========================================================================
- * Copyright 2012 Twitter, Inc.
+ * 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.
@@ -1893,7 +1898,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
* ======================================================================== */
-+function ($) { "use strict";
++function ($) { 'use strict';
// AFFIX CLASS DEFINITION
// ======================
@@ -1998,4 +2003,4 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
})
})
-}(window.jQuery);
+}(jQuery);