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

Rev for 1.2.19 release

This commit is contained in:
Tomas Kirda 2015-05-03 19:04:25 -05:00
parent d7b487cc73
commit afdece2298
5 changed files with 19 additions and 13 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "devbridge-autocomplete", "name": "devbridge-autocomplete",
"version": "1.2.18", "version": "1.2.19",
"homepage": "https://github.com/devbridge/jQuery-Autocomplete", "homepage": "https://github.com/devbridge/jQuery-Autocomplete",
"authors": [ "authors": [
"Tomas Kirda" "Tomas Kirda"
@ -16,7 +16,9 @@
"**/.*", "**/.*",
"node_modules", "node_modules",
"bower_components", "bower_components",
"spec" "spec",
"scripts",
"content"
], ],
"dependencies": { "dependencies": {
"jquery": ">=1.7" "jquery": ">=1.7"

View File

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

View File

@ -1,5 +1,5 @@
/** /**
* Ajax Autocomplete for jQuery, version 1.2.18 * Ajax Autocomplete for jQuery, version 1.2.19
* (c) 2015 Tomas Kirda * (c) 2015 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.
@ -217,6 +217,14 @@
onBlur: function () { onBlur: function () {
this.enableKillerFn(); this.enableKillerFn();
}, },
abortAjax: function () {
var that = this;
if (that.currentRequest) {
that.currentRequest.abort();
that.currentRequest = null;
}
},
setOptions: function (suppliedOptions) { setOptions: function (suppliedOptions) {
var that = this, var that = this,
@ -256,9 +264,7 @@
var that = this; var that = this;
that.disabled = true; that.disabled = true;
clearInterval(that.onChangeInterval); clearInterval(that.onChangeInterval);
if (that.currentRequest) { that.abortAjax();
that.currentRequest.abort();
}
}, },
enable: function () { enable: function () {
@ -573,9 +579,7 @@
that.suggest(); that.suggest();
options.onSearchComplete.call(that.element, q, response.suggestions); options.onSearchComplete.call(that.element, q, response.suggestions);
} else if (!that.isBadQuery(q)) { } else if (!that.isBadQuery(q)) {
if (that.currentRequest) { that.abortAjax();
that.currentRequest.abort();
}
ajaxSettings = { ajaxSettings = {
url: serviceUrl, url: serviceUrl,

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
{ {
"name": "devbridge-autocomplete", "name": "devbridge-autocomplete",
"version": "1.2.18", "version": "1.2.19",
"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)",