bootstrap-combobox 1.2 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
|
|
1
1
|
/* =============================================================
|
2
|
-
* bootstrap-combobox.js v1.
|
2
|
+
* bootstrap-combobox.js v1.2
|
3
3
|
* =============================================================
|
4
4
|
* Copyright 2012 Daniel Farrell
|
5
5
|
*
|
@@ -202,10 +202,14 @@
|
|
202
202
|
var that = this
|
203
203
|
this.focused = false
|
204
204
|
var val = this.$element.val()
|
205
|
-
if (
|
206
|
-
|
207
|
-
|
208
|
-
|
205
|
+
if (!!this.options.force_match) {
|
206
|
+
if ( !this.selected && val !== '' ) {
|
207
|
+
this.$element.val('')
|
208
|
+
this.$source.val('').trigger('change')
|
209
|
+
this.$target.val('').trigger('change')
|
210
|
+
}
|
211
|
+
} else {
|
212
|
+
this.$target.val(val).trigger('change')
|
209
213
|
}
|
210
214
|
if (!this.mousedover && this.shown) setTimeout(function () { that.hide() }, 200)
|
211
215
|
}
|
@@ -233,6 +237,7 @@
|
|
233
237
|
template: '<div class="combobox-container"><input type="hidden" /><input type="text" autocomplete="off" /><span class="add-on btn dropdown-toggle" data-dropdown="dropdown"><span class="caret"/><span class="combobox-clear"><i class="icon-remove"/></span></span></div>'
|
234
238
|
, menu: '<ul class="typeahead typeahead-long dropdown-menu"></ul>'
|
235
239
|
, item: '<li><a href="#"></a></li>'
|
240
|
+
, force_match: true
|
236
241
|
}
|
237
242
|
|
238
243
|
$.fn.combobox.Constructor = Combobox
|