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: $('