/* =================================================== * 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 (jQuery) { "use strict"; // jshint ;_; /* CSS TRANSITION SUPPORT (http://www.modernizr.com/) * ======================================================= */ jQuery(function () { jQuery.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 (jQuery) { "use strict"; // jshint ;_; /* ALERT CLASS DEFINITION * ====================== */ var dismiss = '[data-dismiss="alert"]' , Alert = function (el) { jQuery(el).on('click', dismiss, this.close) } Alert.prototype.close = function (e) { var jQuerythis = jQuery(this) , selector = jQuerythis.attr('data-target') , jQueryparent if (!selector) { selector = jQuerythis.attr('href') selector = selector && selector.replace(/.*(?=#[^\s]*jQuery)/, '') //strip for ie7 } jQueryparent = jQuery(selector) e && e.preventDefault() jQueryparent.length || (jQueryparent = jQuerythis.hasClass('alert') ? jQuerythis : jQuerythis.parent()) jQueryparent.trigger(e = jQuery.Event('close')) if (e.isDefaultPrevented()) return jQueryparent.removeClass('in') function removeElement() { jQueryparent .trigger('closed') .remove() } jQuery.support.transition && jQueryparent.hasClass('fade') ? jQueryparent.on(jQuery.support.transition.end, removeElement) : removeElement() } /* ALERT PLUGIN DEFINITION * ======================= */ var old = jQuery.fn.alert jQuery.fn.alert = function (option) { return this.each(function () { var jQuerythis = jQuery(this) , data = jQuerythis.data('alert') if (!data) jQuerythis.data('alert', (data = new Alert(this))) if (typeof option == 'string') data[option].call(jQuerythis) }) } jQuery.fn.alert.Constructor = Alert /* ALERT NO CONFLICT * ================= */ jQuery.fn.alert.noConflict = function () { jQuery.fn.alert = old return this } /* ALERT DATA-API * ============== */ jQuery(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 (jQuery) { "use strict"; // jshint ;_; /* BUTTON PUBLIC CLASS DEFINITION * ============================== */ var Button = function (element, options) { this.jQueryelement = jQuery(element) this.options = jQuery.extend({}, jQuery.fn.button.defaults, options) } Button.prototype.setState = function (state) { var d = 'disabled' , jQueryel = this.jQueryelement , data = jQueryel.data() , val = jQueryel.is('input') ? 'val' : 'html' state = state + 'Text' data.resetText || jQueryel.data('resetText', jQueryel[val]()) jQueryel[val](data[state] || this.options[state]) // push to event loop to allow forms to submit setTimeout(function () { state == 'loadingText' ? jQueryel.addClass(d).attr(d, d) : jQueryel.removeClass(d).removeAttr(d) }, 0) } Button.prototype.toggle = function () { var jQueryparent = this.jQueryelement.closest('[data-toggle="buttons-radio"]') jQueryparent && jQueryparent .find('.active') .removeClass('active') this.jQueryelement.toggleClass('active') } /* BUTTON PLUGIN DEFINITION * ======================== */ var old = jQuery.fn.button jQuery.fn.button = function (option) { return this.each(function () { var jQuerythis = jQuery(this) , data = jQuerythis.data('button') , options = typeof option == 'object' && option if (!data) jQuerythis.data('button', (data = new Button(this, options))) if (option == 'toggle') data.toggle() else if (option) data.setState(option) }) } jQuery.fn.button.defaults = { loadingText: 'loading...' } jQuery.fn.button.Constructor = Button /* BUTTON NO CONFLICT * ================== */ jQuery.fn.button.noConflict = function () { jQuery.fn.button = old return this } /* BUTTON DATA-API * =============== */ jQuery(document).on('click.button.data-api', '[data-toggle^=button]', function (e) { var jQuerybtn = jQuery(e.target) if (!jQuerybtn.hasClass('btn')) jQuerybtn = jQuerybtn.closest('.btn') jQuerybtn.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 (jQuery) { "use strict"; // jshint ;_; /* CAROUSEL CLASS DEFINITION * ========================= */ var Carousel = function (element, options) { this.jQueryelement = jQuery(element) this.jQueryindicators = this.jQueryelement.find('.carousel-indicators') this.options = options this.options.pause == 'hover' && this.jQueryelement .on('mouseenter', jQuery.proxy(this.pause, this)) .on('mouseleave', jQuery.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(jQuery.proxy(this.next, this), this.options.interval)) return this } , getActiveIndex: function () { this.jQueryactive = this.jQueryelement.find('.item.active') this.jQueryitems = this.jQueryactive.parent().children() return this.jQueryitems.index(this.jQueryactive) } , to: function (pos) { var activeIndex = this.getActiveIndex() , that = this if (pos > (this.jQueryitems.length - 1) || pos < 0) return if (this.sliding) { return this.jQueryelement.one('slid', function () { that.to(pos) }) } if (activeIndex == pos) { return this.pause().cycle() } return this.slide(pos > activeIndex ? 'next' : 'prev', jQuery(this.jQueryitems[pos])) } , pause: function (e) { if (!e) this.paused = true if (this.jQueryelement.find('.next, .prev').length && jQuery.support.transition.end) { this.jQueryelement.trigger(jQuery.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 jQueryactive = this.jQueryelement.find('.item.active') , jQuerynext = next || jQueryactive[type]() , isCycling = this.interval , direction = type == 'next' ? 'left' : 'right' , fallback = type == 'next' ? 'first' : 'last' , that = this , e this.sliding = true isCycling && this.pause() jQuerynext = jQuerynext.length ? jQuerynext : this.jQueryelement.find('.item')[fallback]() e = jQuery.Event('slide', { relatedTarget: jQuerynext[0] , direction: direction }) if (jQuerynext.hasClass('active')) return if (this.jQueryindicators.length) { this.jQueryindicators.find('.active').removeClass('active') this.jQueryelement.one('slid', function () { var jQuerynextIndicator = jQuery(that.jQueryindicators.children()[that.getActiveIndex()]) jQuerynextIndicator && jQuerynextIndicator.addClass('active') }) } if (jQuery.support.transition && this.jQueryelement.hasClass('slide')) { this.jQueryelement.trigger(e) if (e.isDefaultPrevented()) return jQuerynext.addClass(type) jQuerynext[0].offsetWidth // force reflow jQueryactive.addClass(direction) jQuerynext.addClass(direction) this.jQueryelement.one(jQuery.support.transition.end, function () { jQuerynext.removeClass([type, direction].join(' ')).addClass('active') jQueryactive.removeClass(['active', direction].join(' ')) that.sliding = false setTimeout(function () { that.jQueryelement.trigger('slid') }, 0) }) } else { this.jQueryelement.trigger(e) if (e.isDefaultPrevented()) return jQueryactive.removeClass('active') jQuerynext.addClass('active') this.sliding = false this.jQueryelement.trigger('slid') } isCycling && this.cycle() return this } } /* CAROUSEL PLUGIN DEFINITION * ========================== */ var old = jQuery.fn.carousel jQuery.fn.carousel = function (option) { return this.each(function () { var jQuerythis = jQuery(this) , data = jQuerythis.data('carousel') , options = jQuery.extend({}, jQuery.fn.carousel.defaults, typeof option == 'object' && option) , action = typeof option == 'string' ? option : options.slide if (!data) jQuerythis.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() }) } jQuery.fn.carousel.defaults = { interval: 5000 , pause: 'hover' } jQuery.fn.carousel.Constructor = Carousel /* CAROUSEL NO CONFLICT * ==================== */ jQuery.fn.carousel.noConflict = function () { jQuery.fn.carousel = old return this } /* CAROUSEL DATA-API * ================= */ jQuery(document).on('click.carousel.data-api', '[data-slide], [data-slide-to]', function (e) { var jQuerythis = jQuery(this), href , jQuerytarget = jQuery(jQuerythis.attr('data-target') || (href = jQuerythis.attr('href')) && href.replace(/.*(?=#[^\s]+jQuery)/, '')) //strip for ie7 , options = jQuery.extend({}, jQuerytarget.data(), jQuerythis.data()) , slideIndex jQuerytarget.carousel(options) if (slideIndex = jQuerythis.attr('data-slide-to')) { jQuerytarget.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 (jQuery) { "use strict"; // jshint ;_; /* COLLAPSE PUBLIC CLASS DEFINITION * ================================ */ var Collapse = function (element, options) { this.jQueryelement = jQuery(element) this.options = jQuery.extend({}, jQuery.fn.collapse.defaults, options) if (this.options.parent) { this.jQueryparent = jQuery(this.options.parent) } this.options.toggle && this.toggle() } Collapse.prototype = { constructor: Collapse , dimension: function () { var hasWidth = this.jQueryelement.hasClass('width') return hasWidth ? 'width' : 'height' } , show: function () { var dimension , scroll , actives , hasData if (this.transitioning || this.jQueryelement.hasClass('in')) return dimension = this.dimension() scroll = jQuery.camelCase(['scroll', dimension].join('-')) actives = this.jQueryparent && this.jQueryparent.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.jQueryelement[dimension](0) this.transition('addClass', jQuery.Event('show'), 'shown') jQuery.support.transition && this.jQueryelement[dimension](this.jQueryelement[0][scroll]) } , hide: function () { var dimension if (this.transitioning || !this.jQueryelement.hasClass('in')) return dimension = this.dimension() this.reset(this.jQueryelement[dimension]()) this.transition('removeClass', jQuery.Event('hide'), 'hidden') this.jQueryelement[dimension](0) } , reset: function (size) { var dimension = this.dimension() this.jQueryelement .removeClass('collapse') [dimension](size || 'auto') [0].offsetWidth this.jQueryelement[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.jQueryelement.trigger(completeEvent) } this.jQueryelement.trigger(startEvent) if (startEvent.isDefaultPrevented()) return this.transitioning = 1 this.jQueryelement[method]('in') jQuery.support.transition && this.jQueryelement.hasClass('collapse') ? this.jQueryelement.one(jQuery.support.transition.end, complete) : complete() } , toggle: function () { this[this.jQueryelement.hasClass('in') ? 'hide' : 'show']() } } /* COLLAPSE PLUGIN DEFINITION * ========================== */ var old = jQuery.fn.collapse jQuery.fn.collapse = function (option) { return this.each(function () { var jQuerythis = jQuery(this) , data = jQuerythis.data('collapse') , options = jQuery.extend({}, jQuery.fn.collapse.defaults, jQuerythis.data(), typeof option == 'object' && option) if (!data) jQuerythis.data('collapse', (data = new Collapse(this, options))) if (typeof option == 'string') data[option]() }) } jQuery.fn.collapse.defaults = { toggle: true } jQuery.fn.collapse.Constructor = Collapse /* COLLAPSE NO CONFLICT * ==================== */ jQuery.fn.collapse.noConflict = function () { jQuery.fn.collapse = old return this } /* COLLAPSE DATA-API * ================= */ jQuery(document).on('click.collapse.data-api', '[data-toggle=collapse]', function (e) { var jQuerythis = jQuery(this), href , target = jQuerythis.attr('data-target') || e.preventDefault() || (href = jQuerythis.attr('href')) && href.replace(/.*(?=#[^\s]+jQuery)/, '') //strip for ie7 , option = jQuery(target).data('collapse') ? 'toggle' : jQuerythis.data() jQuerythis[jQuery(target).hasClass('in') ? 'addClass' : 'removeClass']('collapsed') jQuery(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 (jQuery) { "use strict"; // jshint ;_; /* DROPDOWN CLASS DEFINITION * ========================= */ var toggle = '[data-toggle=dropdown]' , Dropdown = function (element) { var jQueryel = jQuery(element).on('click.dropdown.data-api', this.toggle) jQuery('html').on('click.dropdown.data-api', function () { jQueryel.parent().removeClass('open') }) } Dropdown.prototype = { constructor: Dropdown , toggle: function (e) { var jQuerythis = jQuery(this) , jQueryparent , isActive if (jQuerythis.is('.disabled, :disabled')) return jQueryparent = getParent(jQuerythis) isActive = jQueryparent.hasClass('open') clearMenus() if (!isActive) { jQueryparent.toggleClass('open') } jQuerythis.focus() return false } , keydown: function (e) { var jQuerythis , jQueryitems , jQueryactive , jQueryparent , isActive , index if (!/(38|40|27)/.test(e.keyCode)) return jQuerythis = jQuery(this) e.preventDefault() e.stopPropagation() if (jQuerythis.is('.disabled, :disabled')) return jQueryparent = getParent(jQuerythis) isActive = jQueryparent.hasClass('open') if (!isActive || (isActive && e.keyCode == 27)) { if (e.which == 27) jQueryparent.find(toggle).focus() return jQuerythis.click() } jQueryitems = jQuery('[role=menu] li:not(.divider):visible a', jQueryparent) if (!jQueryitems.length) return index = jQueryitems.index(jQueryitems.filter(':focus')) if (e.keyCode == 38 && index > 0) index-- // up if (e.keyCode == 40 && index < jQueryitems.length - 1) index++ // down if (!~index) index = 0 jQueryitems .eq(index) .focus() } } function clearMenus() { jQuery(toggle).each(function () { getParent(jQuery(this)).removeClass('open') }) } function getParent(jQuerythis) { var selector = jQuerythis.attr('data-target') , jQueryparent if (!selector) { selector = jQuerythis.attr('href') selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*jQuery)/, '') //strip for ie7 } jQueryparent = selector && jQuery(selector) if (!jQueryparent || !jQueryparent.length) jQueryparent = jQuerythis.parent() return jQueryparent } /* DROPDOWN PLUGIN DEFINITION * ========================== */ var old = jQuery.fn.dropdown jQuery.fn.dropdown = function (option) { return this.each(function () { var jQuerythis = jQuery(this) , data = jQuerythis.data('dropdown') if (!data) jQuerythis.data('dropdown', (data = new Dropdown(this))) if (typeof option == 'string') data[option].call(jQuerythis) }) } jQuery.fn.dropdown.Constructor = Dropdown /* DROPDOWN NO CONFLICT * ==================== */ jQuery.fn.dropdown.noConflict = function () { jQuery.fn.dropdown = old return this } /* APPLY TO STANDARD DROPDOWN ELEMENTS * =================================== */ jQuery(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 (jQuery) { "use strict"; // jshint ;_; /* MODAL CLASS DEFINITION * ====================== */ var Modal = function (element, options) { this.options = options this.jQueryelement = jQuery(element) .delegate('[data-dismiss="modal"]', 'click.dismiss.modal', jQuery.proxy(this.hide, this)) this.options.remote && this.jQueryelement.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 = jQuery.Event('show') this.jQueryelement.trigger(e) if (this.isShown || e.isDefaultPrevented()) return this.isShown = true this.escape() this.backdrop(function () { var transition = jQuery.support.transition && that.jQueryelement.hasClass('fade') if (!that.jQueryelement.parent().length) { that.jQueryelement.appendTo(document.body) //don't move modals dom position } that.jQueryelement.show() if (transition) { that.jQueryelement[0].offsetWidth // force reflow } that.jQueryelement .addClass('in') .attr('aria-hidden', false) that.enforceFocus() transition ? that.jQueryelement.one(jQuery.support.transition.end, function () { that.jQueryelement.focus().trigger('shown') }) : that.jQueryelement.focus().trigger('shown') }) } , hide: function (e) { e && e.preventDefault() var that = this e = jQuery.Event('hide') this.jQueryelement.trigger(e) if (!this.isShown || e.isDefaultPrevented()) return this.isShown = false this.escape() jQuery(document).off('focusin.modal') this.jQueryelement .removeClass('in') .attr('aria-hidden', true) jQuery.support.transition && this.jQueryelement.hasClass('fade') ? this.hideWithTransition() : this.hideModal() } , enforceFocus: function () { var that = this jQuery(document).on('focusin.modal', function (e) { if (that.jQueryelement[0] !== e.target && !that.jQueryelement.has(e.target).length) { that.jQueryelement.focus() } }) } , escape: function () { var that = this if (this.isShown && this.options.keyboard) { this.jQueryelement.on('keyup.dismiss.modal', function ( e ) { e.which == 27 && that.hide() }) } else if (!this.isShown) { this.jQueryelement.off('keyup.dismiss.modal') } } , hideWithTransition: function () { var that = this , timeout = setTimeout(function () { that.jQueryelement.off(jQuery.support.transition.end) that.hideModal() }, 500) this.jQueryelement.one(jQuery.support.transition.end, function () { clearTimeout(timeout) that.hideModal() }) } , hideModal: function () { var that = this this.jQueryelement.hide() this.backdrop(function () { that.removeBackdrop() that.jQueryelement.trigger('hidden') }) } , removeBackdrop: function () { this.jQuerybackdrop && this.jQuerybackdrop.remove() this.jQuerybackdrop = null } , backdrop: function (callback) { var that = this , animate = this.jQueryelement.hasClass('fade') ? 'fade' : '' if (this.isShown && this.options.backdrop) { var doAnimate = jQuery.support.transition && animate this.jQuerybackdrop = jQuery('
') .appendTo(document.body) this.jQuerybackdrop.click( this.options.backdrop == 'static' ? jQuery.proxy(this.jQueryelement[0].focus, this.jQueryelement[0]) : jQuery.proxy(this.hide, this) ) if (doAnimate) this.jQuerybackdrop[0].offsetWidth // force reflow this.jQuerybackdrop.addClass('in') if (!callback) return doAnimate ? this.jQuerybackdrop.one(jQuery.support.transition.end, callback) : callback() } else if (!this.isShown && this.jQuerybackdrop) { this.jQuerybackdrop.removeClass('in') jQuery.support.transition && this.jQueryelement.hasClass('fade')? this.jQuerybackdrop.one(jQuery.support.transition.end, callback) : callback() } else if (callback) { callback() } } } /* MODAL PLUGIN DEFINITION * ======================= */ var old = jQuery.fn.modal jQuery.fn.modal = function (option) { return this.each(function () { var jQuerythis = jQuery(this) , data = jQuerythis.data('modal') , options = jQuery.extend({}, jQuery.fn.modal.defaults, jQuerythis.data(), typeof option == 'object' && option) if (!data) jQuerythis.data('modal', (data = new Modal(this, options))) if (typeof option == 'string') data[option]() else if (options.show) data.show() }) } jQuery.fn.modal.defaults = { backdrop: true , keyboard: true , show: true } jQuery.fn.modal.Constructor = Modal /* MODAL NO CONFLICT * ================= */ jQuery.fn.modal.noConflict = function () { jQuery.fn.modal = old return this } /* MODAL DATA-API * ============== */ jQuery(document).on('click.modal.data-api', '[data-toggle="modal"]', function (e) { var jQuerythis = jQuery(this) , href = jQuerythis.attr('href') , jQuerytarget = jQuery(jQuerythis.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+jQuery)/, ''))) //strip for ie7 , option = jQuerytarget.data('modal') ? 'toggle' : jQuery.extend({ remote:!/#/.test(href) && href }, jQuerytarget.data(), jQuerythis.data()) e.preventDefault() jQuerytarget .modal(option) .one('hide', function () { jQuerythis.focus() }) }) }(window.jQuery); /* =========================================================== * bootstrap-tooltip.js v2.3.1 * http://twitter.github.com/bootstrap/javascript.html#tooltips * Inspired by the original jQuery.tipsy by Jason Frame * =========================================================== * 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 (jQuery) { "use strict"; // jshint ;_; /* TOOLTIP PUBLIC CLASS DEFINITION * =============================== */ var Tooltip = function (element, options) { this.init('tooltip', element, options) } Tooltip.prototype = { constructor: Tooltip , init: function (type, element, options) { var eventIn , eventOut , triggers , trigger , i this.type = type this.jQueryelement = jQuery(element) this.options = this.getOptions(options) this.enabled = true triggers = this.options.trigger.split(' ') for (i = triggers.length; i--;) { trigger = triggers[i] if (trigger == 'click') { this.jQueryelement.on('click.' + this.type, this.options.selector, jQuery.proxy(this.toggle, this)) } else if (trigger != 'manual') { eventIn = trigger == 'hover' ? 'mouseenter' : 'focus' eventOut = trigger == 'hover' ? 'mouseleave' : 'blur' this.jQueryelement.on(eventIn + '.' + this.type, this.options.selector, jQuery.proxy(this.enter, this)) this.jQueryelement.on(eventOut + '.' + this.type, this.options.selector, jQuery.proxy(this.leave, this)) } } this.options.selector ? (this._options = jQuery.extend({}, this.options, { trigger: 'manual', selector: '' })) : this.fixTitle() } , getOptions: function (options) { options = jQuery.extend({}, jQuery.fn[this.type].defaults, this.jQueryelement.data(), options) if (options.delay && typeof options.delay == 'number') { options.delay = { show: options.delay , hide: options.delay } } return options } , enter: function (e) { var defaults = jQuery.fn[this.type].defaults , options = {} , self this._options && jQuery.each(this._options, function (key, value) { if (defaults[key] != value) options[key] = value }, this) self = jQuery(e.currentTarget)[this.type](options).data(this.type) if (!self.options.delay || !self.options.delay.show) return self.show() clearTimeout(this.timeout) self.hoverState = 'in' this.timeout = setTimeout(function() { if (self.hoverState == 'in') self.show() }, self.options.delay.show) } , leave: function (e) { var self = jQuery(e.currentTarget)[this.type](this._options).data(this.type) if (this.timeout) clearTimeout(this.timeout) if (!self.options.delay || !self.options.delay.hide) return self.hide() self.hoverState = 'out' this.timeout = setTimeout(function() { if (self.hoverState == 'out') self.hide() }, self.options.delay.hide) } , show: function () { var jQuerytip , pos , actualWidth , actualHeight , placement , tp , e = jQuery.Event('show') if (this.hasContent() && this.enabled) { this.jQueryelement.trigger(e) if (e.isDefaultPrevented()) return jQuerytip = this.tip() this.setContent() if (this.options.animation) { jQuerytip.addClass('fade') } placement = typeof this.options.placement == 'function' ? this.options.placement.call(this, jQuerytip[0], this.jQueryelement[0]) : this.options.placement jQuerytip .detach() .css({ top: 0, left: 0, display: 'block' }) this.options.container ? jQuerytip.appendTo(this.options.container) : jQuerytip.insertAfter(this.jQueryelement) pos = this.getPosition() actualWidth = jQuerytip[0].offsetWidth actualHeight = jQuerytip[0].offsetHeight switch (placement) { case 'bottom': tp = {top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2} break case 'top': tp = {top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2} break case 'left': tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth} break case 'right': tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width} break } this.applyPlacement(tp, placement) this.jQueryelement.trigger('shown') } } , applyPlacement: function(offset, placement){ var jQuerytip = this.tip() , width = jQuerytip[0].offsetWidth , height = jQuerytip[0].offsetHeight , actualWidth , actualHeight , delta , replace jQuerytip .offset(offset) .addClass(placement) .addClass('in') actualWidth = jQuerytip[0].offsetWidth actualHeight = jQuerytip[0].offsetHeight if (placement == 'top' && actualHeight != height) { offset.top = offset.top + height - actualHeight replace = true } if (placement == 'bottom' || placement == 'top') { delta = 0 if (offset.left < 0){ delta = offset.left * -2 offset.left = 0 jQuerytip.offset(offset) actualWidth = jQuerytip[0].offsetWidth actualHeight = jQuerytip[0].offsetHeight } this.replaceArrow(delta - width + actualWidth, actualWidth, 'left') } else { this.replaceArrow(actualHeight - height, actualHeight, 'top') } if (replace) jQuerytip.offset(offset) } , replaceArrow: function(delta, dimension, position){ this .arrow() .css(position, delta ? (50 * (1 - delta / dimension) + "%") : '') } , setContent: function () { var jQuerytip = this.tip() , title = this.getTitle() jQuerytip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title) jQuerytip.removeClass('fade in top bottom left right') } , hide: function () { var that = this , jQuerytip = this.tip() , e = jQuery.Event('hide') this.jQueryelement.trigger(e) if (e.isDefaultPrevented()) return jQuerytip.removeClass('in') function removeWithAnimation() { var timeout = setTimeout(function () { jQuerytip.off(jQuery.support.transition.end).detach() }, 500) jQuerytip.one(jQuery.support.transition.end, function () { clearTimeout(timeout) jQuerytip.detach() }) } jQuery.support.transition && this.jQuerytip.hasClass('fade') ? removeWithAnimation() : jQuerytip.detach() this.jQueryelement.trigger('hidden') return this } , fixTitle: function () { var jQuerye = this.jQueryelement if (jQuerye.attr('title') || typeof(jQuerye.attr('data-original-title')) != 'string') { jQuerye.attr('data-original-title', jQuerye.attr('title') || '').attr('title', '') } } , hasContent: function () { return this.getTitle() } , getPosition: function () { var el = this.jQueryelement[0] return jQuery.extend({}, (typeof el.getBoundingClientRect == 'function') ? el.getBoundingClientRect() : { width: el.offsetWidth , height: el.offsetHeight }, this.jQueryelement.offset()) } , getTitle: function () { var title , jQuerye = this.jQueryelement , o = this.options title = jQuerye.attr('data-original-title') || (typeof o.title == 'function' ? o.title.call(jQuerye[0]) : o.title) return title } , tip: function () { return this.jQuerytip = this.jQuerytip || jQuery(this.options.template) } , arrow: function(){ return this.jQueryarrow = this.jQueryarrow || this.tip().find(".tooltip-arrow") } , validate: function () { if (!this.jQueryelement[0].parentNode) { this.hide() this.jQueryelement = null this.options = null } } , enable: function () { this.enabled = true } , disable: function () { this.enabled = false } , toggleEnabled: function () { this.enabled = !this.enabled } , toggle: function (e) { var self = e ? jQuery(e.currentTarget)[this.type](this._options).data(this.type) : this self.tip().hasClass('in') ? self.hide() : self.show() } , destroy: function () { this.hide().jQueryelement.off('.' + this.type).removeData(this.type) } } /* TOOLTIP PLUGIN DEFINITION * ========================= */ var old = jQuery.fn.tooltip jQuery.fn.tooltip = function ( option ) { return this.each(function () { var jQuerythis = jQuery(this) , data = jQuerythis.data('tooltip') , options = typeof option == 'object' && option if (!data) jQuerythis.data('tooltip', (data = new Tooltip(this, options))) if (typeof option == 'string') data[option]() }) } jQuery.fn.tooltip.Constructor = Tooltip jQuery.fn.tooltip.defaults = { animation: true , placement: 'top' , selector: false , template: '