mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-30 22:52:24 +01:00
rebuild
This commit is contained in:
parent
ba202d77ba
commit
f3cf4cbaae
7
docs/assets/js/bootstrap-typeahead.js
vendored
7
docs/assets/js/bootstrap-typeahead.js
vendored
@ -32,6 +32,7 @@
|
|||||||
this.matcher = this.options.matcher || this.matcher
|
this.matcher = this.options.matcher || this.matcher
|
||||||
this.sorter = this.options.sorter || this.sorter
|
this.sorter = this.options.sorter || this.sorter
|
||||||
this.highlighter = this.options.highlighter || this.highlighter
|
this.highlighter = this.options.highlighter || this.highlighter
|
||||||
|
this.updater = this.options.updater || this.updater
|
||||||
this.$menu = $(this.options.menu).appendTo('body')
|
this.$menu = $(this.options.menu).appendTo('body')
|
||||||
this.source = this.options.source
|
this.source = this.options.source
|
||||||
this.shown = false
|
this.shown = false
|
||||||
@ -45,11 +46,15 @@
|
|||||||
, select: function () {
|
, select: function () {
|
||||||
var val = this.$menu.find('.active').attr('data-value')
|
var val = this.$menu.find('.active').attr('data-value')
|
||||||
this.$element
|
this.$element
|
||||||
.val(val)
|
.val(this.updater(val))
|
||||||
.change()
|
.change()
|
||||||
return this.hide()
|
return this.hide()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
, updater: function (item) {
|
||||||
|
return item
|
||||||
|
}
|
||||||
|
|
||||||
, show: function () {
|
, show: function () {
|
||||||
var pos = $.extend({}, this.$element.offset(), {
|
var pos = $.extend({}, this.$element.offset(), {
|
||||||
height: this.$element[0].offsetHeight
|
height: this.$element[0].offsetHeight
|
||||||
|
7
docs/assets/js/bootstrap.js
vendored
7
docs/assets/js/bootstrap.js
vendored
@ -1565,6 +1565,7 @@
|
|||||||
this.matcher = this.options.matcher || this.matcher
|
this.matcher = this.options.matcher || this.matcher
|
||||||
this.sorter = this.options.sorter || this.sorter
|
this.sorter = this.options.sorter || this.sorter
|
||||||
this.highlighter = this.options.highlighter || this.highlighter
|
this.highlighter = this.options.highlighter || this.highlighter
|
||||||
|
this.updater = this.options.updater || this.updater
|
||||||
this.$menu = $(this.options.menu).appendTo('body')
|
this.$menu = $(this.options.menu).appendTo('body')
|
||||||
this.source = this.options.source
|
this.source = this.options.source
|
||||||
this.shown = false
|
this.shown = false
|
||||||
@ -1578,11 +1579,15 @@
|
|||||||
, select: function () {
|
, select: function () {
|
||||||
var val = this.$menu.find('.active').attr('data-value')
|
var val = this.$menu.find('.active').attr('data-value')
|
||||||
this.$element
|
this.$element
|
||||||
.val(val)
|
.val(this.updater(val))
|
||||||
.change()
|
.change()
|
||||||
return this.hide()
|
return this.hide()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
, updater: function (item) {
|
||||||
|
return item
|
||||||
|
}
|
||||||
|
|
||||||
, show: function () {
|
, show: function () {
|
||||||
var pos = $.extend({}, this.$element.offset(), {
|
var pos = $.extend({}, this.$element.offset(), {
|
||||||
height: this.$element[0].offsetHeight
|
height: this.$element[0].offsetHeight
|
||||||
|
2
docs/assets/js/bootstrap.min.js
vendored
2
docs/assets/js/bootstrap.min.js
vendored
File diff suppressed because one or more lines are too long
@ -1490,12 +1490,6 @@ $('.carousel').carousel({
|
|||||||
<td>highlights all default matches</td>
|
<td>highlights all default matches</td>
|
||||||
<td>Method used to highlight autocomplete results. Accepts a single argument <code>item</code> and has the scope of the typeahead instance. Should return html.</td>
|
<td>Method used to highlight autocomplete results. Accepts a single argument <code>item</code> and has the scope of the typeahead instance. Should return html.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<td>updater</td>
|
|
||||||
<td>function</td>
|
|
||||||
<td>replaces contents of text input with typeahead selection</td>
|
|
||||||
<td>Method used to update contents of text input. Accepts a single argument, the <code>item</code> selected from the typeahead, and has the scope of the typeahead instance. Should return a string.</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user