bjoern@17: /*! bjoern@17: * Bootstrap v3.2.0 (http://getbootstrap.com) bjoern@17: * Copyright 2011-2014 Twitter, Inc. bjoern@17: * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) bjoern@17: */ bjoern@17: bjoern@17: if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript requires jQuery') } bjoern@17: bjoern@17: /* ======================================================================== bjoern@17: * Bootstrap: transition.js v3.2.0 bjoern@17: * http://getbootstrap.com/javascript/#transitions bjoern@17: * ======================================================================== bjoern@17: * Copyright 2011-2014 Twitter, Inc. bjoern@17: * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) bjoern@17: * ======================================================================== */ bjoern@17: bjoern@17: bjoern@17: +function ($) { bjoern@17: 'use strict'; bjoern@17: bjoern@17: // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/) bjoern@17: // ============================================================ bjoern@17: bjoern@17: function transitionEnd() { bjoern@17: var el = document.createElement('bootstrap') bjoern@17: bjoern@17: var transEndEventNames = { bjoern@17: WebkitTransition : 'webkitTransitionEnd', bjoern@17: MozTransition : 'transitionend', bjoern@17: OTransition : 'oTransitionEnd otransitionend', bjoern@17: transition : 'transitionend' bjoern@17: } bjoern@17: bjoern@17: for (var name in transEndEventNames) { bjoern@17: if (el.style[name] !== undefined) { bjoern@17: return { end: transEndEventNames[name] } bjoern@17: } bjoern@17: } bjoern@17: bjoern@17: return false // explicit for ie8 ( ._.) bjoern@17: } bjoern@17: bjoern@17: // http://blog.alexmaccaw.com/css-transitions bjoern@17: $.fn.emulateTransitionEnd = function (duration) { bjoern@17: var called = false bjoern@17: var $el = this bjoern@17: $(this).one('bsTransitionEnd', function () { called = true }) bjoern@17: var callback = function () { if (!called) $($el).trigger($.support.transition.end) } bjoern@17: setTimeout(callback, duration) bjoern@17: return this bjoern@17: } bjoern@17: bjoern@17: $(function () { bjoern@17: $.support.transition = transitionEnd() bjoern@17: bjoern@17: if (!$.support.transition) return bjoern@17: bjoern@17: $.event.special.bsTransitionEnd = { bjoern@17: bindType: $.support.transition.end, bjoern@17: delegateType: $.support.transition.end, bjoern@17: handle: function (e) { bjoern@17: if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments) bjoern@17: } bjoern@17: } bjoern@17: }) bjoern@17: bjoern@17: }(jQuery); bjoern@17: bjoern@17: /* ======================================================================== bjoern@17: * Bootstrap: alert.js v3.2.0 bjoern@17: * http://getbootstrap.com/javascript/#alerts bjoern@17: * ======================================================================== bjoern@17: * Copyright 2011-2014 Twitter, Inc. bjoern@17: * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) bjoern@17: * ======================================================================== */ bjoern@17: bjoern@17: bjoern@17: +function ($) { bjoern@17: 'use strict'; bjoern@17: bjoern@17: // ALERT CLASS DEFINITION bjoern@17: // ====================== bjoern@17: bjoern@17: var dismiss = '[data-dismiss="alert"]' bjoern@17: var Alert = function (el) { bjoern@17: $(el).on('click', dismiss, this.close) bjoern@17: } bjoern@17: bjoern@17: Alert.VERSION = '3.2.0' bjoern@17: bjoern@17: Alert.prototype.close = function (e) { bjoern@17: var $this = $(this) bjoern@17: var selector = $this.attr('data-target') bjoern@17: bjoern@17: if (!selector) { bjoern@17: selector = $this.attr('href') bjoern@17: selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 bjoern@17: } bjoern@17: bjoern@17: var $parent = $(selector) bjoern@17: bjoern@17: if (e) e.preventDefault() bjoern@17: bjoern@17: if (!$parent.length) { bjoern@17: $parent = $this.hasClass('alert') ? $this : $this.parent() bjoern@17: } bjoern@17: bjoern@17: $parent.trigger(e = $.Event('close.bs.alert')) bjoern@17: bjoern@17: if (e.isDefaultPrevented()) return bjoern@17: bjoern@17: $parent.removeClass('in') bjoern@17: bjoern@17: function removeElement() { bjoern@17: // detach from parent, fire event then clean up data bjoern@17: $parent.detach().trigger('closed.bs.alert').remove() bjoern@17: } bjoern@17: bjoern@17: $.support.transition && $parent.hasClass('fade') ? bjoern@17: $parent bjoern@17: .one('bsTransitionEnd', removeElement) bjoern@17: .emulateTransitionEnd(150) : bjoern@17: removeElement() bjoern@17: } bjoern@17: bjoern@17: bjoern@17: // ALERT PLUGIN DEFINITION bjoern@17: // ======================= bjoern@17: bjoern@17: function Plugin(option) { bjoern@17: return this.each(function () { bjoern@17: var $this = $(this) bjoern@17: var data = $this.data('bs.alert') bjoern@17: bjoern@17: if (!data) $this.data('bs.alert', (data = new Alert(this))) bjoern@17: if (typeof option == 'string') data[option].call($this) bjoern@17: }) bjoern@17: } bjoern@17: bjoern@17: var old = $.fn.alert bjoern@17: bjoern@17: $.fn.alert = Plugin bjoern@17: $.fn.alert.Constructor = Alert bjoern@17: bjoern@17: bjoern@17: // ALERT NO CONFLICT bjoern@17: // ================= bjoern@17: bjoern@17: $.fn.alert.noConflict = function () { bjoern@17: $.fn.alert = old bjoern@17: return this bjoern@17: } bjoern@17: bjoern@17: bjoern@17: // ALERT DATA-API bjoern@17: // ============== bjoern@17: bjoern@17: $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close) bjoern@17: bjoern@17: }(jQuery); bjoern@17: bjoern@17: /* ======================================================================== bjoern@17: * Bootstrap: button.js v3.2.0 bjoern@17: * http://getbootstrap.com/javascript/#buttons bjoern@17: * ======================================================================== bjoern@17: * Copyright 2011-2014 Twitter, Inc. bjoern@17: * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) bjoern@17: * ======================================================================== */ bjoern@17: bjoern@17: bjoern@17: +function ($) { bjoern@17: 'use strict'; bjoern@17: bjoern@17: // BUTTON PUBLIC CLASS DEFINITION bjoern@17: // ============================== bjoern@17: bjoern@17: var Button = function (element, options) { bjoern@17: this.$element = $(element) bjoern@17: this.options = $.extend({}, Button.DEFAULTS, options) bjoern@17: this.isLoading = false bjoern@17: } bjoern@17: bjoern@17: Button.VERSION = '3.2.0' bjoern@17: bjoern@17: Button.DEFAULTS = { bjoern@17: loadingText: 'loading...' bjoern@17: } bjoern@17: bjoern@17: Button.prototype.setState = function (state) { bjoern@17: var d = 'disabled' bjoern@17: var $el = this.$element bjoern@17: var val = $el.is('input') ? 'val' : 'html' bjoern@17: var data = $el.data() bjoern@17: bjoern@17: state = state + 'Text' bjoern@17: bjoern@17: if (data.resetText == null) $el.data('resetText', $el[val]()) bjoern@17: bjoern@17: $el[val](data[state] == null ? this.options[state] : data[state]) bjoern@17: bjoern@17: // push to event loop to allow forms to submit bjoern@17: setTimeout($.proxy(function () { bjoern@17: if (state == 'loadingText') { bjoern@17: this.isLoading = true bjoern@17: $el.addClass(d).attr(d, d) bjoern@17: } else if (this.isLoading) { bjoern@17: this.isLoading = false bjoern@17: $el.removeClass(d).removeAttr(d) bjoern@17: } bjoern@17: }, this), 0) bjoern@17: } bjoern@17: bjoern@17: Button.prototype.toggle = function () { bjoern@17: var changed = true bjoern@17: var $parent = this.$element.closest('[data-toggle="buttons"]') bjoern@17: bjoern@17: if ($parent.length) { bjoern@17: var $input = this.$element.find('input') bjoern@17: if ($input.prop('type') == 'radio') { bjoern@17: if ($input.prop('checked') && this.$element.hasClass('active')) changed = false bjoern@17: else $parent.find('.active').removeClass('active') bjoern@17: } bjoern@17: if (changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change') bjoern@17: } bjoern@17: bjoern@17: if (changed) this.$element.toggleClass('active') bjoern@17: } bjoern@17: bjoern@17: bjoern@17: // BUTTON PLUGIN DEFINITION bjoern@17: // ======================== bjoern@17: bjoern@17: function Plugin(option) { bjoern@17: return this.each(function () { bjoern@17: var $this = $(this) bjoern@17: var data = $this.data('bs.button') bjoern@17: var options = typeof option == 'object' && option bjoern@17: bjoern@17: if (!data) $this.data('bs.button', (data = new Button(this, options))) bjoern@17: bjoern@17: if (option == 'toggle') data.toggle() bjoern@17: else if (option) data.setState(option) bjoern@17: }) bjoern@17: } bjoern@17: bjoern@17: var old = $.fn.button bjoern@17: bjoern@17: $.fn.button = Plugin bjoern@17: $.fn.button.Constructor = Button bjoern@17: bjoern@17: bjoern@17: // BUTTON NO CONFLICT bjoern@17: // ================== bjoern@17: bjoern@17: $.fn.button.noConflict = function () { bjoern@17: $.fn.button = old bjoern@17: return this bjoern@17: } bjoern@17: bjoern@17: bjoern@17: // BUTTON DATA-API bjoern@17: // =============== bjoern@17: bjoern@17: $(document).on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) { bjoern@17: var $btn = $(e.target) bjoern@17: if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') bjoern@17: Plugin.call($btn, 'toggle') bjoern@17: e.preventDefault() bjoern@17: }) bjoern@17: bjoern@17: }(jQuery); bjoern@17: bjoern@17: /* ======================================================================== bjoern@17: * Bootstrap: carousel.js v3.2.0 bjoern@17: * http://getbootstrap.com/javascript/#carousel bjoern@17: * ======================================================================== bjoern@17: * Copyright 2011-2014 Twitter, Inc. bjoern@17: * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) bjoern@17: * ======================================================================== */ bjoern@17: bjoern@17: bjoern@17: +function ($) { bjoern@17: 'use strict'; bjoern@17: bjoern@17: // CAROUSEL CLASS DEFINITION bjoern@17: // ========================= bjoern@17: bjoern@17: var Carousel = function (element, options) { bjoern@17: this.$element = $(element).on('keydown.bs.carousel', $.proxy(this.keydown, this)) bjoern@17: this.$indicators = this.$element.find('.carousel-indicators') bjoern@17: this.options = options bjoern@17: this.paused = bjoern@17: this.sliding = bjoern@17: this.interval = bjoern@17: this.$active = bjoern@17: this.$items = null bjoern@17: bjoern@17: this.options.pause == 'hover' && this.$element bjoern@17: .on('mouseenter.bs.carousel', $.proxy(this.pause, this)) bjoern@17: .on('mouseleave.bs.carousel', $.proxy(this.cycle, this)) bjoern@17: } bjoern@17: bjoern@17: Carousel.VERSION = '3.2.0' bjoern@17: bjoern@17: Carousel.DEFAULTS = { bjoern@17: interval: 5000, bjoern@17: pause: 'hover', bjoern@17: wrap: true bjoern@17: } bjoern@17: bjoern@17: Carousel.prototype.keydown = function (e) { bjoern@17: switch (e.which) { bjoern@17: case 37: this.prev(); break bjoern@17: case 39: this.next(); break bjoern@17: default: return bjoern@17: } bjoern@17: bjoern@17: e.preventDefault() bjoern@17: } bjoern@17: bjoern@17: Carousel.prototype.cycle = function (e) { bjoern@17: e || (this.paused = false) bjoern@17: bjoern@17: this.interval && clearInterval(this.interval) bjoern@17: bjoern@17: this.options.interval bjoern@17: && !this.paused bjoern@17: && (this.interval = setInterval($.proxy(this.next, this), this.options.interval)) bjoern@17: bjoern@17: return this bjoern@17: } bjoern@17: bjoern@17: Carousel.prototype.getItemIndex = function (item) { bjoern@17: this.$items = item.parent().children('.item') bjoern@17: return this.$items.index(item || this.$active) bjoern@17: } bjoern@17: bjoern@17: Carousel.prototype.to = function (pos) { bjoern@17: var that = this bjoern@17: var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active')) bjoern@17: bjoern@17: if (pos > (this.$items.length - 1) || pos < 0) return bjoern@17: bjoern@17: if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid" bjoern@17: if (activeIndex == pos) return this.pause().cycle() bjoern@17: bjoern@17: return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos])) bjoern@17: } bjoern@17: bjoern@17: Carousel.prototype.pause = function (e) { bjoern@17: e || (this.paused = true) bjoern@17: bjoern@17: if (this.$element.find('.next, .prev').length && $.support.transition) { bjoern@17: this.$element.trigger($.support.transition.end) bjoern@17: this.cycle(true) bjoern@17: } bjoern@17: bjoern@17: this.interval = clearInterval(this.interval) bjoern@17: bjoern@17: return this bjoern@17: } bjoern@17: bjoern@17: Carousel.prototype.next = function () { bjoern@17: if (this.sliding) return bjoern@17: return this.slide('next') bjoern@17: } bjoern@17: bjoern@17: Carousel.prototype.prev = function () { bjoern@17: if (this.sliding) return bjoern@17: return this.slide('prev') bjoern@17: } bjoern@17: bjoern@17: Carousel.prototype.slide = function (type, next) { bjoern@17: var $active = this.$element.find('.item.active') bjoern@17: var $next = next || $active[type]() bjoern@17: var isCycling = this.interval bjoern@17: var direction = type == 'next' ? 'left' : 'right' bjoern@17: var fallback = type == 'next' ? 'first' : 'last' bjoern@17: var that = this bjoern@17: bjoern@17: if (!$next.length) { bjoern@17: if (!this.options.wrap) return bjoern@17: $next = this.$element.find('.item')[fallback]() bjoern@17: } bjoern@17: bjoern@17: if ($next.hasClass('active')) return (this.sliding = false) bjoern@17: bjoern@17: var relatedTarget = $next[0] bjoern@17: var slideEvent = $.Event('slide.bs.carousel', { bjoern@17: relatedTarget: relatedTarget, bjoern@17: direction: direction bjoern@17: }) bjoern@17: this.$element.trigger(slideEvent) bjoern@17: if (slideEvent.isDefaultPrevented()) return bjoern@17: bjoern@17: this.sliding = true bjoern@17: bjoern@17: isCycling && this.pause() bjoern@17: bjoern@17: if (this.$indicators.length) { bjoern@17: this.$indicators.find('.active').removeClass('active') bjoern@17: var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)]) bjoern@17: $nextIndicator && $nextIndicator.addClass('active') bjoern@17: } bjoern@17: bjoern@17: var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid" bjoern@17: if ($.support.transition && this.$element.hasClass('slide')) { bjoern@17: $next.addClass(type) bjoern@17: $next[0].offsetWidth // force reflow bjoern@17: $active.addClass(direction) bjoern@17: $next.addClass(direction) bjoern@17: $active bjoern@17: .one('bsTransitionEnd', function () { bjoern@17: $next.removeClass([type, direction].join(' ')).addClass('active') bjoern@17: $active.removeClass(['active', direction].join(' ')) bjoern@17: that.sliding = false bjoern@17: setTimeout(function () { bjoern@17: that.$element.trigger(slidEvent) bjoern@17: }, 0) bjoern@17: }) bjoern@17: .emulateTransitionEnd($active.css('transition-duration').slice(0, -1) * 1000) bjoern@17: } else { bjoern@17: $active.removeClass('active') bjoern@17: $next.addClass('active') bjoern@17: this.sliding = false bjoern@17: this.$element.trigger(slidEvent) bjoern@17: } bjoern@17: bjoern@17: isCycling && this.cycle() bjoern@17: bjoern@17: return this bjoern@17: } bjoern@17: bjoern@17: bjoern@17: // CAROUSEL PLUGIN DEFINITION bjoern@17: // ========================== bjoern@17: bjoern@17: function Plugin(option) { bjoern@17: return this.each(function () { bjoern@17: var $this = $(this) bjoern@17: var data = $this.data('bs.carousel') bjoern@17: var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option) bjoern@17: var action = typeof option == 'string' ? option : options.slide bjoern@17: bjoern@17: if (!data) $this.data('bs.carousel', (data = new Carousel(this, options))) bjoern@17: if (typeof option == 'number') data.to(option) bjoern@17: else if (action) data[action]() bjoern@17: else if (options.interval) data.pause().cycle() bjoern@17: }) bjoern@17: } bjoern@17: bjoern@17: var old = $.fn.carousel bjoern@17: bjoern@17: $.fn.carousel = Plugin bjoern@17: $.fn.carousel.Constructor = Carousel bjoern@17: bjoern@17: bjoern@17: // CAROUSEL NO CONFLICT bjoern@17: // ==================== bjoern@17: bjoern@17: $.fn.carousel.noConflict = function () { bjoern@17: $.fn.carousel = old bjoern@17: return this bjoern@17: } bjoern@17: bjoern@17: bjoern@17: // CAROUSEL DATA-API bjoern@17: // ================= bjoern@17: bjoern@17: $(document).on('click.bs.carousel.data-api', '[data-slide], [data-slide-to]', function (e) { bjoern@17: var href bjoern@17: var $this = $(this) bjoern@17: var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7 bjoern@17: if (!$target.hasClass('carousel')) return bjoern@17: var options = $.extend({}, $target.data(), $this.data()) bjoern@17: var slideIndex = $this.attr('data-slide-to') bjoern@17: if (slideIndex) options.interval = false bjoern@17: bjoern@17: Plugin.call($target, options) bjoern@17: bjoern@17: if (slideIndex) { bjoern@17: $target.data('bs.carousel').to(slideIndex) bjoern@17: } bjoern@17: bjoern@17: e.preventDefault() bjoern@17: }) bjoern@17: bjoern@17: $(window).on('load', function () { bjoern@17: $('[data-ride="carousel"]').each(function () { bjoern@17: var $carousel = $(this) bjoern@17: Plugin.call($carousel, $carousel.data()) bjoern@17: }) bjoern@17: }) bjoern@17: bjoern@17: }(jQuery); bjoern@17: bjoern@17: /* ======================================================================== bjoern@17: * Bootstrap: collapse.js v3.2.0 bjoern@17: * http://getbootstrap.com/javascript/#collapse bjoern@17: * ======================================================================== bjoern@17: * Copyright 2011-2014 Twitter, Inc. bjoern@17: * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) bjoern@17: * ======================================================================== */ bjoern@17: bjoern@17: bjoern@17: +function ($) { bjoern@17: 'use strict'; bjoern@17: bjoern@17: // COLLAPSE PUBLIC CLASS DEFINITION bjoern@17: // ================================ bjoern@17: bjoern@17: var Collapse = function (element, options) { bjoern@17: this.$element = $(element) bjoern@17: this.options = $.extend({}, Collapse.DEFAULTS, options) bjoern@17: this.transitioning = null bjoern@17: bjoern@17: if (this.options.parent) this.$parent = $(this.options.parent) bjoern@17: if (this.options.toggle) this.toggle() bjoern@17: } bjoern@17: bjoern@17: Collapse.VERSION = '3.2.0' bjoern@17: bjoern@17: Collapse.DEFAULTS = { bjoern@17: toggle: true bjoern@17: } bjoern@17: bjoern@17: Collapse.prototype.dimension = function () { bjoern@17: var hasWidth = this.$element.hasClass('width') bjoern@17: return hasWidth ? 'width' : 'height' bjoern@17: } bjoern@17: bjoern@17: Collapse.prototype.show = function () { bjoern@17: if (this.transitioning || this.$element.hasClass('in')) return bjoern@17: bjoern@17: var startEvent = $.Event('show.bs.collapse') bjoern@17: this.$element.trigger(startEvent) bjoern@17: if (startEvent.isDefaultPrevented()) return bjoern@17: bjoern@17: var actives = this.$parent && this.$parent.find('> .panel > .in') bjoern@17: bjoern@17: if (actives && actives.length) { bjoern@17: var hasData = actives.data('bs.collapse') bjoern@17: if (hasData && hasData.transitioning) return bjoern@17: Plugin.call(actives, 'hide') bjoern@17: hasData || actives.data('bs.collapse', null) bjoern@17: } bjoern@17: bjoern@17: var dimension = this.dimension() bjoern@17: bjoern@17: this.$element bjoern@17: .removeClass('collapse') bjoern@17: .addClass('collapsing')[dimension](0) bjoern@17: bjoern@17: this.transitioning = 1 bjoern@17: bjoern@17: var complete = function () { bjoern@17: this.$element bjoern@17: .removeClass('collapsing') bjoern@17: .addClass('collapse in')[dimension]('') bjoern@17: this.transitioning = 0 bjoern@17: this.$element bjoern@17: .trigger('shown.bs.collapse') bjoern@17: } bjoern@17: bjoern@17: if (!$.support.transition) return complete.call(this) bjoern@17: bjoern@17: var scrollSize = $.camelCase(['scroll', dimension].join('-')) bjoern@17: bjoern@17: this.$element bjoern@17: .one('bsTransitionEnd', $.proxy(complete, this)) bjoern@17: .emulateTransitionEnd(350)[dimension](this.$element[0][scrollSize]) bjoern@17: } bjoern@17: bjoern@17: Collapse.prototype.hide = function () { bjoern@17: if (this.transitioning || !this.$element.hasClass('in')) return bjoern@17: bjoern@17: var startEvent = $.Event('hide.bs.collapse') bjoern@17: this.$element.trigger(startEvent) bjoern@17: if (startEvent.isDefaultPrevented()) return bjoern@17: bjoern@17: var dimension = this.dimension() bjoern@17: bjoern@17: this.$element[dimension](this.$element[dimension]())[0].offsetHeight bjoern@17: bjoern@17: this.$element bjoern@17: .addClass('collapsing') bjoern@17: .removeClass('collapse') bjoern@17: .removeClass('in') bjoern@17: bjoern@17: this.transitioning = 1 bjoern@17: bjoern@17: var complete = function () { bjoern@17: this.transitioning = 0 bjoern@17: this.$element bjoern@17: .trigger('hidden.bs.collapse') bjoern@17: .removeClass('collapsing') bjoern@17: .addClass('collapse') bjoern@17: } bjoern@17: bjoern@17: if (!$.support.transition) return complete.call(this) bjoern@17: bjoern@17: this.$element bjoern@17: [dimension](0) bjoern@17: .one('bsTransitionEnd', $.proxy(complete, this)) bjoern@17: .emulateTransitionEnd(350) bjoern@17: } bjoern@17: bjoern@17: Collapse.prototype.toggle = function () { bjoern@17: this[this.$element.hasClass('in') ? 'hide' : 'show']() bjoern@17: } bjoern@17: bjoern@17: bjoern@17: // COLLAPSE PLUGIN DEFINITION bjoern@17: // ========================== bjoern@17: bjoern@17: function Plugin(option) { bjoern@17: return this.each(function () { bjoern@17: var $this = $(this) bjoern@17: var data = $this.data('bs.collapse') bjoern@17: var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option) bjoern@17: bjoern@17: if (!data && options.toggle && option == 'show') option = !option bjoern@17: if (!data) $this.data('bs.collapse', (data = new Collapse(this, options))) bjoern@17: if (typeof option == 'string') data[option]() bjoern@17: }) bjoern@17: } bjoern@17: bjoern@17: var old = $.fn.collapse bjoern@17: bjoern@17: $.fn.collapse = Plugin bjoern@17: $.fn.collapse.Constructor = Collapse bjoern@17: bjoern@17: bjoern@17: // COLLAPSE NO CONFLICT bjoern@17: // ==================== bjoern@17: bjoern@17: $.fn.collapse.noConflict = function () { bjoern@17: $.fn.collapse = old bjoern@17: return this bjoern@17: } bjoern@17: bjoern@17: bjoern@17: // COLLAPSE DATA-API bjoern@17: // ================= bjoern@17: bjoern@17: $(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) { bjoern@17: var href bjoern@17: var $this = $(this) bjoern@17: var target = $this.attr('data-target') bjoern@17: || e.preventDefault() bjoern@17: || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7 bjoern@17: var $target = $(target) bjoern@17: var data = $target.data('bs.collapse') bjoern@17: var option = data ? 'toggle' : $this.data() bjoern@17: var parent = $this.attr('data-parent') bjoern@17: var $parent = parent && $(parent) bjoern@17: bjoern@17: if (!data || !data.transitioning) { bjoern@17: if ($parent) $parent.find('[data-toggle="collapse"][data-parent="' + parent + '"]').not($this).addClass('collapsed') bjoern@17: $this[$target.hasClass('in') ? 'addClass' : 'removeClass']('collapsed') bjoern@17: } bjoern@17: bjoern@17: Plugin.call($target, option) bjoern@17: }) bjoern@17: bjoern@17: }(jQuery); bjoern@17: bjoern@17: /* ======================================================================== bjoern@17: * Bootstrap: dropdown.js v3.2.0 bjoern@17: * http://getbootstrap.com/javascript/#dropdowns bjoern@17: * ======================================================================== bjoern@17: * Copyright 2011-2014 Twitter, Inc. bjoern@17: * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) bjoern@17: * ======================================================================== */ bjoern@17: bjoern@17: bjoern@17: +function ($) { bjoern@17: 'use strict'; bjoern@17: bjoern@17: // DROPDOWN CLASS DEFINITION bjoern@17: // ========================= bjoern@17: bjoern@17: var backdrop = '.dropdown-backdrop' bjoern@17: var toggle = '[data-toggle="dropdown"]' bjoern@17: var Dropdown = function (element) { bjoern@17: $(element).on('click.bs.dropdown', this.toggle) bjoern@17: } bjoern@17: bjoern@17: Dropdown.VERSION = '3.2.0' bjoern@17: bjoern@17: Dropdown.prototype.toggle = function (e) { bjoern@17: var $this = $(this) bjoern@17: bjoern@17: if ($this.is('.disabled, :disabled')) return bjoern@17: bjoern@17: var $parent = getParent($this) bjoern@17: var isActive = $parent.hasClass('open') bjoern@17: bjoern@17: clearMenus() bjoern@17: bjoern@17: if (!isActive) { bjoern@17: if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) { bjoern@17: // if mobile we use a backdrop because click events don't delegate bjoern@17: $('
').insertAfter($(this)).on('click', clearMenus) bjoern@17: } bjoern@17: bjoern@17: var relatedTarget = { relatedTarget: this } bjoern@17: $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget)) bjoern@17: bjoern@17: if (e.isDefaultPrevented()) return bjoern@17: bjoern@17: $this.trigger('focus') bjoern@17: bjoern@17: $parent bjoern@17: .toggleClass('open') bjoern@17: .trigger('shown.bs.dropdown', relatedTarget) bjoern@17: } bjoern@17: bjoern@17: return false bjoern@17: } bjoern@17: bjoern@17: Dropdown.prototype.keydown = function (e) { bjoern@17: if (!/(38|40|27)/.test(e.keyCode)) return bjoern@17: bjoern@17: var $this = $(this) bjoern@17: bjoern@17: e.preventDefault() bjoern@17: e.stopPropagation() bjoern@17: bjoern@17: if ($this.is('.disabled, :disabled')) return bjoern@17: bjoern@17: var $parent = getParent($this) bjoern@17: var isActive = $parent.hasClass('open') bjoern@17: bjoern@17: if (!isActive || (isActive && e.keyCode == 27)) { bjoern@17: if (e.which == 27) $parent.find(toggle).trigger('focus') bjoern@17: return $this.trigger('click') bjoern@17: } bjoern@17: bjoern@17: var desc = ' li:not(.divider):visible a' bjoern@17: var $items = $parent.find('[role="menu"]' + desc + ', [role="listbox"]' + desc) bjoern@17: bjoern@17: if (!$items.length) return bjoern@17: bjoern@17: var index = $items.index($items.filter(':focus')) bjoern@17: bjoern@17: if (e.keyCode == 38 && index > 0) index-- // up bjoern@17: if (e.keyCode == 40 && index < $items.length - 1) index++ // down bjoern@17: if (!~index) index = 0 bjoern@17: bjoern@17: $items.eq(index).trigger('focus') bjoern@17: } bjoern@17: bjoern@17: function clearMenus(e) { bjoern@17: if (e && e.which === 3) return bjoern@17: $(backdrop).remove() bjoern@17: $(toggle).each(function () { bjoern@17: var $parent = getParent($(this)) bjoern@17: var relatedTarget = { relatedTarget: this } bjoern@17: if (!$parent.hasClass('open')) return bjoern@17: $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget)) bjoern@17: if (e.isDefaultPrevented()) return bjoern@17: $parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget) bjoern@17: }) bjoern@17: } bjoern@17: bjoern@17: function getParent($this) { bjoern@17: var selector = $this.attr('data-target') bjoern@17: bjoern@17: if (!selector) { bjoern@17: selector = $this.attr('href') bjoern@17: selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 bjoern@17: } bjoern@17: bjoern@17: var $parent = selector && $(selector) bjoern@17: bjoern@17: return $parent && $parent.length ? $parent : $this.parent() bjoern@17: } bjoern@17: bjoern@17: bjoern@17: // DROPDOWN PLUGIN DEFINITION bjoern@17: // ========================== bjoern@17: bjoern@17: function Plugin(option) { bjoern@17: return this.each(function () { bjoern@17: var $this = $(this) bjoern@17: var data = $this.data('bs.dropdown') bjoern@17: bjoern@17: if (!data) $this.data('bs.dropdown', (data = new Dropdown(this))) bjoern@17: if (typeof option == 'string') data[option].call($this) bjoern@17: }) bjoern@17: } bjoern@17: bjoern@17: var old = $.fn.dropdown bjoern@17: bjoern@17: $.fn.dropdown = Plugin bjoern@17: $.fn.dropdown.Constructor = Dropdown bjoern@17: bjoern@17: bjoern@17: // DROPDOWN NO CONFLICT bjoern@17: // ==================== bjoern@17: bjoern@17: $.fn.dropdown.noConflict = function () { bjoern@17: $.fn.dropdown = old bjoern@17: return this bjoern@17: } bjoern@17: bjoern@17: bjoern@17: // APPLY TO STANDARD DROPDOWN ELEMENTS bjoern@17: // =================================== bjoern@17: bjoern@17: $(document) bjoern@17: .on('click.bs.dropdown.data-api', clearMenus) bjoern@17: .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() }) bjoern@17: .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle) bjoern@17: .on('keydown.bs.dropdown.data-api', toggle + ', [role="menu"], [role="listbox"]', Dropdown.prototype.keydown) bjoern@17: bjoern@17: }(jQuery); bjoern@17: bjoern@17: /* ======================================================================== bjoern@17: * Bootstrap: modal.js v3.2.0 bjoern@17: * http://getbootstrap.com/javascript/#modals bjoern@17: * ======================================================================== bjoern@17: * Copyright 2011-2014 Twitter, Inc. bjoern@17: * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) bjoern@17: * ======================================================================== */ bjoern@17: bjoern@17: bjoern@17: +function ($) { bjoern@17: 'use strict'; bjoern@17: bjoern@17: // MODAL CLASS DEFINITION bjoern@17: // ====================== bjoern@17: bjoern@17: var Modal = function (element, options) { bjoern@17: this.options = options bjoern@17: this.$body = $(document.body) bjoern@17: this.$element = $(element) bjoern@17: this.$backdrop = bjoern@17: this.isShown = null bjoern@17: this.scrollbarWidth = 0 bjoern@17: bjoern@17: if (this.options.remote) { bjoern@17: this.$element bjoern@17: .find('.modal-content') bjoern@17: .load(this.options.remote, $.proxy(function () { bjoern@17: this.$element.trigger('loaded.bs.modal') bjoern@17: }, this)) bjoern@17: } bjoern@17: } bjoern@17: bjoern@17: Modal.VERSION = '3.2.0' bjoern@17: bjoern@17: Modal.DEFAULTS = { bjoern@17: backdrop: true, bjoern@17: keyboard: true, bjoern@17: show: true bjoern@17: } bjoern@17: bjoern@17: Modal.prototype.toggle = function (_relatedTarget) { bjoern@17: return this.isShown ? this.hide() : this.show(_relatedTarget) bjoern@17: } bjoern@17: bjoern@17: Modal.prototype.show = function (_relatedTarget) { bjoern@17: var that = this bjoern@17: var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget }) bjoern@17: bjoern@17: this.$element.trigger(e) bjoern@17: bjoern@17: if (this.isShown || e.isDefaultPrevented()) return bjoern@17: bjoern@17: this.isShown = true bjoern@17: bjoern@17: this.checkScrollbar() bjoern@17: this.$body.addClass('modal-open') bjoern@17: bjoern@17: this.setScrollbar() bjoern@17: this.escape() bjoern@17: bjoern@17: this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this)) bjoern@17: bjoern@17: this.backdrop(function () { bjoern@17: var transition = $.support.transition && that.$element.hasClass('fade') bjoern@17: bjoern@17: if (!that.$element.parent().length) { bjoern@17: that.$element.appendTo(that.$body) // don't move modals dom position bjoern@17: } bjoern@17: bjoern@17: that.$element bjoern@17: .show() bjoern@17: .scrollTop(0) bjoern@17: bjoern@17: if (transition) { bjoern@17: that.$element[0].offsetWidth // force reflow bjoern@17: } bjoern@17: bjoern@17: that.$element bjoern@17: .addClass('in') bjoern@17: .attr('aria-hidden', false) bjoern@17: bjoern@17: that.enforceFocus() bjoern@17: bjoern@17: var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget }) bjoern@17: bjoern@17: transition ? bjoern@17: that.$element.find('.modal-dialog') // wait for modal to slide in bjoern@17: .one('bsTransitionEnd', function () { bjoern@17: that.$element.trigger('focus').trigger(e) bjoern@17: }) bjoern@17: .emulateTransitionEnd(300) : bjoern@17: that.$element.trigger('focus').trigger(e) bjoern@17: }) bjoern@17: } bjoern@17: bjoern@17: Modal.prototype.hide = function (e) { bjoern@17: if (e) e.preventDefault() bjoern@17: bjoern@17: e = $.Event('hide.bs.modal') bjoern@17: bjoern@17: this.$element.trigger(e) bjoern@17: bjoern@17: if (!this.isShown || e.isDefaultPrevented()) return bjoern@17: bjoern@17: this.isShown = false bjoern@17: bjoern@17: this.$body.removeClass('modal-open') bjoern@17: bjoern@17: this.resetScrollbar() bjoern@17: this.escape() bjoern@17: bjoern@17: $(document).off('focusin.bs.modal') bjoern@17: bjoern@17: this.$element bjoern@17: .removeClass('in') bjoern@17: .attr('aria-hidden', true) bjoern@17: .off('click.dismiss.bs.modal') bjoern@17: bjoern@17: $.support.transition && this.$element.hasClass('fade') ? bjoern@17: this.$element bjoern@17: .one('bsTransitionEnd', $.proxy(this.hideModal, this)) bjoern@17: .emulateTransitionEnd(300) : bjoern@17: this.hideModal() bjoern@17: } bjoern@17: bjoern@17: Modal.prototype.enforceFocus = function () { bjoern@17: $(document) bjoern@17: .off('focusin.bs.modal') // guard against infinite focus loop bjoern@17: .on('focusin.bs.modal', $.proxy(function (e) { bjoern@17: if (this.$element[0] !== e.target && !this.$element.has(e.target).length) { bjoern@17: this.$element.trigger('focus') bjoern@17: } bjoern@17: }, this)) bjoern@17: } bjoern@17: bjoern@17: Modal.prototype.escape = function () { bjoern@17: if (this.isShown && this.options.keyboard) { bjoern@17: this.$element.on('keyup.dismiss.bs.modal', $.proxy(function (e) { bjoern@17: e.which == 27 && this.hide() bjoern@17: }, this)) bjoern@17: } else if (!this.isShown) { bjoern@17: this.$element.off('keyup.dismiss.bs.modal') bjoern@17: } bjoern@17: } bjoern@17: bjoern@17: Modal.prototype.hideModal = function () { bjoern@17: var that = this bjoern@17: this.$element.hide() bjoern@17: this.backdrop(function () { bjoern@17: that.$element.trigger('hidden.bs.modal') bjoern@17: }) bjoern@17: } bjoern@17: bjoern@17: Modal.prototype.removeBackdrop = function () { bjoern@17: this.$backdrop && this.$backdrop.remove() bjoern@17: this.$backdrop = null bjoern@17: } bjoern@17: bjoern@17: Modal.prototype.backdrop = function (callback) { bjoern@17: var that = this bjoern@17: var animate = this.$element.hasClass('fade') ? 'fade' : '' bjoern@17: bjoern@17: if (this.isShown && this.options.backdrop) { bjoern@17: var doAnimate = $.support.transition && animate bjoern@17: bjoern@17: this.$backdrop = $('') bjoern@17: .appendTo(this.$body) bjoern@17: bjoern@17: this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) { bjoern@17: if (e.target !== e.currentTarget) return bjoern@17: this.options.backdrop == 'static' bjoern@17: ? this.$element[0].focus.call(this.$element[0]) bjoern@17: : this.hide.call(this) bjoern@17: }, this)) bjoern@17: bjoern@17: if (doAnimate) this.$backdrop[0].offsetWidth // force reflow bjoern@17: bjoern@17: this.$backdrop.addClass('in') bjoern@17: bjoern@17: if (!callback) return bjoern@17: bjoern@17: doAnimate ? bjoern@17: this.$backdrop bjoern@17: .one('bsTransitionEnd', callback) bjoern@17: .emulateTransitionEnd(150) : bjoern@17: callback() bjoern@17: bjoern@17: } else if (!this.isShown && this.$backdrop) { bjoern@17: this.$backdrop.removeClass('in') bjoern@17: bjoern@17: var callbackRemove = function () { bjoern@17: that.removeBackdrop() bjoern@17: callback && callback() bjoern@17: } bjoern@17: $.support.transition && this.$element.hasClass('fade') ? bjoern@17: this.$backdrop bjoern@17: .one('bsTransitionEnd', callbackRemove) bjoern@17: .emulateTransitionEnd(150) : bjoern@17: callbackRemove() bjoern@17: bjoern@17: } else if (callback) { bjoern@17: callback() bjoern@17: } bjoern@17: } bjoern@17: bjoern@17: Modal.prototype.checkScrollbar = function () { bjoern@17: if (document.body.clientWidth >= window.innerWidth) return bjoern@17: this.scrollbarWidth = this.scrollbarWidth || this.measureScrollbar() bjoern@17: } bjoern@17: bjoern@17: Modal.prototype.setScrollbar = function () { bjoern@17: var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10) bjoern@17: if (this.scrollbarWidth) this.$body.css('padding-right', bodyPad + this.scrollbarWidth) bjoern@17: } bjoern@17: bjoern@17: Modal.prototype.resetScrollbar = function () { bjoern@17: this.$body.css('padding-right', '') bjoern@17: } bjoern@17: bjoern@17: Modal.prototype.measureScrollbar = function () { // thx walsh bjoern@17: var scrollDiv = document.createElement('div') bjoern@17: scrollDiv.className = 'modal-scrollbar-measure' bjoern@17: this.$body.append(scrollDiv) bjoern@17: var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth bjoern@17: this.$body[0].removeChild(scrollDiv) bjoern@17: return scrollbarWidth bjoern@17: } bjoern@17: bjoern@17: bjoern@17: // MODAL PLUGIN DEFINITION bjoern@17: // ======================= bjoern@17: bjoern@17: function Plugin(option, _relatedTarget) { bjoern@17: return this.each(function () { bjoern@17: var $this = $(this) bjoern@17: var data = $this.data('bs.modal') bjoern@17: var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option) bjoern@17: bjoern@17: if (!data) $this.data('bs.modal', (data = new Modal(this, options))) bjoern@17: if (typeof option == 'string') data[option](_relatedTarget) bjoern@17: else if (options.show) data.show(_relatedTarget) bjoern@17: }) bjoern@17: } bjoern@17: bjoern@17: var old = $.fn.modal bjoern@17: bjoern@17: $.fn.modal = Plugin bjoern@17: $.fn.modal.Constructor = Modal bjoern@17: bjoern@17: bjoern@17: // MODAL NO CONFLICT bjoern@17: // ================= bjoern@17: bjoern@17: $.fn.modal.noConflict = function () { bjoern@17: $.fn.modal = old bjoern@17: return this bjoern@17: } bjoern@17: bjoern@17: bjoern@17: // MODAL DATA-API bjoern@17: // ============== bjoern@17: bjoern@17: $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) { bjoern@17: var $this = $(this) bjoern@17: var href = $this.attr('href') bjoern@17: var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) // strip for ie7 bjoern@17: var option = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data()) bjoern@17: bjoern@17: if ($this.is('a')) e.preventDefault() bjoern@17: bjoern@17: $target.one('show.bs.modal', function (showEvent) { bjoern@17: if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown bjoern@17: $target.one('hidden.bs.modal', function () { bjoern@17: $this.is(':visible') && $this.trigger('focus') bjoern@17: }) bjoern@17: }) bjoern@17: Plugin.call($target, option, this) bjoern@17: }) bjoern@17: bjoern@17: }(jQuery); bjoern@17: bjoern@17: /* ======================================================================== bjoern@17: * Bootstrap: tooltip.js v3.2.0 bjoern@17: * http://getbootstrap.com/javascript/#tooltip bjoern@17: * Inspired by the original jQuery.tipsy by Jason Frame bjoern@17: * ======================================================================== bjoern@17: * Copyright 2011-2014 Twitter, Inc. bjoern@17: * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) bjoern@17: * ======================================================================== */ bjoern@17: bjoern@17: bjoern@17: +function ($) { bjoern@17: 'use strict'; bjoern@17: bjoern@17: // TOOLTIP PUBLIC CLASS DEFINITION bjoern@17: // =============================== bjoern@17: bjoern@17: var Tooltip = function (element, options) { bjoern@17: this.type = bjoern@17: this.options = bjoern@17: this.enabled = bjoern@17: this.timeout = bjoern@17: this.hoverState = bjoern@17: this.$element = null bjoern@17: bjoern@17: this.init('tooltip', element, options) bjoern@17: } bjoern@17: bjoern@17: Tooltip.VERSION = '3.2.0' bjoern@17: bjoern@17: Tooltip.DEFAULTS = { bjoern@17: animation: true, bjoern@17: placement: 'top', bjoern@17: selector: false, bjoern@17: template: '