From 11ee24aa9192061a1bac3e58ad1d5ebb2bf4d85f Mon Sep 17 00:00:00 2001 From: Radomir Dopieralski Date: Wed, 30 Jul 2014 14:51:49 +0200 Subject: [PATCH] Version 3.2.0 Change-Id: I886276a578c0d130e87d87eb1ca1378141231aaa --- xstatic/pkg/bootstrap_scss/__init__.py | 6 +- .../data/js/bootstrap-sprockets.js | 12 + .../pkg/bootstrap_scss/data/js/bootstrap.js | 1402 +++++++++-------- .../bootstrap_scss/data/js/bootstrap/affix.js | 142 ++ .../bootstrap_scss/data/js/bootstrap/alert.js | 92 ++ .../data/js/bootstrap/button.js | 110 ++ .../data/js/bootstrap/carousel.js | 223 +++ .../data/js/bootstrap/collapse.js | 170 ++ .../data/js/bootstrap/dropdown.js | 151 ++ .../bootstrap_scss/data/js/bootstrap/modal.js | 280 ++++ .../data/js/bootstrap/popover.js | 113 ++ .../data/js/bootstrap/scrollspy.js | 170 ++ .../bootstrap_scss/data/js/bootstrap/tab.js | 128 ++ .../data/js/bootstrap/tooltip.js | 457 ++++++ .../data/js/bootstrap/transition.js | 59 + .../data/scss/_bootstrap-compass.scss | 7 + .../data/scss/_bootstrap-mincer.scss | 17 + .../data/scss/_bootstrap-sprockets.scss | 7 + .../bootstrap_scss/data/scss/bootstrap.scss | 5 +- .../data/scss/bootstrap/_alerts.scss | 7 +- .../data/scss/bootstrap/_badges.scss | 24 +- .../data/scss/bootstrap/_button-groups.scss | 18 +- .../data/scss/bootstrap/_buttons.scss | 2 - .../data/scss/bootstrap/_carousel.scss | 19 +- .../data/scss/bootstrap/_code.scss | 7 +- .../scss/bootstrap/_component-animations.scss | 14 +- .../data/scss/bootstrap/_dropdowns.scss | 2 + .../data/scss/bootstrap/_forms.scss | 186 ++- .../data/scss/bootstrap/_glyphicons.scss | 4 + .../data/scss/bootstrap/_input-groups.scss | 8 +- .../data/scss/bootstrap/_jumbotron.scss | 4 + .../data/scss/bootstrap/_labels.scss | 20 +- .../data/scss/bootstrap/_list-group.scss | 23 +- .../data/scss/bootstrap/_mixins.scss | 978 +----------- .../data/scss/bootstrap/_modals.scss | 25 +- .../data/scss/bootstrap/_navbar.scss | 43 +- .../data/scss/bootstrap/_navs.scss | 2 +- .../data/scss/bootstrap/_normalize.scss | 40 +- .../data/scss/bootstrap/_panels.scss | 14 +- .../data/scss/bootstrap/_popovers.scss | 2 +- .../data/scss/bootstrap/_progress-bars.scss | 29 +- .../scss/bootstrap/_responsive-embed.scss | 34 + .../scss/bootstrap/_responsive-utilities.scss | 102 +- .../data/scss/bootstrap/_scaffolding.scss | 18 +- .../data/scss/bootstrap/_tables.scss | 8 +- .../data/scss/bootstrap/_theme.scss | 11 + .../data/scss/bootstrap/_type.scss | 44 +- .../data/scss/bootstrap/_utilities.scss | 1 + .../data/scss/bootstrap/_variables.scss | 65 +- .../data/scss/bootstrap/bootstrap.scss | 5 +- .../data/scss/bootstrap/mixins/_alerts.scss | 14 + .../bootstrap/mixins/_background-variant.scss | 11 + .../scss/bootstrap/mixins/_border-radius.scss | 18 + .../data/scss/bootstrap/mixins/_buttons.scss | 50 + .../scss/bootstrap/mixins/_center-block.scss | 7 + .../data/scss/bootstrap/mixins/_clearfix.scss | 22 + .../data/scss/bootstrap/mixins/_forms.scss | 84 + .../scss/bootstrap/mixins/_gradients.scss | 58 + .../bootstrap/mixins/_grid-framework.scss | 81 + .../data/scss/bootstrap/mixins/_grid.scss | 122 ++ .../scss/bootstrap/mixins/_hide-text.scss | 21 + .../data/scss/bootstrap/mixins/_image.scss | 34 + .../data/scss/bootstrap/mixins/_labels.scss | 12 + .../scss/bootstrap/mixins/_list-group.scss | 31 + .../scss/bootstrap/mixins/_nav-divider.scss | 10 + .../bootstrap/mixins/_nav-vertical-align.scss | 9 + .../data/scss/bootstrap/mixins/_opacity.scss | 8 + .../scss/bootstrap/mixins/_pagination.scss | 23 + .../data/scss/bootstrap/mixins/_panels.scss | 24 + .../scss/bootstrap/mixins/_progress-bar.scss | 10 + .../scss/bootstrap/mixins/_reset-filter.scss | 8 + .../data/scss/bootstrap/mixins/_resize.scss | 6 + .../mixins/_responsive-visibility.scss | 21 + .../data/scss/bootstrap/mixins/_size.scss | 10 + .../scss/bootstrap/mixins/_tab-focus.scss | 9 + .../scss/bootstrap/mixins/_table-row.scss | 28 + .../scss/bootstrap/mixins/_text-emphasis.scss | 11 + .../scss/bootstrap/mixins/_text-overflow.scss | 8 + .../bootstrap/mixins/_vendor-prefixes.scss | 219 +++ 79 files changed, 4545 insertions(+), 1734 deletions(-) create mode 100644 xstatic/pkg/bootstrap_scss/data/js/bootstrap-sprockets.js create mode 100644 xstatic/pkg/bootstrap_scss/data/js/bootstrap/affix.js create mode 100644 xstatic/pkg/bootstrap_scss/data/js/bootstrap/alert.js create mode 100644 xstatic/pkg/bootstrap_scss/data/js/bootstrap/button.js create mode 100644 xstatic/pkg/bootstrap_scss/data/js/bootstrap/carousel.js create mode 100644 xstatic/pkg/bootstrap_scss/data/js/bootstrap/collapse.js create mode 100644 xstatic/pkg/bootstrap_scss/data/js/bootstrap/dropdown.js create mode 100644 xstatic/pkg/bootstrap_scss/data/js/bootstrap/modal.js create mode 100644 xstatic/pkg/bootstrap_scss/data/js/bootstrap/popover.js create mode 100644 xstatic/pkg/bootstrap_scss/data/js/bootstrap/scrollspy.js create mode 100644 xstatic/pkg/bootstrap_scss/data/js/bootstrap/tab.js create mode 100644 xstatic/pkg/bootstrap_scss/data/js/bootstrap/tooltip.js create mode 100644 xstatic/pkg/bootstrap_scss/data/js/bootstrap/transition.js create mode 100644 xstatic/pkg/bootstrap_scss/data/scss/_bootstrap-compass.scss create mode 100644 xstatic/pkg/bootstrap_scss/data/scss/_bootstrap-mincer.scss create mode 100644 xstatic/pkg/bootstrap_scss/data/scss/_bootstrap-sprockets.scss create mode 100644 xstatic/pkg/bootstrap_scss/data/scss/bootstrap/_responsive-embed.scss create mode 100644 xstatic/pkg/bootstrap_scss/data/scss/bootstrap/mixins/_alerts.scss create mode 100644 xstatic/pkg/bootstrap_scss/data/scss/bootstrap/mixins/_background-variant.scss create mode 100644 xstatic/pkg/bootstrap_scss/data/scss/bootstrap/mixins/_border-radius.scss create mode 100644 xstatic/pkg/bootstrap_scss/data/scss/bootstrap/mixins/_buttons.scss create mode 100644 xstatic/pkg/bootstrap_scss/data/scss/bootstrap/mixins/_center-block.scss create mode 100644 xstatic/pkg/bootstrap_scss/data/scss/bootstrap/mixins/_clearfix.scss create mode 100644 xstatic/pkg/bootstrap_scss/data/scss/bootstrap/mixins/_forms.scss create mode 100644 xstatic/pkg/bootstrap_scss/data/scss/bootstrap/mixins/_gradients.scss create mode 100644 xstatic/pkg/bootstrap_scss/data/scss/bootstrap/mixins/_grid-framework.scss create mode 100644 xstatic/pkg/bootstrap_scss/data/scss/bootstrap/mixins/_grid.scss create mode 100644 xstatic/pkg/bootstrap_scss/data/scss/bootstrap/mixins/_hide-text.scss create mode 100644 xstatic/pkg/bootstrap_scss/data/scss/bootstrap/mixins/_image.scss create mode 100644 xstatic/pkg/bootstrap_scss/data/scss/bootstrap/mixins/_labels.scss create mode 100644 xstatic/pkg/bootstrap_scss/data/scss/bootstrap/mixins/_list-group.scss create mode 100644 xstatic/pkg/bootstrap_scss/data/scss/bootstrap/mixins/_nav-divider.scss create mode 100644 xstatic/pkg/bootstrap_scss/data/scss/bootstrap/mixins/_nav-vertical-align.scss create mode 100644 xstatic/pkg/bootstrap_scss/data/scss/bootstrap/mixins/_opacity.scss create mode 100644 xstatic/pkg/bootstrap_scss/data/scss/bootstrap/mixins/_pagination.scss create mode 100644 xstatic/pkg/bootstrap_scss/data/scss/bootstrap/mixins/_panels.scss create mode 100644 xstatic/pkg/bootstrap_scss/data/scss/bootstrap/mixins/_progress-bar.scss create mode 100644 xstatic/pkg/bootstrap_scss/data/scss/bootstrap/mixins/_reset-filter.scss create mode 100644 xstatic/pkg/bootstrap_scss/data/scss/bootstrap/mixins/_resize.scss create mode 100644 xstatic/pkg/bootstrap_scss/data/scss/bootstrap/mixins/_responsive-visibility.scss create mode 100644 xstatic/pkg/bootstrap_scss/data/scss/bootstrap/mixins/_size.scss create mode 100644 xstatic/pkg/bootstrap_scss/data/scss/bootstrap/mixins/_tab-focus.scss create mode 100644 xstatic/pkg/bootstrap_scss/data/scss/bootstrap/mixins/_table-row.scss create mode 100644 xstatic/pkg/bootstrap_scss/data/scss/bootstrap/mixins/_text-emphasis.scss create mode 100644 xstatic/pkg/bootstrap_scss/data/scss/bootstrap/mixins/_text-overflow.scss create mode 100644 xstatic/pkg/bootstrap_scss/data/scss/bootstrap/mixins/_vendor-prefixes.scss diff --git a/xstatic/pkg/bootstrap_scss/__init__.py b/xstatic/pkg/bootstrap_scss/__init__.py index d842c22..281fb77 100644 --- a/xstatic/pkg/bootstrap_scss/__init__.py +++ b/xstatic/pkg/bootstrap_scss/__init__.py @@ -11,10 +11,10 @@ NAME = __name__.split('.')[-1] # package name (e.g. 'foo' or 'foo_bar') # please use a all-lowercase valid python # package name -VERSION = '3.1.1' # version of the packaged files, please use the upstream +VERSION = '3.2.0' # version of the packaged files, please use the upstream # version number -BUILD = '1' # our package build number, so we can release new builds - # with fixes for xstatic stuff. +BUILD = '0' # our package build number, so we can release new builds + # with fixes for xstatic stuff. PACKAGE_VERSION = VERSION + '.' + BUILD # version used for PyPi DESCRIPTION = "%s %s (XStatic packaging standard)" % (DISPLAY_NAME, VERSION) diff --git a/xstatic/pkg/bootstrap_scss/data/js/bootstrap-sprockets.js b/xstatic/pkg/bootstrap_scss/data/js/bootstrap-sprockets.js new file mode 100644 index 0000000..1abde49 --- /dev/null +++ b/xstatic/pkg/bootstrap_scss/data/js/bootstrap-sprockets.js @@ -0,0 +1,12 @@ +//= require ./bootstrap/affix +//= require ./bootstrap/alert +//= require ./bootstrap/button +//= require ./bootstrap/carousel +//= require ./bootstrap/collapse +//= require ./bootstrap/dropdown +//= require ./bootstrap/tab +//= require ./bootstrap/transition +//= require ./bootstrap/scrollspy +//= require ./bootstrap/modal +//= require ./bootstrap/tooltip +//= require ./bootstrap/popover diff --git a/xstatic/pkg/bootstrap_scss/data/js/bootstrap.js b/xstatic/pkg/bootstrap_scss/data/js/bootstrap.js index 8ae571b..30409f4 100644 --- a/xstatic/pkg/bootstrap_scss/data/js/bootstrap.js +++ b/xstatic/pkg/bootstrap_scss/data/js/bootstrap.js @@ -1,14 +1,6 @@ -/*! - * Bootstrap v3.1.1 (http://getbootstrap.com) - * Copyright 2011-2014 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - */ - -if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript requires jQuery') } - /* ======================================================================== - * Bootstrap: transition.js v3.1.1 - * http://getbootstrap.com/javascript/#transitions + * Bootstrap: affix.js v3.2.0 + * http://getbootstrap.com/javascript/#affix * ======================================================================== * Copyright 2011-2014 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) @@ -18,45 +10,139 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re +function ($) { 'use strict'; - // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/) - // ============================================================ + // AFFIX CLASS DEFINITION + // ====================== - function transitionEnd() { - var el = document.createElement('bootstrap') + var Affix = function (element, options) { + this.options = $.extend({}, Affix.DEFAULTS, options) - var transEndEventNames = { - 'WebkitTransition' : 'webkitTransitionEnd', - 'MozTransition' : 'transitionend', - 'OTransition' : 'oTransitionEnd otransitionend', - 'transition' : 'transitionend' - } + this.$target = $(this.options.target) + .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this)) + .on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this)) - for (var name in transEndEventNames) { - if (el.style[name] !== undefined) { - return { end: transEndEventNames[name] } - } - } + this.$element = $(element) + this.affixed = + this.unpin = + this.pinnedOffset = null - return false // explicit for ie8 ( ._.) + this.checkPosition() } - // http://blog.alexmaccaw.com/css-transitions - $.fn.emulateTransitionEnd = function (duration) { - var called = false, $el = this - $(this).one($.support.transition.end, function () { called = true }) - var callback = function () { if (!called) $($el).trigger($.support.transition.end) } - setTimeout(callback, duration) + Affix.VERSION = '3.2.0' + + Affix.RESET = 'affix affix-top affix-bottom' + + Affix.DEFAULTS = { + offset: 0, + target: window + } + + Affix.prototype.getPinnedOffset = function () { + if (this.pinnedOffset) return this.pinnedOffset + this.$element.removeClass(Affix.RESET).addClass('affix') + var scrollTop = this.$target.scrollTop() + var position = this.$element.offset() + return (this.pinnedOffset = position.top - scrollTop) + } + + Affix.prototype.checkPositionWithEventLoop = function () { + setTimeout($.proxy(this.checkPosition, this), 1) + } + + Affix.prototype.checkPosition = function () { + if (!this.$element.is(':visible')) return + + var scrollHeight = $(document).height() + var scrollTop = this.$target.scrollTop() + var position = this.$element.offset() + var offset = this.options.offset + var offsetTop = offset.top + var offsetBottom = offset.bottom + + if (typeof offset != 'object') offsetBottom = offsetTop = offset + if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element) + if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element) + + var affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ? false : + offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ? 'bottom' : + offsetTop != null && (scrollTop <= offsetTop) ? 'top' : false + + if (this.affixed === affix) return + if (this.unpin != null) this.$element.css('top', '') + + var affixType = 'affix' + (affix ? '-' + affix : '') + var e = $.Event(affixType + '.bs.affix') + + this.$element.trigger(e) + + if (e.isDefaultPrevented()) return + + this.affixed = affix + this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null + + this.$element + .removeClass(Affix.RESET) + .addClass(affixType) + .trigger($.Event(affixType.replace('affix', 'affixed'))) + + if (affix == 'bottom') { + this.$element.offset({ + top: scrollHeight - this.$element.height() - offsetBottom + }) + } + } + + + // AFFIX PLUGIN DEFINITION + // ======================= + + function Plugin(option) { + return this.each(function () { + var $this = $(this) + var data = $this.data('bs.affix') + var options = typeof option == 'object' && option + + if (!data) $this.data('bs.affix', (data = new Affix(this, options))) + if (typeof option == 'string') data[option]() + }) + } + + var old = $.fn.affix + + $.fn.affix = Plugin + $.fn.affix.Constructor = Affix + + + // AFFIX NO CONFLICT + // ================= + + $.fn.affix.noConflict = function () { + $.fn.affix = old return this } - $(function () { - $.support.transition = transitionEnd() + + // AFFIX DATA-API + // ============== + + $(window).on('load', function () { + $('[data-spy="affix"]').each(function () { + var $spy = $(this) + var data = $spy.data() + + data.offset = data.offset || {} + + if (data.offsetBottom) data.offset.bottom = data.offsetBottom + if (data.offsetTop) data.offset.top = data.offsetTop + + Plugin.call($spy, data) + }) }) }(jQuery); /* ======================================================================== - * Bootstrap: alert.js v3.1.1 + * Bootstrap: alert.js v3.2.0 * http://getbootstrap.com/javascript/#alerts * ======================================================================== * Copyright 2011-2014 Twitter, Inc. @@ -75,6 +161,8 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re $(el).on('click', dismiss, this.close) } + Alert.VERSION = '3.2.0' + Alert.prototype.close = function (e) { var $this = $(this) var selector = $this.attr('data-target') @@ -99,12 +187,13 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re $parent.removeClass('in') function removeElement() { - $parent.trigger('closed.bs.alert').remove() + // detach from parent, fire event then clean up data + $parent.detach().trigger('closed.bs.alert').remove() } $.support.transition && $parent.hasClass('fade') ? $parent - .one($.support.transition.end, removeElement) + .one('bsTransitionEnd', removeElement) .emulateTransitionEnd(150) : removeElement() } @@ -113,9 +202,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re // ALERT PLUGIN DEFINITION // ======================= - var old = $.fn.alert - - $.fn.alert = function (option) { + function Plugin(option) { return this.each(function () { var $this = $(this) var data = $this.data('bs.alert') @@ -125,6 +212,9 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re }) } + var old = $.fn.alert + + $.fn.alert = Plugin $.fn.alert.Constructor = Alert @@ -145,7 +235,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re }(jQuery); /* ======================================================================== - * Bootstrap: button.js v3.1.1 + * Bootstrap: button.js v3.2.0 * http://getbootstrap.com/javascript/#buttons * ======================================================================== * Copyright 2011-2014 Twitter, Inc. @@ -165,6 +255,8 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re this.isLoading = false } + Button.VERSION = '3.2.0' + Button.DEFAULTS = { loadingText: 'loading...' } @@ -177,9 +269,9 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re state = state + 'Text' - if (!data.resetText) $el.data('resetText', $el[val]()) + if (data.resetText == null) $el.data('resetText', $el[val]()) - $el[val](data[state] || this.options[state]) + $el[val](data[state] == null ? this.options[state] : data[state]) // push to event loop to allow forms to submit setTimeout($.proxy(function () { @@ -213,9 +305,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re // BUTTON PLUGIN DEFINITION // ======================== - var old = $.fn.button - - $.fn.button = function (option) { + function Plugin(option) { return this.each(function () { var $this = $(this) var data = $this.data('bs.button') @@ -228,6 +318,9 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re }) } + var old = $.fn.button + + $.fn.button = Plugin $.fn.button.Constructor = Button @@ -243,17 +336,17 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re // BUTTON DATA-API // =============== - $(document).on('click.bs.button.data-api', '[data-toggle^=button]', function (e) { + $(document).on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) { var $btn = $(e.target) if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') - $btn.button('toggle') + Plugin.call($btn, 'toggle') e.preventDefault() }) }(jQuery); /* ======================================================================== - * Bootstrap: carousel.js v3.1.1 + * Bootstrap: carousel.js v3.2.0 * http://getbootstrap.com/javascript/#carousel * ======================================================================== * Copyright 2011-2014 Twitter, Inc. @@ -268,7 +361,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re // ========================= var Carousel = function (element, options) { - this.$element = $(element) + this.$element = $(element).on('keydown.bs.carousel', $.proxy(this.keydown, this)) this.$indicators = this.$element.find('.carousel-indicators') this.options = options this.paused = @@ -278,17 +371,29 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re this.$items = null this.options.pause == 'hover' && this.$element - .on('mouseenter', $.proxy(this.pause, this)) - .on('mouseleave', $.proxy(this.cycle, this)) + .on('mouseenter.bs.carousel', $.proxy(this.pause, this)) + .on('mouseleave.bs.carousel', $.proxy(this.cycle, this)) } + Carousel.VERSION = '3.2.0' + Carousel.DEFAULTS = { interval: 5000, pause: 'hover', wrap: true } - Carousel.prototype.cycle = function (e) { + Carousel.prototype.keydown = function (e) { + switch (e.which) { + case 37: this.prev(); break + case 39: this.next(); break + default: return + } + + e.preventDefault() + } + + Carousel.prototype.cycle = function (e) { e || (this.paused = false) this.interval && clearInterval(this.interval) @@ -300,20 +405,18 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re return this } - Carousel.prototype.getActiveIndex = function () { - this.$active = this.$element.find('.item.active') - this.$items = this.$active.parent().children() - - return this.$items.index(this.$active) + Carousel.prototype.getItemIndex = function (item) { + this.$items = item.parent().children('.item') + return this.$items.index(item || this.$active) } Carousel.prototype.to = function (pos) { var that = this - var activeIndex = this.getActiveIndex() + var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active')) if (pos > (this.$items.length - 1) || pos < 0) return - if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) + if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid" if (activeIndex == pos) return this.pause().cycle() return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos])) @@ -355,11 +458,15 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re $next = this.$element.find('.item')[fallback]() } - if ($next.hasClass('active')) return this.sliding = false + if ($next.hasClass('active')) return (this.sliding = false) - var e = $.Event('slide.bs.carousel', { relatedTarget: $next[0], direction: direction }) - this.$element.trigger(e) - if (e.isDefaultPrevented()) return + var relatedTarget = $next[0] + var slideEvent = $.Event('slide.bs.carousel', { + relatedTarget: relatedTarget, + direction: direction + }) + this.$element.trigger(slideEvent) + if (slideEvent.isDefaultPrevented()) return this.sliding = true @@ -367,30 +474,31 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re if (this.$indicators.length) { this.$indicators.find('.active').removeClass('active') - this.$element.one('slid.bs.carousel', function () { - var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()]) - $nextIndicator && $nextIndicator.addClass('active') - }) + var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)]) + $nextIndicator && $nextIndicator.addClass('active') } + var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid" if ($.support.transition && this.$element.hasClass('slide')) { $next.addClass(type) $next[0].offsetWidth // force reflow $active.addClass(direction) $next.addClass(direction) $active - .one($.support.transition.end, function () { + .one('bsTransitionEnd', function () { $next.removeClass([type, direction].join(' ')).addClass('active') $active.removeClass(['active', direction].join(' ')) that.sliding = false - setTimeout(function () { that.$element.trigger('slid.bs.carousel') }, 0) + setTimeout(function () { + that.$element.trigger(slidEvent) + }, 0) }) .emulateTransitionEnd($active.css('transition-duration').slice(0, -1) * 1000) } else { $active.removeClass('active') $next.addClass('active') this.sliding = false - this.$element.trigger('slid.bs.carousel') + this.$element.trigger(slidEvent) } isCycling && this.cycle() @@ -402,9 +510,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re // CAROUSEL PLUGIN DEFINITION // ========================== - var old = $.fn.carousel - - $.fn.carousel = function (option) { + function Plugin(option) { return this.each(function () { var $this = $(this) var data = $this.data('bs.carousel') @@ -418,6 +524,9 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re }) } + var old = $.fn.carousel + + $.fn.carousel = Plugin $.fn.carousel.Constructor = Carousel @@ -434,15 +543,17 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re // ================= $(document).on('click.bs.carousel.data-api', '[data-slide], [data-slide-to]', function (e) { - var $this = $(this), href - var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7 + var href + var $this = $(this) + var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7 + if (!$target.hasClass('carousel')) return var options = $.extend({}, $target.data(), $this.data()) var slideIndex = $this.attr('data-slide-to') if (slideIndex) options.interval = false - $target.carousel(options) + Plugin.call($target, options) - if (slideIndex = $this.attr('data-slide-to')) { + if (slideIndex) { $target.data('bs.carousel').to(slideIndex) } @@ -452,14 +563,14 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re $(window).on('load', function () { $('[data-ride="carousel"]').each(function () { var $carousel = $(this) - $carousel.carousel($carousel.data()) + Plugin.call($carousel, $carousel.data()) }) }) }(jQuery); /* ======================================================================== - * Bootstrap: collapse.js v3.1.1 + * Bootstrap: collapse.js v3.2.0 * http://getbootstrap.com/javascript/#collapse * ======================================================================== * Copyright 2011-2014 Twitter, Inc. @@ -482,6 +593,8 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re if (this.options.toggle) this.toggle() } + Collapse.VERSION = '3.2.0' + Collapse.DEFAULTS = { toggle: true } @@ -503,7 +616,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re if (actives && actives.length) { var hasData = actives.data('bs.collapse') if (hasData && hasData.transitioning) return - actives.collapse('hide') + Plugin.call(actives, 'hide') hasData || actives.data('bs.collapse', null) } @@ -511,18 +624,17 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re this.$element .removeClass('collapse') - .addClass('collapsing') - [dimension](0) + .addClass('collapsing')[dimension](0) this.transitioning = 1 var complete = function () { this.$element .removeClass('collapsing') - .addClass('collapse in') - [dimension]('auto') + .addClass('collapse in')[dimension]('') this.transitioning = 0 - this.$element.trigger('shown.bs.collapse') + this.$element + .trigger('shown.bs.collapse') } if (!$.support.transition) return complete.call(this) @@ -530,9 +642,8 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re var scrollSize = $.camelCase(['scroll', dimension].join('-')) this.$element - .one($.support.transition.end, $.proxy(complete, this)) - .emulateTransitionEnd(350) - [dimension](this.$element[0][scrollSize]) + .one('bsTransitionEnd', $.proxy(complete, this)) + .emulateTransitionEnd(350)[dimension](this.$element[0][scrollSize]) } Collapse.prototype.hide = function () { @@ -544,9 +655,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re var dimension = this.dimension() - this.$element - [dimension](this.$element[dimension]()) - [0].offsetHeight + this.$element[dimension](this.$element[dimension]())[0].offsetHeight this.$element .addClass('collapsing') @@ -567,7 +676,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re this.$element [dimension](0) - .one($.support.transition.end, $.proxy(complete, this)) + .one('bsTransitionEnd', $.proxy(complete, this)) .emulateTransitionEnd(350) } @@ -579,9 +688,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re // COLLAPSE PLUGIN DEFINITION // ========================== - var old = $.fn.collapse - - $.fn.collapse = function (option) { + function Plugin(option) { return this.each(function () { var $this = $(this) var data = $this.data('bs.collapse') @@ -593,6 +700,9 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re }) } + var old = $.fn.collapse + + $.fn.collapse = Plugin $.fn.collapse.Constructor = Collapse @@ -608,11 +718,12 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re // COLLAPSE DATA-API // ================= - $(document).on('click.bs.collapse.data-api', '[data-toggle=collapse]', function (e) { - var $this = $(this), href + $(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) { + var href + var $this = $(this) var target = $this.attr('data-target') || e.preventDefault() - || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7 + || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7 var $target = $(target) var data = $target.data('bs.collapse') var option = data ? 'toggle' : $this.data() @@ -620,17 +731,17 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re var $parent = parent && $(parent) if (!data || !data.transitioning) { - if ($parent) $parent.find('[data-toggle=collapse][data-parent="' + parent + '"]').not($this).addClass('collapsed') + if ($parent) $parent.find('[data-toggle="collapse"][data-parent="' + parent + '"]').not($this).addClass('collapsed') $this[$target.hasClass('in') ? 'addClass' : 'removeClass']('collapsed') } - $target.collapse(option) + Plugin.call($target, option) }) }(jQuery); /* ======================================================================== - * Bootstrap: dropdown.js v3.1.1 + * Bootstrap: dropdown.js v3.2.0 * http://getbootstrap.com/javascript/#dropdowns * ======================================================================== * Copyright 2011-2014 Twitter, Inc. @@ -645,11 +756,13 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re // ========================= var backdrop = '.dropdown-backdrop' - var toggle = '[data-toggle=dropdown]' + var toggle = '[data-toggle="dropdown"]' var Dropdown = function (element) { $(element).on('click.bs.dropdown', this.toggle) } + Dropdown.VERSION = '3.2.0' + Dropdown.prototype.toggle = function (e) { var $this = $(this) @@ -671,11 +784,11 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re if (e.isDefaultPrevented()) return + $this.trigger('focus') + $parent .toggleClass('open') .trigger('shown.bs.dropdown', relatedTarget) - - $this.focus() } return false @@ -695,12 +808,12 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re var isActive = $parent.hasClass('open') if (!isActive || (isActive && e.keyCode == 27)) { - if (e.which == 27) $parent.find(toggle).focus() - return $this.click() + if (e.which == 27) $parent.find(toggle).trigger('focus') + return $this.trigger('click') } var desc = ' li:not(.divider):visible a' - var $items = $parent.find('[role=menu]' + desc + ', [role=listbox]' + desc) + var $items = $parent.find('[role="menu"]' + desc + ', [role="listbox"]' + desc) if (!$items.length) return @@ -710,10 +823,11 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re if (e.keyCode == 40 && index < $items.length - 1) index++ // down if (!~index) index = 0 - $items.eq(index).focus() + $items.eq(index).trigger('focus') } function clearMenus(e) { + if (e && e.which === 3) return $(backdrop).remove() $(toggle).each(function () { var $parent = getParent($(this)) @@ -730,7 +844,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re if (!selector) { selector = $this.attr('href') - selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 + selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 } var $parent = selector && $(selector) @@ -742,9 +856,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re // DROPDOWN PLUGIN DEFINITION // ========================== - var old = $.fn.dropdown - - $.fn.dropdown = function (option) { + function Plugin(option) { return this.each(function () { var $this = $(this) var data = $this.data('bs.dropdown') @@ -754,6 +866,9 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re }) } + var old = $.fn.dropdown + + $.fn.dropdown = Plugin $.fn.dropdown.Constructor = Dropdown @@ -773,12 +888,372 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re .on('click.bs.dropdown.data-api', clearMenus) .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() }) .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle) - .on('keydown.bs.dropdown.data-api', toggle + ', [role=menu], [role=listbox]', Dropdown.prototype.keydown) + .on('keydown.bs.dropdown.data-api', toggle + ', [role="menu"], [role="listbox"]', Dropdown.prototype.keydown) }(jQuery); /* ======================================================================== - * Bootstrap: modal.js v3.1.1 + * Bootstrap: tab.js v3.2.0 + * http://getbootstrap.com/javascript/#tabs + * ======================================================================== + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ + + ++function ($) { + 'use strict'; + + // TAB CLASS DEFINITION + // ==================== + + var Tab = function (element) { + this.element = $(element) + } + + Tab.VERSION = '3.2.0' + + Tab.prototype.show = function () { + var $this = this.element + var $ul = $this.closest('ul:not(.dropdown-menu)') + var selector = $this.data('target') + + if (!selector) { + selector = $this.attr('href') + selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 + } + + if ($this.parent('li').hasClass('active')) return + + var previous = $ul.find('.active:last a')[0] + var e = $.Event('show.bs.tab', { + relatedTarget: previous + }) + + $this.trigger(e) + + if (e.isDefaultPrevented()) return + + var $target = $(selector) + + this.activate($this.closest('li'), $ul) + this.activate($target, $target.parent(), function () { + $this.trigger({ + type: 'shown.bs.tab', + relatedTarget: previous + }) + }) + } + + Tab.prototype.activate = function (element, container, callback) { + var $active = container.find('> .active') + var transition = callback + && $.support.transition + && $active.hasClass('fade') + + function next() { + $active + .removeClass('active') + .find('> .dropdown-menu > .active') + .removeClass('active') + + element.addClass('active') + + if (transition) { + element[0].offsetWidth // reflow for transition + element.addClass('in') + } else { + element.removeClass('fade') + } + + if (element.parent('.dropdown-menu')) { + element.closest('li.dropdown').addClass('active') + } + + callback && callback() + } + + transition ? + $active + .one('bsTransitionEnd', next) + .emulateTransitionEnd(150) : + next() + + $active.removeClass('in') + } + + + // TAB PLUGIN DEFINITION + // ===================== + + function Plugin(option) { + return this.each(function () { + var $this = $(this) + var data = $this.data('bs.tab') + + if (!data) $this.data('bs.tab', (data = new Tab(this))) + if (typeof option == 'string') data[option]() + }) + } + + var old = $.fn.tab + + $.fn.tab = Plugin + $.fn.tab.Constructor = Tab + + + // TAB NO CONFLICT + // =============== + + $.fn.tab.noConflict = function () { + $.fn.tab = old + return this + } + + + // TAB DATA-API + // ============ + + $(document).on('click.bs.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) { + e.preventDefault() + Plugin.call($(this), 'show') + }) + +}(jQuery); + +/* ======================================================================== + * Bootstrap: transition.js v3.2.0 + * http://getbootstrap.com/javascript/#transitions + * ======================================================================== + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ + + ++function ($) { + 'use strict'; + + // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/) + // ============================================================ + + function transitionEnd() { + var el = document.createElement('bootstrap') + + var transEndEventNames = { + WebkitTransition : 'webkitTransitionEnd', + MozTransition : 'transitionend', + OTransition : 'oTransitionEnd otransitionend', + transition : 'transitionend' + } + + for (var name in transEndEventNames) { + if (el.style[name] !== undefined) { + return { end: transEndEventNames[name] } + } + } + + return false // explicit for ie8 ( ._.) + } + + // http://blog.alexmaccaw.com/css-transitions + $.fn.emulateTransitionEnd = function (duration) { + var called = false + var $el = this + $(this).one('bsTransitionEnd', function () { called = true }) + var callback = function () { if (!called) $($el).trigger($.support.transition.end) } + setTimeout(callback, duration) + return this + } + + $(function () { + $.support.transition = transitionEnd() + + if (!$.support.transition) return + + $.event.special.bsTransitionEnd = { + bindType: $.support.transition.end, + delegateType: $.support.transition.end, + handle: function (e) { + if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments) + } + } + }) + +}(jQuery); + +/* ======================================================================== + * Bootstrap: scrollspy.js v3.2.0 + * http://getbootstrap.com/javascript/#scrollspy + * ======================================================================== + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ + + ++function ($) { + 'use strict'; + + // SCROLLSPY CLASS DEFINITION + // ========================== + + function ScrollSpy(element, options) { + var process = $.proxy(this.process, this) + + this.$body = $('body') + this.$scrollElement = $(element).is('body') ? $(window) : $(element) + this.options = $.extend({}, ScrollSpy.DEFAULTS, options) + this.selector = (this.options.target || '') + ' .nav li > a' + this.offsets = [] + this.targets = [] + this.activeTarget = null + this.scrollHeight = 0 + + this.$scrollElement.on('scroll.bs.scrollspy', process) + this.refresh() + this.process() + } + + ScrollSpy.VERSION = '3.2.0' + + ScrollSpy.DEFAULTS = { + offset: 10 + } + + ScrollSpy.prototype.getScrollHeight = function () { + return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight) + } + + ScrollSpy.prototype.refresh = function () { + var offsetMethod = 'offset' + var offsetBase = 0 + + if (!$.isWindow(this.$scrollElement[0])) { + offsetMethod = 'position' + offsetBase = this.$scrollElement.scrollTop() + } + + this.offsets = [] + this.targets = [] + this.scrollHeight = this.getScrollHeight() + + var self = this + + this.$body + .find(this.selector) + .map(function () { + var $el = $(this) + var href = $el.data('target') || $el.attr('href') + var $href = /^#./.test(href) && $(href) + + return ($href + && $href.length + && $href.is(':visible') + && [[$href[offsetMethod]().top + offsetBase, href]]) || null + }) + .sort(function (a, b) { return a[0] - b[0] }) + .each(function () { + self.offsets.push(this[0]) + self.targets.push(this[1]) + }) + } + + ScrollSpy.prototype.process = function () { + var scrollTop = this.$scrollElement.scrollTop() + this.options.offset + var scrollHeight = this.getScrollHeight() + var maxScroll = this.options.offset + scrollHeight - this.$scrollElement.height() + var offsets = this.offsets + var targets = this.targets + var activeTarget = this.activeTarget + var i + + if (this.scrollHeight != scrollHeight) { + this.refresh() + } + + if (scrollTop >= maxScroll) { + return activeTarget != (i = targets[targets.length - 1]) && this.activate(i) + } + + if (activeTarget && scrollTop <= offsets[0]) { + return activeTarget != (i = targets[0]) && this.activate(i) + } + + for (i = offsets.length; i--;) { + activeTarget != targets[i] + && scrollTop >= offsets[i] + && (!offsets[i + 1] || scrollTop <= offsets[i + 1]) + && this.activate(targets[i]) + } + } + + ScrollSpy.prototype.activate = function (target) { + this.activeTarget = target + + $(this.selector) + .parentsUntil(this.options.target, '.active') + .removeClass('active') + + var selector = this.selector + + '[data-target="' + target + '"],' + + this.selector + '[href="' + target + '"]' + + var active = $(selector) + .parents('li') + .addClass('active') + + if (active.parent('.dropdown-menu').length) { + active = active + .closest('li.dropdown') + .addClass('active') + } + + active.trigger('activate.bs.scrollspy') + } + + + // SCROLLSPY PLUGIN DEFINITION + // =========================== + + function Plugin(option) { + return this.each(function () { + var $this = $(this) + var data = $this.data('bs.scrollspy') + var options = typeof option == 'object' && option + + if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options))) + if (typeof option == 'string') data[option]() + }) + } + + var old = $.fn.scrollspy + + $.fn.scrollspy = Plugin + $.fn.scrollspy.Constructor = ScrollSpy + + + // SCROLLSPY NO CONFLICT + // ===================== + + $.fn.scrollspy.noConflict = function () { + $.fn.scrollspy = old + return this + } + + + // SCROLLSPY DATA-API + // ================== + + $(window).on('load.bs.scrollspy.data-api', function () { + $('[data-spy="scroll"]').each(function () { + var $spy = $(this) + Plugin.call($spy, $spy.data()) + }) + }) + +}(jQuery); + +/* ======================================================================== + * Bootstrap: modal.js v3.2.0 * http://getbootstrap.com/javascript/#modals * ======================================================================== * Copyright 2011-2014 Twitter, Inc. @@ -793,10 +1268,12 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re // ====================== var Modal = function (element, options) { - this.options = options - this.$element = $(element) - this.$backdrop = - this.isShown = null + this.options = options + this.$body = $(document.body) + this.$element = $(element) + this.$backdrop = + this.isShown = null + this.scrollbarWidth = 0 if (this.options.remote) { this.$element @@ -807,6 +1284,8 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re } } + Modal.VERSION = '3.2.0' + Modal.DEFAULTS = { backdrop: true, keyboard: true, @@ -814,7 +1293,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re } Modal.prototype.toggle = function (_relatedTarget) { - return this[!this.isShown ? 'show' : 'hide'](_relatedTarget) + return this.isShown ? this.hide() : this.show(_relatedTarget) } Modal.prototype.show = function (_relatedTarget) { @@ -827,6 +1306,10 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re this.isShown = true + this.checkScrollbar() + this.$body.addClass('modal-open') + + this.setScrollbar() this.escape() this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this)) @@ -835,7 +1318,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re var transition = $.support.transition && that.$element.hasClass('fade') if (!that.$element.parent().length) { - that.$element.appendTo(document.body) // don't move modals dom position + that.$element.appendTo(that.$body) // don't move modals dom position } that.$element @@ -856,11 +1339,11 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re transition ? that.$element.find('.modal-dialog') // wait for modal to slide in - .one($.support.transition.end, function () { - that.$element.focus().trigger(e) + .one('bsTransitionEnd', function () { + that.$element.trigger('focus').trigger(e) }) .emulateTransitionEnd(300) : - that.$element.focus().trigger(e) + that.$element.trigger('focus').trigger(e) }) } @@ -875,6 +1358,9 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re this.isShown = false + this.$body.removeClass('modal-open') + + this.resetScrollbar() this.escape() $(document).off('focusin.bs.modal') @@ -886,7 +1372,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re $.support.transition && this.$element.hasClass('fade') ? this.$element - .one($.support.transition.end, $.proxy(this.hideModal, this)) + .one('bsTransitionEnd', $.proxy(this.hideModal, this)) .emulateTransitionEnd(300) : this.hideModal() } @@ -896,7 +1382,7 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re .off('focusin.bs.modal') // guard against infinite focus loop .on('focusin.bs.modal', $.proxy(function (e) { if (this.$element[0] !== e.target && !this.$element.has(e.target).length) { - this.$element.focus() + this.$element.trigger('focus') } }, this)) } @@ -915,7 +1401,6 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re var that = this this.$element.hide() this.backdrop(function () { - that.removeBackdrop() that.$element.trigger('hidden.bs.modal') }) } @@ -926,13 +1411,14 @@ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript re } Modal.prototype.backdrop = function (callback) { + var that = this var animate = this.$element.hasClass('fade') ? 'fade' : '' if (this.isShown && this.options.backdrop) { var doAnimate = $.support.transition && animate this.$backdrop = $('