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/js/.jshintrc | 2 + bower_components/bootstrap/js/affix.js | 0 bower_components/bootstrap/js/alert.js | 0 bower_components/bootstrap/js/button.js | 6 +- bower_components/bootstrap/js/carousel.js | 8 +- bower_components/bootstrap/js/collapse.js | 4 +- bower_components/bootstrap/js/dropdown.js | 0 bower_components/bootstrap/js/modal.js | 35 +-- bower_components/bootstrap/js/popover.js | 12 +- bower_components/bootstrap/js/scrollspy.js | 0 bower_components/bootstrap/js/tab.js | 0 bower_components/bootstrap/js/tests/index.html | 0 bower_components/bootstrap/js/tests/phantom.js | 0 bower_components/bootstrap/js/tests/server.js | 0 bower_components/bootstrap/js/tests/unit/affix.js | 0 bower_components/bootstrap/js/tests/unit/alert.js | 0 bower_components/bootstrap/js/tests/unit/button.js | 0 .../bootstrap/js/tests/unit/carousel.js | 0 .../bootstrap/js/tests/unit/collapse.js | 35 +++ .../bootstrap/js/tests/unit/dropdown.js | 12 +- bower_components/bootstrap/js/tests/unit/modal.js | 301 +++++++++++---------- .../bootstrap/js/tests/unit/phantom.js | 0 .../bootstrap/js/tests/unit/popover.js | 0 .../bootstrap/js/tests/unit/scrollspy.js | 0 bower_components/bootstrap/js/tests/unit/tab.js | 0 .../bootstrap/js/tests/unit/tooltip.js | 0 .../bootstrap/js/tests/unit/transition.js | 0 .../bootstrap/js/tests/vendor/jquery.js | 0 .../bootstrap/js/tests/vendor/qunit.css | 0 .../bootstrap/js/tests/vendor/qunit.js | 0 bower_components/bootstrap/js/tooltip.js | 60 ++-- bower_components/bootstrap/js/transition.js | 4 +- 32 files changed, 283 insertions(+), 196 deletions(-) mode change 100644 => 100755 bower_components/bootstrap/js/.jshintrc mode change 100644 => 100755 bower_components/bootstrap/js/affix.js mode change 100644 => 100755 bower_components/bootstrap/js/alert.js mode change 100644 => 100755 bower_components/bootstrap/js/button.js mode change 100644 => 100755 bower_components/bootstrap/js/carousel.js mode change 100644 => 100755 bower_components/bootstrap/js/collapse.js mode change 100644 => 100755 bower_components/bootstrap/js/dropdown.js mode change 100644 => 100755 bower_components/bootstrap/js/modal.js mode change 100644 => 100755 bower_components/bootstrap/js/popover.js mode change 100644 => 100755 bower_components/bootstrap/js/scrollspy.js mode change 100644 => 100755 bower_components/bootstrap/js/tab.js mode change 100644 => 100755 bower_components/bootstrap/js/tests/index.html mode change 100644 => 100755 bower_components/bootstrap/js/tests/phantom.js mode change 100644 => 100755 bower_components/bootstrap/js/tests/server.js mode change 100644 => 100755 bower_components/bootstrap/js/tests/unit/affix.js mode change 100644 => 100755 bower_components/bootstrap/js/tests/unit/alert.js mode change 100644 => 100755 bower_components/bootstrap/js/tests/unit/button.js mode change 100644 => 100755 bower_components/bootstrap/js/tests/unit/carousel.js mode change 100644 => 100755 bower_components/bootstrap/js/tests/unit/collapse.js mode change 100644 => 100755 bower_components/bootstrap/js/tests/unit/dropdown.js mode change 100644 => 100755 bower_components/bootstrap/js/tests/unit/modal.js mode change 100644 => 100755 bower_components/bootstrap/js/tests/unit/phantom.js mode change 100644 => 100755 bower_components/bootstrap/js/tests/unit/popover.js mode change 100644 => 100755 bower_components/bootstrap/js/tests/unit/scrollspy.js mode change 100644 => 100755 bower_components/bootstrap/js/tests/unit/tab.js mode change 100644 => 100755 bower_components/bootstrap/js/tests/unit/tooltip.js mode change 100644 => 100755 bower_components/bootstrap/js/tests/unit/transition.js mode change 100644 => 100755 bower_components/bootstrap/js/tests/vendor/jquery.js mode change 100644 => 100755 bower_components/bootstrap/js/tests/vendor/qunit.css mode change 100644 => 100755 bower_components/bootstrap/js/tests/vendor/qunit.js mode change 100644 => 100755 bower_components/bootstrap/js/tooltip.js mode change 100644 => 100755 bower_components/bootstrap/js/transition.js (limited to 'bower_components/bootstrap/js') diff --git a/bower_components/bootstrap/js/.jshintrc b/bower_components/bootstrap/js/.jshintrc old mode 100644 new mode 100755 index 70e6c579..94c520d5 --- a/bower_components/bootstrap/js/.jshintrc +++ b/bower_components/bootstrap/js/.jshintrc @@ -3,9 +3,11 @@ "laxcomma" : true, "laxbreak" : true, "browser" : true, + "eqeqeq" : false, "eqnull" : true, "debug" : true, "devel" : true, + "curly" : false, "boss" : true, "expr" : true, "asi" : true diff --git a/bower_components/bootstrap/js/affix.js b/bower_components/bootstrap/js/affix.js old mode 100644 new mode 100755 diff --git a/bower_components/bootstrap/js/alert.js b/bower_components/bootstrap/js/alert.js old mode 100644 new mode 100755 diff --git a/bower_components/bootstrap/js/button.js b/bower_components/bootstrap/js/button.js old mode 100644 new mode 100755 index 539e9fea..fc73b555 --- a/bower_components/bootstrap/js/button.js +++ b/bower_components/bootstrap/js/button.js @@ -56,7 +56,9 @@ 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') } @@ -72,7 +74,7 @@ $.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))) diff --git a/bower_components/bootstrap/js/carousel.js b/bower_components/bootstrap/js/carousel.js old mode 100644 new mode 100755 index d4bcb88b..d8c4c243 --- a/bower_components/bootstrap/js/carousel.js +++ b/bower_components/bootstrap/js/carousel.js @@ -41,6 +41,7 @@ Carousel.DEFAULTS = { interval: 5000 , pause: 'hover' + , wrap: true } Carousel.prototype.cycle = function (e) { @@ -105,12 +106,15 @@ 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 diff --git a/bower_components/bootstrap/js/collapse.js b/bower_components/bootstrap/js/collapse.js old mode 100644 new mode 100755 index 34ac3c7f..92cc0bc7 --- a/bower_components/bootstrap/js/collapse.js +++ b/bower_components/bootstrap/js/collapse.js @@ -48,7 +48,7 @@ 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') @@ -169,7 +169,7 @@ 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') } diff --git a/bower_components/bootstrap/js/dropdown.js b/bower_components/bootstrap/js/dropdown.js old mode 100644 new mode 100755 diff --git a/bower_components/bootstrap/js/modal.js b/bower_components/bootstrap/js/modal.js old mode 100644 new mode 100755 index 83095e8f..e0f8b7a0 --- a/bower_components/bootstrap/js/modal.js +++ b/bower_components/bootstrap/js/modal.js @@ -29,7 +29,7 @@ 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 = { @@ -38,13 +38,13 @@ , 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) @@ -73,13 +73,15 @@ 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) }) } @@ -101,6 +103,7 @@ this.$element .removeClass('in') .attr('aria-hidden', true) + .off('click.dismiss.modal') $.support.transition && this.$element.hasClass('fade') ? this.$element @@ -153,7 +156,7 @@ this.$backdrop = $('