diff options
| author | fat-kun <[email protected]> | 2013-02-28 21:24:27 -0800 |
|---|---|---|
| committer | fat-kun <[email protected]> | 2013-02-28 21:24:27 -0800 |
| commit | eb24718add4dd36fe92fdbdb79e6ff4ce5919300 (patch) | |
| tree | c85d91c9cb9b0b54f48f6747aa08d7db81eafce0 /js | |
| parent | 16111a5e454a8af4407f4217b5defb6d7a9bdbd3 (diff) | |
| parent | 6b2a010357e184e670a2f4768e37d4886e8a6597 (diff) | |
| download | bootstrap-2.3.1.tar.xz bootstrap-2.3.1.zip | |
Merge pull request #7111 from twitter/2.3.1-wipv2.3.1
2.3.1 wip
Diffstat (limited to 'js')
| -rw-r--r-- | js/bootstrap-affix.js | 2 | ||||
| -rw-r--r-- | js/bootstrap-alert.js | 2 | ||||
| -rw-r--r-- | js/bootstrap-button.js | 2 | ||||
| -rw-r--r-- | js/bootstrap-carousel.js | 4 | ||||
| -rw-r--r-- | js/bootstrap-collapse.js | 2 | ||||
| -rw-r--r-- | js/bootstrap-dropdown.js | 4 | ||||
| -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 | 12 | ||||
| -rw-r--r-- | js/bootstrap-transition.js | 2 | ||||
| -rw-r--r-- | js/bootstrap-typeahead.js | 2 | ||||
| -rw-r--r-- | js/tests/unit/bootstrap-modal.js | 17 |
14 files changed, 42 insertions, 17 deletions
diff --git a/js/bootstrap-affix.js b/js/bootstrap-affix.js index 7595fdb06..827ff458e 100644 --- a/js/bootstrap-affix.js +++ b/js/bootstrap-affix.js @@ -1,5 +1,5 @@ /* ========================================================== - * bootstrap-affix.js v2.3.0 + * bootstrap-affix.js v2.3.1 * http://twitter.github.com/bootstrap/javascript.html#affix * ========================================================== * Copyright 2012 Twitter, Inc. diff --git a/js/bootstrap-alert.js b/js/bootstrap-alert.js index b5627984e..8917f9490 100644 --- a/js/bootstrap-alert.js +++ b/js/bootstrap-alert.js @@ -1,5 +1,5 @@ /* ========================================================== - * bootstrap-alert.js v2.3.0 + * bootstrap-alert.js v2.3.1 * http://twitter.github.com/bootstrap/javascript.html#alerts * ========================================================== * Copyright 2012 Twitter, Inc. diff --git a/js/bootstrap-button.js b/js/bootstrap-button.js index 045927b6b..66df0a296 100644 --- a/js/bootstrap-button.js +++ b/js/bootstrap-button.js @@ -1,5 +1,5 @@ /* ============================================================ - * bootstrap-button.js v2.3.0 + * bootstrap-button.js v2.3.1 * http://twitter.github.com/bootstrap/javascript.html#buttons * ============================================================ * Copyright 2012 Twitter, Inc. diff --git a/js/bootstrap-carousel.js b/js/bootstrap-carousel.js index 604552012..b40edd7bf 100644 --- a/js/bootstrap-carousel.js +++ b/js/bootstrap-carousel.js @@ -1,5 +1,5 @@ /* ========================================================== - * bootstrap-carousel.js v2.3.0 + * bootstrap-carousel.js v2.3.1 * http://twitter.github.com/bootstrap/javascript.html#carousel * ========================================================== * Copyright 2012 Twitter, Inc. @@ -75,7 +75,7 @@ if (!e) this.paused = true if (this.$element.find('.next, .prev').length && $.support.transition.end) { this.$element.trigger($.support.transition.end) - this.cycle() + this.cycle(true) } clearInterval(this.interval) this.interval = null diff --git a/js/bootstrap-collapse.js b/js/bootstrap-collapse.js index 7bbad8e43..2bede4a88 100644 --- a/js/bootstrap-collapse.js +++ b/js/bootstrap-collapse.js @@ -1,5 +1,5 @@ /* ============================================================= - * bootstrap-collapse.js v2.3.0 + * bootstrap-collapse.js v2.3.1 * http://twitter.github.com/bootstrap/javascript.html#collapse * ============================================================= * Copyright 2012 Twitter, Inc. diff --git a/js/bootstrap-dropdown.js b/js/bootstrap-dropdown.js index ec86cf0d7..a1d51519f 100644 --- a/js/bootstrap-dropdown.js +++ b/js/bootstrap-dropdown.js @@ -1,5 +1,5 @@ /* ============================================================ - * bootstrap-dropdown.js v2.3.0 + * bootstrap-dropdown.js v2.3.1 * http://twitter.github.com/bootstrap/javascript.html#dropdowns * ============================================================ * Copyright 2012 Twitter, Inc. @@ -158,7 +158,7 @@ $(document) .on('click.dropdown.data-api', clearMenus) .on('click.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() }) - .on('.dropdown-menu', function (e) { e.stopPropagation() }) + .on('click.dropdown-menu', function (e) { e.stopPropagation() }) .on('click.dropdown.data-api' , toggle, Dropdown.prototype.toggle) .on('keydown.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown) diff --git a/js/bootstrap-modal.js b/js/bootstrap-modal.js index b5ffa95b3..12abe06f1 100644 --- a/js/bootstrap-modal.js +++ b/js/bootstrap-modal.js @@ -1,5 +1,5 @@ /* ========================================================= - * bootstrap-modal.js v2.3.0 + * bootstrap-modal.js v2.3.1 * http://twitter.github.com/bootstrap/javascript.html#modals * ========================================================= * Copyright 2012 Twitter, Inc. @@ -148,7 +148,7 @@ } , removeBackdrop: function () { - this.$backdrop.remove() + this.$backdrop && this.$backdrop.remove() this.$backdrop = null } diff --git a/js/bootstrap-popover.js b/js/bootstrap-popover.js index 0e7774bf6..e6d897cd3 100644 --- a/js/bootstrap-popover.js +++ b/js/bootstrap-popover.js @@ -1,5 +1,5 @@ /* =========================================================== - * bootstrap-popover.js v2.3.0 + * bootstrap-popover.js v2.3.1 * http://twitter.github.com/bootstrap/javascript.html#popovers * =========================================================== * Copyright 2012 Twitter, Inc. diff --git a/js/bootstrap-scrollspy.js b/js/bootstrap-scrollspy.js index dff9a3b37..ac1402b4b 100644 --- a/js/bootstrap-scrollspy.js +++ b/js/bootstrap-scrollspy.js @@ -1,5 +1,5 @@ /* ============================================================= - * bootstrap-scrollspy.js v2.3.0 + * bootstrap-scrollspy.js v2.3.1 * http://twitter.github.com/bootstrap/javascript.html#scrollspy * ============================================================= * Copyright 2012 Twitter, Inc. diff --git a/js/bootstrap-tab.js b/js/bootstrap-tab.js index bd77eb5c3..1d23df6c6 100644 --- a/js/bootstrap-tab.js +++ b/js/bootstrap-tab.js @@ -1,5 +1,5 @@ /* ======================================================== - * bootstrap-tab.js v2.3.0 + * bootstrap-tab.js v2.3.1 * http://twitter.github.com/bootstrap/javascript.html#tabs * ======================================================== * Copyright 2012 Twitter, Inc. diff --git a/js/bootstrap-tooltip.js b/js/bootstrap-tooltip.js index 981319077..835abbe68 100644 --- a/js/bootstrap-tooltip.js +++ b/js/bootstrap-tooltip.js @@ -1,5 +1,5 @@ /* =========================================================== - * bootstrap-tooltip.js v2.3.0 + * bootstrap-tooltip.js v2.3.1 * http://twitter.github.com/bootstrap/javascript.html#tooltips * Inspired by the original jQuery.tipsy by Jason Frame * =========================================================== @@ -80,7 +80,15 @@ } , enter: function (e) { - var self = $(e.currentTarget)[this.type](this._options).data(this.type) + var defaults = $.fn[this.type].defaults + , options = {} + , self + + this._options && $.each(this._options, function (key, value) { + if (defaults[key] != value) options[key] = value + }, this) + + self = $(e.currentTarget)[this.type](options).data(this.type) if (!self.options.delay || !self.options.delay.show) return self.show() diff --git a/js/bootstrap-transition.js b/js/bootstrap-transition.js index 64f275778..92719d37e 100644 --- a/js/bootstrap-transition.js +++ b/js/bootstrap-transition.js @@ -1,5 +1,5 @@ /* =================================================== - * bootstrap-transition.js v2.3.0 + * bootstrap-transition.js v2.3.1 * http://twitter.github.com/bootstrap/javascript.html#transitions * =================================================== * Copyright 2012 Twitter, Inc. diff --git a/js/bootstrap-typeahead.js b/js/bootstrap-typeahead.js index 960f2af85..280cde8be 100644 --- a/js/bootstrap-typeahead.js +++ b/js/bootstrap-typeahead.js @@ -1,5 +1,5 @@ /* ============================================================= - * bootstrap-typeahead.js v2.3.0 + * bootstrap-typeahead.js v2.3.1 * http://twitter.github.com/bootstrap/javascript.html#typeahead * ============================================================= * Copyright 2012 Twitter, Inc. diff --git a/js/tests/unit/bootstrap-modal.js b/js/tests/unit/bootstrap-modal.js index 98aa990a6..b0096f8ed 100644 --- a/js/tests/unit/bootstrap-modal.js +++ b/js/tests/unit/bootstrap-modal.js @@ -117,4 +117,21 @@ $(function () { }) .modal("toggle") }) + + test("should allow modal close with 'backdrop:false'", function () { + stop() + $.support.transition = false + var div = $("<div>", { id: 'modal-test', "data-backdrop": false }) + div + .bind("shown", function () { + ok($('#modal-test').is(":visible"), 'modal visible') + div.modal("hide") + }) + .bind("hidden", function() { + ok(!$('#modal-test').is(":visible"), 'modal hidden') + div.remove() + start() + }) + .modal("show") + }) })
\ No newline at end of file |
