Created
February 6, 2012 15:48
-
-
Save np422/1752784 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git diff ccb9ebe0ed59f41a59da84b7c74962886f6cceef..be3d311a71a91dc4142472b3d35e4ee52740f009 -- jquery.tokeninput-v2.js | |
diff --git a/public/javascripts/autocomplete/jquery.tokeninput-v2.js b/public/javascripts/autocomplete/jquery.tokeninput-v2.js | |
index fc0a765..85a9aa6 100644 | |
--- a/public/javascripts/autocomplete/jquery.tokeninput-v2.js | |
+++ b/public/javascripts/autocomplete/jquery.tokeninput-v2.js | |
@@ -795,9 +795,6 @@ | |
populate_dropdown(query, settings.jsonContainer ? results[settings.jsonContainer] : results); | |
} | |
- var queryStringDelimiter = settings.url.indexOf("?") < 0 ? "?" : "&"; | |
- var url = settings.url + queryStringDelimiter + settings.queryParam + "=" + encodeURIComponent(query) | |
- | |
var type = "GET"; | |
if(settings.method == "POST") { | |
@@ -807,10 +804,13 @@ | |
// Increase request count | |
request_count++; | |
+ var data = { "type_limit": settings.typeLimit, "max_limit": settings.maxLimit } | |
+ data[settings.queryParam] = encodeURIComponent(query); | |
+ | |
$.ajax({ | |
type: type, | |
- url: url, | |
- data: {}, | |
+ url: settings.url, | |
+ data: data, | |
success: callback, | |
dataType: settings.contentType, | |
// Set the request count as the context to be |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment