From 60029a8f0aa6c8263c0d04e13f00b5c17e8293b3 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sun, 13 Jul 2014 22:27:18 -0700 Subject: Update bootstrap CSS --- public/js/bootstrap.js | 3041 ++++++++++++++++++++++-------------------------- 1 file changed, 1411 insertions(+), 1630 deletions(-) (limited to 'public/js/bootstrap.js') diff --git a/public/js/bootstrap.js b/public/js/bootstrap.js index 56621401..8ae571b6 100644 --- a/public/js/bootstrap.js +++ b/public/js/bootstrap.js @@ -1,2170 +1,1951 @@ -/* =================================================== - * bootstrap-transition.js v2.2.2 - * http://twitter.github.com/bootstrap/javascript.html#transitions - * =================================================== - * Copyright 2012 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. - * ========================================================== */ - - -!function ($) { - - "use strict"; // jshint ;_; - - - /* CSS TRANSITION SUPPORT (http://www.modernizr.com/) - * ======================================================= */ +/*! + * Bootstrap v3.1.1 (http://getbootstrap.com) + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + */ - $(function () { +if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript requires jQuery') } - $.support.transition = (function () { +/* ======================================================================== + * Bootstrap: transition.js v3.1.1 + * http://getbootstrap.com/javascript/#transitions + * ======================================================================== + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ - var transitionEnd = (function () { - var el = document.createElement('bootstrap') - , transEndEventNames = { - 'WebkitTransition' : 'webkitTransitionEnd' - , 'MozTransition' : 'transitionend' - , 'OTransition' : 'oTransitionEnd otransitionend' - , 'transition' : 'transitionend' - } - , name ++function ($) { + 'use strict'; - for (name in transEndEventNames){ - if (el.style[name] !== undefined) { - return transEndEventNames[name] - } - } + // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/) + // ============================================================ - }()) + function transitionEnd() { + var el = document.createElement('bootstrap') + + var transEndEventNames = { + 'WebkitTransition' : 'webkitTransitionEnd', + 'MozTransition' : 'transitionend', + 'OTransition' : 'oTransitionEnd otransitionend', + 'transition' : 'transitionend' + } - return transitionEnd && { - end: transitionEnd + for (var name in transEndEventNames) { + if (el.style[name] !== undefined) { + return { end: transEndEventNames[name] } } + } - })() + return false // explicit for ie8 ( ._.) + } - }) + // http://blog.alexmaccaw.com/css-transitions + $.fn.emulateTransitionEnd = function (duration) { + var called = false, $el = this + $(this).one($.support.transition.end, function () { called = true }) + var callback = function () { if (!called) $($el).trigger($.support.transition.end) } + setTimeout(callback, duration) + return this + } -}(window.jQuery); -/* ========================================================= - * bootstrap-modal.js v2.2.2 - * http://twitter.github.com/bootstrap/javascript.html#modals - * ========================================================= - * Copyright 2012 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. - * ========================================================= */ + $(function () { + $.support.transition = transitionEnd() + }) +}(jQuery); -!function ($) { +/* ======================================================================== + * Bootstrap: alert.js v3.1.1 + * http://getbootstrap.com/javascript/#alerts + * ======================================================================== + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ - "use strict"; // jshint ;_; ++function ($) { + 'use strict'; - /* MODAL CLASS DEFINITION - * ====================== */ + // ALERT CLASS DEFINITION + // ====================== - var Modal = function (element, options) { - this.options = options - this.$element = $(element) - .delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this)) - this.options.remote && this.$element.find('.modal-body').load(this.options.remote) + var dismiss = '[data-dismiss="alert"]' + var Alert = function (el) { + $(el).on('click', dismiss, this.close) } - Modal.prototype = { + Alert.prototype.close = function (e) { + var $this = $(this) + var selector = $this.attr('data-target') + + if (!selector) { + selector = $this.attr('href') + selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 + } + + var $parent = $(selector) - constructor: Modal + if (e) e.preventDefault() - , toggle: function () { - return this[!this.isShown ? 'show' : 'hide']() - } + if (!$parent.length) { + $parent = $this.hasClass('alert') ? $this : $this.parent() + } - , show: function () { - var that = this - , e = $.Event('show') + $parent.trigger(e = $.Event('close.bs.alert')) - this.$element.trigger(e) + if (e.isDefaultPrevented()) return - if (this.isShown || e.isDefaultPrevented()) return + $parent.removeClass('in') - this.isShown = true + function removeElement() { + $parent.trigger('closed.bs.alert').remove() + } - this.escape() + $.support.transition && $parent.hasClass('fade') ? + $parent + .one($.support.transition.end, removeElement) + .emulateTransitionEnd(150) : + removeElement() + } - this.backdrop(function () { - var transition = $.support.transition && that.$element.hasClass('fade') - if (!that.$element.parent().length) { - that.$element.appendTo(document.body) //don't move modals dom position - } + // ALERT PLUGIN DEFINITION + // ======================= - that.$element - .show() + var old = $.fn.alert - if (transition) { - that.$element[0].offsetWidth // force reflow - } + $.fn.alert = function (option) { + return this.each(function () { + var $this = $(this) + var data = $this.data('bs.alert') - that.$element - .addClass('in') - .attr('aria-hidden', false) + if (!data) $this.data('bs.alert', (data = new Alert(this))) + if (typeof option == 'string') data[option].call($this) + }) + } - that.enforceFocus() + $.fn.alert.Constructor = Alert - transition ? - that.$element.one($.support.transition.end, function () { that.$element.focus().trigger('shown') }) : - that.$element.focus().trigger('shown') - }) - } + // ALERT NO CONFLICT + // ================= - , hide: function (e) { - e && e.preventDefault() + $.fn.alert.noConflict = function () { + $.fn.alert = old + return this + } - var that = this - e = $.Event('hide') + // ALERT DATA-API + // ============== - this.$element.trigger(e) + $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close) - if (!this.isShown || e.isDefaultPrevented()) return +}(jQuery); - this.isShown = false +/* ======================================================================== + * Bootstrap: button.js v3.1.1 + * http://getbootstrap.com/javascript/#buttons + * ======================================================================== + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ - this.escape() - $(document).off('focusin.modal') ++function ($) { + 'use strict'; - this.$element - .removeClass('in') - .attr('aria-hidden', true) + // BUTTON PUBLIC CLASS DEFINITION + // ============================== - $.support.transition && this.$element.hasClass('fade') ? - this.hideWithTransition() : - this.hideModal() - } + var Button = function (element, options) { + this.$element = $(element) + this.options = $.extend({}, Button.DEFAULTS, options) + this.isLoading = false + } - , enforceFocus: function () { - var that = this - $(document).on('focusin.modal', function (e) { - if (that.$element[0] !== e.target && !that.$element.has(e.target).length) { - that.$element.focus() - } - }) - } + Button.DEFAULTS = { + loadingText: 'loading...' + } - , escape: function () { - var that = this - if (this.isShown && this.options.keyboard) { - this.$element.on('keyup.dismiss.modal', function ( e ) { - e.which == 27 && that.hide() - }) - } else if (!this.isShown) { - this.$element.off('keyup.dismiss.modal') - } - } + Button.prototype.setState = function (state) { + var d = 'disabled' + var $el = this.$element + var val = $el.is('input') ? 'val' : 'html' + var data = $el.data() - , hideWithTransition: function () { - var that = this - , timeout = setTimeout(function () { - that.$element.off($.support.transition.end) - that.hideModal() - }, 500) + state = state + 'Text' - this.$element.one($.support.transition.end, function () { - clearTimeout(timeout) - that.hideModal() - }) - } + if (!data.resetText) $el.data('resetText', $el[val]()) - , hideModal: function (that) { - this.$element - .hide() - .trigger('hidden') + $el[val](data[state] || this.options[state]) - this.backdrop() + // push to event loop to allow forms to submit + 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) + } - , removeBackdrop: function () { - this.$backdrop.remove() - this.$backdrop = null + Button.prototype.toggle = function () { + 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') { + 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') + } + + if (changed) this.$element.toggleClass('active') + } - , backdrop: function (callback) { - var that = this - , animate = this.$element.hasClass('fade') ? 'fade' : '' - if (this.isShown && this.options.backdrop) { - var doAnimate = $.support.transition && animate + // BUTTON PLUGIN DEFINITION + // ======================== - this.$backdrop = $('