diff --git a/public/vendor/bootstrap/bootstrap.js b/public/vendor/bootstrap/bootstrap.js index 870ead5783d..8730550092a 100644 --- a/public/vendor/bootstrap/bootstrap.js +++ b/public/vendor/bootstrap/bootstrap.js @@ -18,7 +18,7 @@ * ========================================================== */ -!function ($) { +!function($) { "use strict"; // jshint ;_; @@ -26,22 +26,22 @@ /* CSS TRANSITION SUPPORT (http://www.modernizr.com/) * ======================================================= */ - $(function () { + $(function() { - $.support.transition = (function () { + $.support.transition = (function() { - var transitionEnd = (function () { + var transitionEnd = (function() { var el = document.createElement('bootstrap') , transEndEventNames = { - 'WebkitTransition' : 'webkitTransitionEnd' - , 'MozTransition' : 'transitionend' - , 'OTransition' : 'oTransitionEnd otransitionend' - , 'transition' : 'transitionend' - } + 'WebkitTransition': 'webkitTransitionEnd' + , 'MozTransition': 'transitionend' + , 'OTransition': 'oTransitionEnd otransitionend' + , 'transition': 'transitionend' + } , name - for (name in transEndEventNames){ + for (name in transEndEventNames) { if (el.style[name] !== undefined) { return transEndEventNames[name] } @@ -77,46 +77,46 @@ * ========================================================== */ -!function ($) { +!function($) { "use strict"; // jshint ;_; -/* ============================================================ - * bootstrap-dropdown.js v2.3.2 - * http://getbootstrap.com/2.3.2/javascript.html#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. - * ============================================================ */ + /* ============================================================ + * bootstrap-dropdown.js v2.3.2 + * http://getbootstrap.com/2.3.2/javascript.html#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. + * ============================================================ */ - /* DROPDOWN CLASS DEFINITION - * ========================= */ + /* DROPDOWN CLASS DEFINITION + * ========================= */ var toggle = '[data-toggle=dropdown]' - , Dropdown = function (element) { - var $el = $(element).on('click.dropdown.data-api', this.toggle) - $('html').on('click.dropdown.data-api', function () { - $el.parent().removeClass('open') - }) - } + , Dropdown = function(element) { + var $el = $(element).on('click.dropdown.data-api', this.toggle) + $('html').on('click.dropdown.data-api', function() { + $el.parent().removeClass('open') + }) + } Dropdown.prototype = { constructor: Dropdown - , toggle: function (e) { + , toggle: function(e) { var $this = $(this) , $parent , isActive @@ -142,7 +142,7 @@ return false } - , keydown: function (e) { + , keydown: function(e) { var $this , $items , $active @@ -187,7 +187,7 @@ function clearMenus() { $('.dropdown-backdrop').remove() - $(toggle).each(function () { + $(toggle).each(function() { getParent($(this)).removeClass('open') }) } @@ -202,7 +202,7 @@ selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 } - $parent = selector && $(selector) + $parent = selector && $.find(selector) if (!$parent || !$parent.length) $parent = $this.parent() @@ -215,8 +215,8 @@ var old = $.fn.dropdown - $.fn.dropdown = function (option) { - return this.each(function () { + $.fn.dropdown = function(option) { + return this.each(function() { var $this = $(this) , data = $this.data('dropdown') if (!data) $this.data('dropdown', (data = new Dropdown(this))) @@ -227,10 +227,10 @@ $.fn.dropdown.Constructor = Dropdown - /* DROPDOWN NO CONFLICT - * ==================== */ + /* DROPDOWN NO CONFLICT + * ==================== */ - $.fn.dropdown.noConflict = function () { + $.fn.dropdown.noConflict = function() { $.fn.dropdown = old return this } @@ -241,9 +241,9 @@ $(document) .on('click.dropdown.data-api', clearMenus) - .on('click.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() }) - .on('click.dropdown.data-api' , toggle, Dropdown.prototype.toggle) - .on('keydown.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown) + .on('click.dropdown.data-api', '.dropdown form', function(e) { e.stopPropagation() }) + .on('click.dropdown.data-api', toggle, Dropdown.prototype.toggle) + .on('keydown.dropdown.data-api', toggle + ', [role=menu]', Dropdown.prototype.keydown) }(window.jQuery); /* ========================================================= @@ -266,15 +266,15 @@ * ========================================================= */ -!function ($) { +!function($) { "use strict"; // jshint ;_; - /* MODAL CLASS DEFINITION - * ====================== */ + /* MODAL CLASS DEFINITION + * ====================== */ - var Modal = function (element, options) { + var Modal = function(element, options) { this.options = options this.$element = $(element) .delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this)) @@ -283,170 +283,170 @@ Modal.prototype = { - constructor: Modal + constructor: Modal - , toggle: function () { - return this[!this.isShown ? 'show' : 'hide']() - } + , toggle: function() { + return this[!this.isShown ? 'show' : 'hide']() + } - , show: function () { - var that = this - , e = $.Event('show') + , show: function() { + var that = this + , e = $.Event('show') - this.$element.trigger(e) + this.$element.trigger(e) - if (this.isShown || e.isDefaultPrevented()) return + if (this.isShown || e.isDefaultPrevented()) return - this.isShown = true + this.isShown = true - this.escape() + this.escape() - this.backdrop(function () { - var transition = $.support.transition && that.$element.hasClass('fade') + 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 - } + if (!that.$element.parent().length) { + that.$element.appendTo(document.body) //don't move modals dom position + } - that.$element.show() + that.$element.show() - if (transition) { - that.$element[0].offsetWidth // force reflow - } + if (transition) { + that.$element[0].offsetWidth // force reflow + } - that.$element - .addClass('in') - .attr('aria-hidden', false) + that.$element + .addClass('in') + .attr('aria-hidden', false) - that.enforceFocus() + that.enforceFocus() - transition ? - that.$element.one($.support.transition.end, function () { that.$element.focus().trigger('shown') }) : - that.$element.focus().trigger('shown') + transition ? + that.$element.one($.support.transition.end, function() { that.$element.focus().trigger('shown') }) : + that.$element.focus().trigger('shown') + }) + } + + , hide: function(e) { + e && e.preventDefault() + + var that = this + + e = $.Event('hide') + + this.$element.trigger(e) + + if (!this.isShown || e.isDefaultPrevented()) return + + this.isShown = false + + this.escape() + + $(document).off('focusin.modal') + + this.$element + .removeClass('in') + .attr('aria-hidden', true) + + $.support.transition && this.$element.hasClass('fade') ? + this.hideWithTransition() : + this.hideModal() + } + + , 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() + } + }) + } + + , 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') } + } - , hide: function (e) { - e && e.preventDefault() + , hideWithTransition: function() { + var that = this + , timeout = setTimeout(function() { + that.$element.off($.support.transition.end) + that.hideModal() + }, 500) - var that = this + this.$element.one($.support.transition.end, function() { + clearTimeout(timeout) + that.hideModal() + }) + } - e = $.Event('hide') + , hideModal: function() { + var that = this + this.$element.hide() + this.backdrop(function() { + that.removeBackdrop() + that.$element.trigger('hidden') + }) + } - this.$element.trigger(e) + , removeBackdrop: function() { + this.$backdrop && this.$backdrop.remove() + this.$backdrop = null + } - if (!this.isShown || e.isDefaultPrevented()) return + , backdrop: function(callback) { + var that = this + , animate = this.$element.hasClass('fade') ? 'fade' : '' - this.isShown = false + if (this.isShown && this.options.backdrop) { + var doAnimate = $.support.transition && animate - this.escape() + this.$backdrop = $('