From 4fe37339653c909368ba772ea9214c0b2a511fee Mon Sep 17 00:00:00 2001 From: Thomas Park Date: Fri, 16 Aug 2013 16:26:07 -0700 Subject: update bootstrap to 3.0.0-rc2 --- bower_components/bootstrap/dist/js/bootstrap.js | 129 +++++++++++++-------- .../bootstrap/dist/js/bootstrap.min.js | 2 +- 2 files changed, 80 insertions(+), 51 deletions(-) mode change 100644 => 100755 bower_components/bootstrap/dist/js/bootstrap.js mode change 100644 => 100755 bower_components/bootstrap/dist/js/bootstrap.min.js (limited to 'bower_components/bootstrap/dist/js') diff --git a/bower_components/bootstrap/dist/js/bootstrap.js b/bower_components/bootstrap/dist/js/bootstrap.js old mode 100644 new mode 100755 index 14943ed5..1a034581 --- a/bower_components/bootstrap/dist/js/bootstrap.js +++ b/bower_components/bootstrap/dist/js/bootstrap.js @@ -50,8 +50,8 @@ if (!jQuery) { throw new Error("Bootstrap requires jQuery") } // http://blog.alexmaccaw.com/css-transitions $.fn.emulateTransitionEnd = function (duration) { var called = false, $el = this - $(this).one('webkitTransitionEnd', function () { called = true }) - var callback = function () { if (!called) $($el).trigger('webkitTransitionEnd') } + $(this).one($.support.transition.end, function () { called = true }) + var callback = function () { if (!called) $($el).trigger($.support.transition.end) } setTimeout(callback, duration) return this } @@ -219,7 +219,9 @@ if (!jQuery) { throw new Error("Bootstrap requires jQuery") } var $parent = this.$element.closest('[data-toggle="buttons"]') if ($parent.length) { - var $input = this.$element.find('input').prop('checked', !this.$element.hasClass('active')) + var $input = this.$element.find('input') + .prop('checked', !this.$element.hasClass('active')) + .trigger('change') if ($input.prop('type') === 'radio') $parent.find('.active').removeClass('active') } @@ -235,7 +237,7 @@ if (!jQuery) { throw new Error("Bootstrap requires jQuery") } $.fn.button = function (option) { return this.each(function () { var $this = $(this) - var data = $this.data('button') + var data = $this.data('bs.button') var options = typeof option == 'object' && option if (!data) $this.data('bs.button', (data = new Button(this, options))) @@ -312,6 +314,7 @@ if (!jQuery) { throw new Error("Bootstrap requires jQuery") } Carousel.DEFAULTS = { interval: 5000 , pause: 'hover' + , wrap: true } Carousel.prototype.cycle = function (e) { @@ -376,12 +379,15 @@ if (!jQuery) { throw new Error("Bootstrap requires jQuery") } var fallback = type == 'next' ? 'first' : 'last' var that = this + if (!$next.length) { + if (!this.options.wrap) return + $next = this.$element.find('.item')[fallback]() + } + this.sliding = true isCycling && this.pause() - $next = $next.length ? $next : this.$element.find('.item')[fallback]() - var e = $.Event('slide.bs.carousel', { relatedTarget: $next[0], direction: direction }) if ($next.hasClass('active')) return @@ -533,7 +539,7 @@ if (!jQuery) { throw new Error("Bootstrap requires jQuery") } this.$element.trigger(startEvent) if (startEvent.isDefaultPrevented()) return - var actives = this.$parent && this.$parent.find('> .accordion-group > .in') + var actives = this.$parent && this.$parent.find('> .panel > .in') if (actives && actives.length) { var hasData = actives.data('bs.collapse') @@ -654,7 +660,7 @@ if (!jQuery) { throw new Error("Bootstrap requires jQuery") } 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') } @@ -849,7 +855,7 @@ if (!jQuery) { throw new Error("Bootstrap requires jQuery") } this.$backdrop = this.isShown = null - if (this.options.remote) this.$element.find('.modal-body').load(this.options.remote) + if (this.options.remote) this.$element.load(this.options.remote) } Modal.DEFAULTS = { @@ -858,13 +864,13 @@ if (!jQuery) { throw new Error("Bootstrap requires jQuery") } , show: true } - Modal.prototype.toggle = function () { - return this[!this.isShown ? 'show' : 'hide']() + Modal.prototype.toggle = function (_relatedTarget) { + return this[!this.isShown ? 'show' : 'hide'](_relatedTarget) } - Modal.prototype.show = function () { + Modal.prototype.show = function (_relatedTarget) { var that = this - var e = $.Event('show.bs.modal') + var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget }) this.$element.trigger(e) @@ -893,13 +899,15 @@ if (!jQuery) { throw new Error("Bootstrap requires jQuery") } that.enforceFocus() + var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget }) + transition ? that.$element .one($.support.transition.end, function () { - that.$element.focus().trigger('shown.bs.modal') + that.$element.focus().trigger(e) }) .emulateTransitionEnd(300) : - that.$element.focus().trigger('shown.bs.modal') + that.$element.focus().trigger(e) }) } @@ -921,6 +929,7 @@ if (!jQuery) { throw new Error("Bootstrap requires jQuery") } this.$element .removeClass('in') .attr('aria-hidden', true) + .off('click.dismiss.modal') $.support.transition && this.$element.hasClass('fade') ? this.$element @@ -973,7 +982,7 @@ if (!jQuery) { throw new Error("Bootstrap requires jQuery") } this.$backdrop = $('