mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-17 19:06:40 +02:00
Merge branch 'master' into 3.0.0-wip
Conflicts: docs/assets/js/bootstrap.min.js
This commit is contained in:
19
js/bootstrap-modal.js
vendored
19
js/bootstrap-modal.js
vendored
@@ -138,12 +138,13 @@
|
||||
})
|
||||
}
|
||||
|
||||
, hideModal: function (that) {
|
||||
this.$element
|
||||
.hide()
|
||||
.trigger('hidden')
|
||||
|
||||
this.backdrop()
|
||||
, hideModal: function () {
|
||||
var that = this
|
||||
this.$element.hide()
|
||||
this.backdrop(function () {
|
||||
that.removeBackdrop()
|
||||
that.$element.trigger('hidden')
|
||||
})
|
||||
}
|
||||
|
||||
, removeBackdrop: function () {
|
||||
@@ -171,6 +172,8 @@
|
||||
|
||||
this.$backdrop.addClass('in')
|
||||
|
||||
if (!callback) return
|
||||
|
||||
doAnimate ?
|
||||
this.$backdrop.one($.support.transition.end, callback) :
|
||||
callback()
|
||||
@@ -179,8 +182,8 @@
|
||||
this.$backdrop.removeClass('in')
|
||||
|
||||
$.support.transition && this.$element.hasClass('fade')?
|
||||
this.$backdrop.one($.support.transition.end, $.proxy(this.removeBackdrop, this)) :
|
||||
this.removeBackdrop()
|
||||
this.$backdrop.one($.support.transition.end, callback) :
|
||||
callback()
|
||||
|
||||
} else if (callback) {
|
||||
callback()
|
||||
|
2
js/bootstrap-tooltip.js
vendored
2
js/bootstrap-tooltip.js
vendored
@@ -245,7 +245,7 @@
|
||||
, fixTitle: function () {
|
||||
var $e = this.$element
|
||||
if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') {
|
||||
$e.attr('data-original-title', $e.attr('title') || '').removeAttr('title')
|
||||
$e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
|
||||
}
|
||||
}
|
||||
|
||||
|
1
js/bootstrap-typeahead.js
vendored
1
js/bootstrap-typeahead.js
vendored
@@ -329,7 +329,6 @@
|
||||
$(document).on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) {
|
||||
var $this = $(this)
|
||||
if ($this.data('typeahead')) return
|
||||
e.preventDefault()
|
||||
$this.typeahead($this.data())
|
||||
})
|
||||
|
||||
|
4
js/tests/unit/bootstrap-tooltip.js
vendored
4
js/tests/unit/bootstrap-tooltip.js
vendored
@@ -22,9 +22,9 @@ $(function () {
|
||||
ok(!!$.fn.tooltip.defaults, 'defaults is defined')
|
||||
})
|
||||
|
||||
test("should remove title attribute", function () {
|
||||
test("should empty title attribute", function () {
|
||||
var tooltip = $('<a href="#" rel="tooltip" title="Another tooltip"></a>').tooltip()
|
||||
ok(!tooltip.attr('title'), 'title tag was removed')
|
||||
ok(tooltip.attr('title') === '', 'title attribute was emptied')
|
||||
})
|
||||
|
||||
test("should add data attribute for referencing original title", function () {
|
||||
|
Reference in New Issue
Block a user