mirror of
https://github.com/devbridge/jQuery-Autocomplete.git
synced 2024-11-22 12:55:12 +00:00
Rev for 1.2.13 release
This commit is contained in:
parent
2a0f1f7b89
commit
d90cc5e92f
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "devbridge-autocomplete",
|
"name": "devbridge-autocomplete",
|
||||||
"version": "1.2.12",
|
"version": "1.2.13",
|
||||||
"homepage": "https://github.com/devbridge/jQuery-Autocomplete",
|
"homepage": "https://github.com/devbridge/jQuery-Autocomplete",
|
||||||
"authors": [
|
"authors": [
|
||||||
"Tomas Kirda"
|
"Tomas Kirda"
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
"ajax",
|
"ajax",
|
||||||
"autocomplete"
|
"autocomplete"
|
||||||
],
|
],
|
||||||
"version": "1.2.12",
|
"version": "1.2.13",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Tomas Kirda",
|
"name": "Tomas Kirda",
|
||||||
"url": "https://github.com/tkirda"
|
"url": "https://github.com/tkirda"
|
||||||
|
14
dist/jquery.autocomplete.js
vendored
14
dist/jquery.autocomplete.js
vendored
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Ajax Autocomplete for jQuery, version 1.2.12
|
* Ajax Autocomplete for jQuery, version 1.2.13
|
||||||
* (c) 2014 Tomas Kirda
|
* (c) 2014 Tomas Kirda
|
||||||
*
|
*
|
||||||
* Ajax Autocomplete for jQuery is freely distributable under the terms of an MIT-style license.
|
* Ajax Autocomplete for jQuery is freely distributable under the terms of an MIT-style license.
|
||||||
@ -247,6 +247,7 @@
|
|||||||
disable: function () {
|
disable: function () {
|
||||||
var that = this;
|
var that = this;
|
||||||
that.disabled = true;
|
that.disabled = true;
|
||||||
|
clearInterval(that.onChangeInterval);
|
||||||
if (that.currentRequest) {
|
if (that.currentRequest) {
|
||||||
that.currentRequest.abort();
|
that.currentRequest.abort();
|
||||||
}
|
}
|
||||||
@ -532,6 +533,10 @@
|
|||||||
options.params[options.paramName] = q;
|
options.params[options.paramName] = q;
|
||||||
params = options.ignoreParams ? null : options.params;
|
params = options.ignoreParams ? null : options.params;
|
||||||
|
|
||||||
|
if (options.onSearchStart.call(that.element, options.params) === false) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (that.isLocal) {
|
if (that.isLocal) {
|
||||||
response = that.getSuggestionsLocal(q);
|
response = that.getSuggestionsLocal(q);
|
||||||
} else {
|
} else {
|
||||||
@ -545,10 +550,8 @@
|
|||||||
if (response && $.isArray(response.suggestions)) {
|
if (response && $.isArray(response.suggestions)) {
|
||||||
that.suggestions = response.suggestions;
|
that.suggestions = response.suggestions;
|
||||||
that.suggest();
|
that.suggest();
|
||||||
|
options.onSearchComplete.call(that.element, q, response.suggestions);
|
||||||
} else if (!that.isBadQuery(q)) {
|
} else if (!that.isBadQuery(q)) {
|
||||||
if (options.onSearchStart.call(that.element, options.params) === false) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (that.currentRequest) {
|
if (that.currentRequest) {
|
||||||
that.currentRequest.abort();
|
that.currentRequest.abort();
|
||||||
}
|
}
|
||||||
@ -571,6 +574,8 @@
|
|||||||
}).fail(function (jqXHR, textStatus, errorThrown) {
|
}).fail(function (jqXHR, textStatus, errorThrown) {
|
||||||
options.onSearchError.call(that.element, q, 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;
|
var that = this;
|
||||||
that.visible = false;
|
that.visible = false;
|
||||||
that.selectedIndex = -1;
|
that.selectedIndex = -1;
|
||||||
|
clearInterval(that.onChangeInterval);
|
||||||
$(that.suggestionsContainer).hide();
|
$(that.suggestionsContainer).hide();
|
||||||
that.signalHint(null);
|
that.signalHint(null);
|
||||||
},
|
},
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "devbridge-autocomplete",
|
"name": "devbridge-autocomplete",
|
||||||
"version": "1.2.12",
|
"version": "1.2.13",
|
||||||
"description": "Autocomplete provides suggestions while you type into the text field.",
|
"description": "Autocomplete provides suggestions while you type into the text field.",
|
||||||
"homepage": "https://github.com/devbridge/jQuery-Autocomplete",
|
"homepage": "https://github.com/devbridge/jQuery-Autocomplete",
|
||||||
"author": "Tomas Kirda (https://twitter.com/tkirda)",
|
"author": "Tomas Kirda (https://twitter.com/tkirda)",
|
||||||
|
Loading…
Reference in New Issue
Block a user