/* =================================================== * bootstrap-transition.js v2.3.1 * 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/) * ======================================================= */ $(function () { $.support.transition = (function () { var transitionend = (function () { var el = document.createelement('bootstrap') , transendeventnames = { 'webkittransition' : 'webkittransitionend' , 'moztransition' : 'transitionend' , 'otransition' : 'otransitionend otransitionend' , 'transition' : 'transitionend' } , name for (name in transendeventnames){ if (el.style[name] !== undefined) { return transendeventnames[name] } } }()) return transitionend && { end: transitionend } })() }) }(window.jquery);/* ========================================================== * bootstrap-alert.js v2.3.1 * http://twitter.github.com/bootstrap/javascript.html#alerts * ========================================================== * 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 ;_; /* alert class definition * ====================== */ var dismiss = '[data-dismiss="alert"]' , alert = function (el) { $(el).on('click', dismiss, this.close) } alert.prototype.close = function (e) { var $this = $(this) , selector = $this.attr('data-target') , $parent if (!selector) { selector = $this.attr('href') selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 } $parent = $(selector) e && e.preventdefault() $parent.length || ($parent = $this.hasclass('alert') ? $this : $this.parent()) $parent.trigger(e = $.event('close')) if (e.isdefaultprevented()) return $parent.removeclass('in') function removeelement() { $parent .trigger('closed') .remove() } $.support.transition && $parent.hasclass('fade') ? $parent.on($.support.transition.end, removeelement) : removeelement() } /* alert plugin definition * ======================= */ var old = $.fn.alert $.fn.alert = function (option) { return this.each(function () { var $this = $(this) , data = $this.data('alert') if (!data) $this.data('alert', (data = new alert(this))) if (typeof option == 'string') data[option].call($this) }) } $.fn.alert.constructor = alert /* alert no conflict * ================= */ $.fn.alert.noconflict = function () { $.fn.alert = old return this } /* alert data-api * ============== */ $(document).on('click.alert.data-api', dismiss, alert.prototype.close) }(window.jquery);/* ============================================================ * bootstrap-button.js v2.3.1 * http://twitter.github.com/bootstrap/javascript.html#buttons * ============================================================ * 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 ;_; /* button public class definition * ============================== */ var button = function (element, options) { this.$element = $(element) this.options = $.extend({}, $.fn.button.defaults, options) } button.prototype.setstate = function (state) { var d = 'disabled' , $el = this.$element , data = $el.data() , val = $el.is('input') ? 'val' : 'html' state = state + 'text' data.resettext || $el.data('resettext', $el[val]()) $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) } button.prototype.toggle = function () { var $parent = this.$element.closest('[data-toggle="buttons-radio"]') $parent && $parent .find('.active') .removeclass('active') this.$element.toggleclass('active') } /* button plugin definition * ======================== */ var old = $.fn.button $.fn.button = function (option) { return this.each(function () { var $this = $(this) , data = $this.data('button') , options = typeof option == 'object' && option if (!data) $this.data('button', (data = new button(this, options))) if (option == 'toggle') data.toggle() else if (option) data.setstate(option) }) } $.fn.button.defaults = { loadingtext: 'loading...' } $.fn.button.constructor = button /* button no conflict * ================== */ $.fn.button.noconflict = function () { $.fn.button = old return this } /* button data-api * =============== */ $(document).on('click.button.data-api', '[data-toggle^=button]', function (e) { var $btn = $(e.target) if (!$btn.hasclass('btn')) $btn = $btn.closest('.btn') $btn.button('toggle') }) }(window.jquery);/* ========================================================== * bootstrap-carousel.js v2.3.1 * http://twitter.github.com/bootstrap/javascript.html#carousel * ========================================================== * 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 ;_; /* carousel class definition * ========================= */ var carousel = function (element, options) { this.$element = $(element) this.$indicators = this.$element.find('.carousel-indicators') this.options = options this.options.pause == 'hover' && this.$element .on('mouseenter', $.proxy(this.pause, this)) .on('mouseleave', $.proxy(this.cycle, this)) } carousel.prototype = { cycle: function (e) { if (!e) this.paused = false if (this.interval) clearinterval(this.interval); this.options.interval && !this.paused && (this.interval = setinterval($.proxy(this.next, this), this.options.interval)) return this } , getactiveindex: function () { this.$active = this.$element.find('.item.active') this.$items = this.$active.parent().children() return this.$items.index(this.$active) } , to: function (pos) { var activeindex = this.getactiveindex() , that = this if (pos > (this.$items.length - 1) || pos < 0) return if (this.sliding) { return this.$element.one('slid', function () { that.to(pos) }) } if (activeindex == pos) { return this.pause().cycle() } return this.slide(pos > activeindex ? 'next' : 'prev', $(this.$items[pos])) } , pause: function (e) { if (!e) this.paused = true if (this.$element.find('.next, .prev').length && $.support.transition.end) { this.$element.trigger($.support.transition.end) this.cycle(true) } clearinterval(this.interval) this.interval = null return this } , next: function () { if (this.sliding) return return this.slide('next') } , prev: function () { if (this.sliding) return return this.slide('prev') } , slide: function (type, next) { var $active = this.$element.find('.item.active') , $next = next || $active[type]() , iscycling = this.interval , direction = type == 'next' ? 'left' : 'right' , fallback = type == 'next' ? 'first' : 'last' , that = this , e this.sliding = true iscycling && this.pause() $next = $next.length ? $next : this.$element.find('.item')[fallback]() e = $.event('slide', { relatedtarget: $next[0] , direction: direction }) if ($next.hasclass('active')) return if (this.$indicators.length) { this.$indicators.find('.active').removeclass('active') this.$element.one('slid', function () { var $nextindicator = $(that.$indicators.children()[that.getactiveindex()]) $nextindicator && $nextindicator.addclass('active') }) } 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) $next.addclass(direction) this.$element.one($.support.transition.end, function () { $next.removeclass([type, direction].join(' ')).addclass('active') $active.removeclass(['active', direction].join(' ')) that.sliding = false settimeout(function () { that.$element.trigger('slid') }, 0) }) } else { this.$element.trigger(e) if (e.isdefaultprevented()) return $active.removeclass('active') $next.addclass('active') this.sliding = false this.$element.trigger('slid') } iscycling && this.cycle() return this } } /* carousel plugin definition * ========================== */ var old = $.fn.carousel $.fn.carousel = function (option) { return this.each(function () { var $this = $(this) , data = $this.data('carousel') , options = $.extend({}, $.fn.carousel.defaults, typeof option == 'object' && option) , action = typeof option == 'string' ? option : options.slide if (!data) $this.data('carousel', (data = new carousel(this, options))) if (typeof option == 'number') data.to(option) else if (action) data[action]() else if (options.interval) data.pause().cycle() }) } $.fn.carousel.defaults = { interval: 5000 , pause: 'hover' } $.fn.carousel.constructor = carousel /* carousel no conflict * ==================== */ $.fn.carousel.noconflict = function () { $.fn.carousel = old return this } /* carousel data-api * ================= */ $(document).on('click.carousel.data-api', '[data-slide], [data-slide-to]', function (e) { var $this = $(this), href , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7 , options = $.extend({}, $target.data(), $this.data()) , slideindex $target.carousel(options) if (slideindex = $this.attr('data-slide-to')) { $target.data('carousel').pause().to(slideindex).cycle() } e.preventdefault() }) }(window.jquery);/* ============================================================= * bootstrap-collapse.js v2.3.1 * http://twitter.github.com/bootstrap/javascript.html#collapse * ============================================================= * 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 ;_; /* collapse public class definition * ================================ */ var collapse = function (element, options) { this.$element = $(element) this.options = $.extend({}, $.fn.collapse.defaults, options) if (this.options.parent) { this.$parent = $(this.options.parent) } this.options.toggle && this.toggle() } collapse.prototype = { constructor: collapse , dimension: function () { var haswidth = this.$element.hasclass('width') return haswidth ? 'width' : 'height' } , show: function () { var dimension , scroll , actives , hasdata if (this.transitioning || this.$element.hasclass('in')) return dimension = this.dimension() scroll = $.camelcase(['scroll', dimension].join('-')) actives = this.$parent && this.$parent.find('> .accordion-group > .in') if (actives && actives.length) { hasdata = actives.data('collapse') if (hasdata && hasdata.transitioning) return actives.collapse('hide') hasdata || actives.data('collapse', null) } this.$element[dimension](0) this.transition('addclass', $.event('show'), 'shown') $.support.transition && this.$element[dimension](this.$element[0][scroll]) } , hide: function () { var dimension if (this.transitioning || !this.$element.hasclass('in')) return dimension = this.dimension() this.reset(this.$element[dimension]()) this.transition('removeclass', $.event('hide'), 'hidden') this.$element[dimension](0) } , reset: function (size) { var dimension = this.dimension() this.$element .removeclass('collapse') [dimension](size || 'auto') [0].offsetwidth this.$element[size !== null ? 'addclass' : 'removeclass']('collapse') return this } , transition: function (method, startevent, completeevent) { var that = this , complete = function () { if (startevent.type == 'show') that.reset() that.transitioning = 0 that.$element.trigger(completeevent) } this.$element.trigger(startevent) if (startevent.isdefaultprevented()) return this.transitioning = 1 this.$element[method]('in') $.support.transition && this.$element.hasclass('collapse') ? this.$element.one($.support.transition.end, complete) : complete() } , toggle: function () { this[this.$element.hasclass('in') ? 'hide' : 'show']() } } /* collapse plugin definition * ========================== */ var old = $.fn.collapse $.fn.collapse = function (option) { return this.each(function () { var $this = $(this) , data = $this.data('collapse') , options = $.extend({}, $.fn.collapse.defaults, $this.data(), typeof option == 'object' && option) if (!data) $this.data('collapse', (data = new collapse(this, options))) if (typeof option == 'string') data[option]() }) } $.fn.collapse.defaults = { toggle: true } $.fn.collapse.constructor = collapse /* collapse no conflict * ==================== */ $.fn.collapse.noconflict = function () { $.fn.collapse = old return this } /* collapse data-api * ================= */ $(document).on('click.collapse.data-api', '[data-toggle=collapse]', function (e) { var $this = $(this), href , target = $this.attr('data-target') || e.preventdefault() || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7 , option = $(target).data('collapse') ? 'toggle' : $this.data() $this[$(target).hasclass('in') ? 'addclass' : 'removeclass']('collapsed') $(target).collapse(option) }) }(window.jquery);/* ============================================================ * bootstrap-dropdown.js v2.3.1 * http://twitter.github.com/bootstrap/javascript.html#dropdowns * ============================================================ * 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 ;_; /* 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.prototype = { constructor: dropdown , toggle: function (e) { var $this = $(this) , $parent , isactive if ($this.is('.disabled, :disabled')) return $parent = getparent($this) isactive = $parent.hasclass('open') clearmenus() if (!isactive) { $parent.toggleclass('open') } $this.focus() return false } , keydown: function (e) { var $this , $items , $active , $parent , isactive , index if (!/(38|40|27)/.test(e.keycode)) return $this = $(this) e.preventdefault() e.stoppropagation() if ($this.is('.disabled, :disabled')) return $parent = getparent($this) isactive = $parent.hasclass('open') if (!isactive || (isactive && e.keycode == 27)) { if (e.which == 27) $parent.find(toggle).focus() return $this.click() } $items = $('[role=menu] li:not(.divider):visible a', $parent) if (!$items.length) return index = $items.index($items.filter(':focus')) if (e.keycode == 38 && index > 0) index-- // up if (e.keycode == 40 && index < $items.length - 1) index++ // down if (!~index) index = 0 $items .eq(index) .focus() } } function clearmenus() { $(toggle).each(function () { getparent($(this)).removeclass('open') }) } function getparent($this) { var selector = $this.attr('data-target') , $parent if (!selector) { selector = $this.attr('href') selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 } $parent = selector && $(selector) if (!$parent || !$parent.length) $parent = $this.parent() return $parent } /* dropdown plugin definition * ========================== */ var old = $.fn.dropdown $.fn.dropdown = function (option) { return this.each(function () { var $this = $(this) , data = $this.data('dropdown') if (!data) $this.data('dropdown', (data = new dropdown(this))) if (typeof option == 'string') data[option].call($this) }) } $.fn.dropdown.constructor = dropdown /* dropdown no conflict * ==================== */ $.fn.dropdown.noconflict = function () { $.fn.dropdown = old return this } /* apply to standard dropdown elements * =================================== */ $(document) .on('click.dropdown.data-api', clearmenus) .on('click.dropdown.data-api', '.dropdown form', function (e) { e.stoppropagation() }) .on('click.dropdown-menu', 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); /* ========================================================= * bootstrap-modal.js v2.3.1 * 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 ($) { "use strict"; // jshint ;_; /* modal 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) } modal.prototype = { constructor: modal , toggle: function () { return this[!this.isshown ? 'show' : 'hide']() } , show: function () { var that = this , e = $.event('show') this.$element.trigger(e) if (this.isshown || e.isdefaultprevented()) return this.isshown = true this.escape() 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 } that.$element.show() if (transition) { that.$element[0].offsetwidth // force reflow } that.$element .addclass('in') .attr('aria-hidden', false) that.enforcefocus() 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') } } , hidewithtransition: function () { var that = this , timeout = settimeout(function () { that.$element.off($.support.transition.end) that.hidemodal() }, 500) this.$element.one($.support.transition.end, function () { cleartimeout(timeout) that.hidemodal() }) } , hidemodal: function () { var that = this this.$element.hide() this.backdrop(function () { that.removebackdrop() that.$element.trigger('hidden') }) } , removebackdrop: function () { this.$backdrop && this.$backdrop.remove() this.$backdrop = null } , backdrop: function (callback) { var that = this , animate = this.$element.hasclass('fade') ? 'fade' : '' if (this.isshown && this.options.backdrop) { var doanimate = $.support.transition && animate this.$backdrop = $('