diff options
| author | Jacob Thornton <[email protected]> | 2012-02-16 22:41:02 -0800 |
|---|---|---|
| committer | Jacob Thornton <[email protected]> | 2012-02-16 22:41:02 -0800 |
| commit | 03e6dc66c2fe14e756723395752feefb687b6526 (patch) | |
| tree | b8cfe13d72e1a780ef08dbd26e3bfe48e406c59e /js | |
| parent | 9143d8e449a852c606194ea8c529e30ea1a52ddf (diff) | |
| parent | 091622644a0c619e1afbb21041c141da30df76b7 (diff) | |
| download | bootstrap-03e6dc66c2fe14e756723395752feefb687b6526.tar.xz bootstrap-03e6dc66c2fe14e756723395752feefb687b6526.zip | |
Merge branch '2.0.1-wip'
Diffstat (limited to 'js')
| -rw-r--r-- | js/README.md | 4 | ||||
| -rw-r--r-- | js/bootstrap-alert.js | 11 | ||||
| -rw-r--r-- | js/bootstrap-button.js | 4 | ||||
| -rw-r--r-- | js/bootstrap-carousel.js | 5 | ||||
| -rw-r--r-- | js/bootstrap-collapse.js | 2 | ||||
| -rw-r--r-- | js/bootstrap-dropdown.js | 2 | ||||
| -rw-r--r-- | js/bootstrap-modal.js | 4 | ||||
| -rw-r--r-- | js/bootstrap-popover.js | 2 | ||||
| -rw-r--r-- | js/bootstrap-scrollspy.js | 2 | ||||
| -rw-r--r-- | js/bootstrap-tab.js | 2 | ||||
| -rw-r--r-- | js/bootstrap-tooltip.js | 2 | ||||
| -rw-r--r-- | js/bootstrap-transition.js | 4 | ||||
| -rw-r--r-- | js/bootstrap-typeahead.js | 2 | ||||
| -rw-r--r-- | js/tests/unit/bootstrap-button.js | 2 |
14 files changed, 27 insertions, 21 deletions
diff --git a/js/README.md b/js/README.md index b58fa1d40..3aa09c960 100644 --- a/js/README.md +++ b/js/README.md @@ -37,7 +37,7 @@ All methods should accept an optional options object, a string which targets a p Options should be sparse and add universal value. We should pick the right defaults. -All plugins should have a default object which can be modified to effect all instance's default options. The defaults object should be available via `$.fn.plugin.defaults`. +All plugins should have a default object which can be modified to affect all instances' default options. The defaults object should be available via `$.fn.plugin.defaults`. $.fn.modal.defaults = { … } @@ -64,7 +64,7 @@ All events should have an infinitive and past participle form. The infinitive is ### CONSTRUCTORS -Each plugin should expose it's raw constructor on a `Constructor` property -- accessed in the following way: +Each plugin should expose its raw constructor on a `Constructor` property -- accessed in the following way: $.fn.popover.Constructor diff --git a/js/bootstrap-alert.js b/js/bootstrap-alert.js index 4a65b135a..1d69c5f53 100644 --- a/js/bootstrap-alert.js +++ b/js/bootstrap-alert.js @@ -51,11 +51,14 @@ $parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent()) - $parent.removeClass('in') + $parent + .trigger('close') + .removeClass('in') function removeElement() { - $parent.remove() - $parent.trigger('closed') + $parent + .trigger('closed') + .remove() } $.support.transition && $parent.hasClass('fade') ? @@ -88,4 +91,4 @@ $('body').on('click.alert.data-api', dismiss, Alert.prototype.close) }) -}( window.jQuery ) +}( window.jQuery );
\ No newline at end of file diff --git a/js/bootstrap-button.js b/js/bootstrap-button.js index d85c82947..89101ed7b 100644 --- a/js/bootstrap-button.js +++ b/js/bootstrap-button.js @@ -91,8 +91,8 @@ $(function () { $('body').on('click.button.data-api', '[data-toggle^=button]', function ( e ) { - $(e.target).button('toggle') + $(e.currentTarget).button('toggle') }) }) -}( window.jQuery ) +}( window.jQuery );
\ No newline at end of file diff --git a/js/bootstrap-carousel.js b/js/bootstrap-carousel.js index 2f47edb8d..bad4f46f4 100644 --- a/js/bootstrap-carousel.js +++ b/js/bootstrap-carousel.js @@ -61,6 +61,7 @@ , pause: function () { clearInterval(this.interval) + this.interval = null return this } @@ -82,6 +83,8 @@ , fallback = type == 'next' ? 'first' : 'last' , that = this + if (!$next.length) return + this.sliding = true isCycling && this.pause() @@ -151,4 +154,4 @@ }) }) -}( window.jQuery ) +}( window.jQuery );
\ No newline at end of file diff --git a/js/bootstrap-collapse.js b/js/bootstrap-collapse.js index 8134cc42f..53bcd7c40 100644 --- a/js/bootstrap-collapse.js +++ b/js/bootstrap-collapse.js @@ -133,4 +133,4 @@ }) }) -}( window.jQuery ) +}( window.jQuery );
\ No newline at end of file diff --git a/js/bootstrap-dropdown.js b/js/bootstrap-dropdown.js index 48d3ce0f8..ce65aa3b5 100644 --- a/js/bootstrap-dropdown.js +++ b/js/bootstrap-dropdown.js @@ -89,4 +89,4 @@ $('body').on('click.dropdown.data-api', toggle, Dropdown.prototype.toggle) }) -}( window.jQuery ) +}( window.jQuery );
\ No newline at end of file diff --git a/js/bootstrap-modal.js b/js/bootstrap-modal.js index 180f0b64d..0a69b6a2f 100644 --- a/js/bootstrap-modal.js +++ b/js/bootstrap-modal.js @@ -177,7 +177,7 @@ return this.each(function () { var $this = $(this) , data = $this.data('modal') - , options = $.extend({}, $.fn.modal.defaults, typeof option == 'object' && option) + , options = $.extend({}, $.fn.modal.defaults, $this.data(), typeof option == 'object' && option) if (!data) $this.data('modal', (data = new Modal(this, options))) if (typeof option == 'string') data[option]() else if (options.show) data.show() @@ -207,4 +207,4 @@ }) }) -}( window.jQuery ) +}( window.jQuery );
\ No newline at end of file diff --git a/js/bootstrap-popover.js b/js/bootstrap-popover.js index 35ff9d0ab..4df81fee9 100644 --- a/js/bootstrap-popover.js +++ b/js/bootstrap-popover.js @@ -92,4 +92,4 @@ , template: '<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"><p></p></div></div></div>' }) -}( window.jQuery ) +}( window.jQuery );
\ No newline at end of file diff --git a/js/bootstrap-scrollspy.js b/js/bootstrap-scrollspy.js index e8bd0715c..f9aba137b 100644 --- a/js/bootstrap-scrollspy.js +++ b/js/bootstrap-scrollspy.js @@ -122,4 +122,4 @@ }) }) -}( window.jQuery ) +}( window.jQuery );
\ No newline at end of file diff --git a/js/bootstrap-tab.js b/js/bootstrap-tab.js index f19db5da1..78258c6a0 100644 --- a/js/bootstrap-tab.js +++ b/js/bootstrap-tab.js @@ -127,4 +127,4 @@ }) }) -}( window.jQuery ) +}( window.jQuery );
\ No newline at end of file diff --git a/js/bootstrap-tooltip.js b/js/bootstrap-tooltip.js index 21f2311fb..e1c8b2dc2 100644 --- a/js/bootstrap-tooltip.js +++ b/js/bootstrap-tooltip.js @@ -267,4 +267,4 @@ , template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>' } -}( window.jQuery ) +}( window.jQuery );
\ No newline at end of file diff --git a/js/bootstrap-transition.js b/js/bootstrap-transition.js index 956350bd0..0b13eccd4 100644 --- a/js/bootstrap-transition.js +++ b/js/bootstrap-transition.js @@ -47,5 +47,5 @@ })() }) - -}( window.jQuery ) + +}( window.jQuery );
\ No newline at end of file diff --git a/js/bootstrap-typeahead.js b/js/bootstrap-typeahead.js index 1426185af..e0be49fec 100644 --- a/js/bootstrap-typeahead.js +++ b/js/bootstrap-typeahead.js @@ -268,4 +268,4 @@ }) }) -}( window.jQuery ) +}( window.jQuery );
\ No newline at end of file diff --git a/js/tests/unit/bootstrap-button.js b/js/tests/unit/bootstrap-button.js index 59e8f33bc..8aed857e1 100644 --- a/js/tests/unit/bootstrap-button.js +++ b/js/tests/unit/bootstrap-button.js @@ -3,7 +3,7 @@ $(function () { module("bootstrap-buttons") test("should be defined on jquery object", function () { - ok($(document.body).button, 'tabs method is defined') + ok($(document.body).button, 'button method is defined') }) test("should return element", function () { |
