2
0
mirror of https://github.com/devbridge/jQuery-Autocomplete.git synced 2024-11-22 04:45:12 +00:00

Rev for 1.2.13 release

This commit is contained in:
Tomas Kirda 2014-09-21 18:09:53 -05:00
parent 2a0f1f7b89
commit d90cc5e92f
4 changed files with 13 additions and 7 deletions

View File

@ -1,6 +1,6 @@
{
"name": "devbridge-autocomplete",
"version": "1.2.12",
"version": "1.2.13",
"homepage": "https://github.com/devbridge/jQuery-Autocomplete",
"authors": [
"Tomas Kirda"

View File

@ -6,7 +6,7 @@
"ajax",
"autocomplete"
],
"version": "1.2.12",
"version": "1.2.13",
"author": {
"name": "Tomas Kirda",
"url": "https://github.com/tkirda"

View File

@ -1,5 +1,5 @@
/**
* Ajax Autocomplete for jQuery, version 1.2.12
* Ajax Autocomplete for jQuery, version 1.2.13
* (c) 2014 Tomas Kirda
*
* Ajax Autocomplete for jQuery is freely distributable under the terms of an MIT-style license.
@ -247,6 +247,7 @@
disable: function () {
var that = this;
that.disabled = true;
clearInterval(that.onChangeInterval);
if (that.currentRequest) {
that.currentRequest.abort();
}
@ -532,6 +533,10 @@
options.params[options.paramName] = q;
params = options.ignoreParams ? null : options.params;
if (options.onSearchStart.call(that.element, options.params) === false) {
return;
}
if (that.isLocal) {
response = that.getSuggestionsLocal(q);
} else {
@ -545,10 +550,8 @@
if (response && $.isArray(response.suggestions)) {
that.suggestions = response.suggestions;
that.suggest();
options.onSearchComplete.call(that.element, q, response.suggestions);
} else if (!that.isBadQuery(q)) {
if (options.onSearchStart.call(that.element, options.params) === false) {
return;
}
if (that.currentRequest) {
that.currentRequest.abort();
}
@ -571,6 +574,8 @@
}).fail(function (jqXHR, textStatus, errorThrown) {
options.onSearchError.call(that.element, q, jqXHR, textStatus, errorThrown);
});
} else {
options.onSearchComplete.call(that.element, q, []);
}
},
@ -595,6 +600,7 @@
var that = this;
that.visible = false;
that.selectedIndex = -1;
clearInterval(that.onChangeInterval);
$(that.suggestionsContainer).hide();
that.signalHint(null);
},

View File

@ -1,6 +1,6 @@
{
"name": "devbridge-autocomplete",
"version": "1.2.12",
"version": "1.2.13",
"description": "Autocomplete provides suggestions while you type into the text field.",
"homepage": "https://github.com/devbridge/jQuery-Autocomplete",
"author": "Tomas Kirda (https://twitter.com/tkirda)",