Skip to content

Commit 997a4b9

Browse files
author
Tomas Kirda
committed
Rev for 1.2.7 release
1 parent 6e055c1 commit 997a4b9

File tree

4 files changed

+26
-20
lines changed

4 files changed

+26
-20
lines changed

devbridge-autocomplete.jquery.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"ajax",
77
"autocomplete"
88
],
9-
"version": "1.2.6",
9+
"version": "1.2.7",
1010
"author": {
1111
"name": "Tomas Kirda",
1212
"url": "https://github.com/tkirda"

dist/jquery.autocomplete.js

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Ajax Autocomplete for jQuery, version 1.2.6
2+
* Ajax Autocomplete for jQuery, version 1.2.7
33
* (c) 2013 Tomas Kirda
44
*
55
* Ajax Autocomplete for jQuery is freely distributable under the terms of an MIT-style license.
@@ -381,7 +381,8 @@
381381
getSuggestions: function (q) {
382382
var response,
383383
that = this,
384-
options = that.options;
384+
options = that.options,
385+
serviceUrl = options.serviceUrl;
385386

386387
response = that.isLocal ? that.getSuggestionsLocal(q) : that.cachedResponse[q];
387388

@@ -390,10 +391,15 @@
390391
that.suggest();
391392
} else if (!that.isBadQuery(q)) {
392393
options.params[options.paramName] = q;
393-
options.onSearchStart.call(that.element, options.params);
394+
if (options.onSearchStart.call(that.element, options.params) === false) {
395+
return;
396+
}
397+
if ($.isFunction(options.serviceUrl)) {
398+
serviceUrl = options.serviceUrl.call(that.element, q);
399+
}
394400
$.ajax({
395-
url: options.serviceUrl,
396-
data: options.params,
401+
url: serviceUrl,
402+
data: options.ignoreParams ? null : options.params,
397403
type: options.type,
398404
dataType: options.dataType
399405
}).done(function (data) {

dist/jquery.autocomplete.min.js

Lines changed: 13 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/jquery.autocomplete.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Ajax Autocomplete for jQuery, version 1.2.6
2+
* Ajax Autocomplete for jQuery, version 1.2.7
33
* (c) 2013 Tomas Kirda
44
*
55
* Ajax Autocomplete for jQuery is freely distributable under the terms of an MIT-style license.

0 commit comments

Comments
 (0)