summaryrefslogtreecommitdiffstats
path: root/static/functions/autocomplete.js
diff options
context:
space:
mode:
authorGit <git@what.cd>2013-08-13 08:00:43 +0000
committerGit <git@what.cd>2013-08-13 08:00:43 +0000
commitd16aef7dbf067b62895bd299d80fb8b2692077f9 (patch)
tree1a12bc9ebe1b31c975eb6a6a1c0ada9018a8b40a /static/functions/autocomplete.js
parentc5e5105cca80618296aa86a6d83a8e89893b8f39 (diff)
downloadGazelle-d16aef7dbf067b62895bd299d80fb8b2692077f9.zip
Gazelle-d16aef7dbf067b62895bd299d80fb8b2692077f9.tar.gz
Gazelle-d16aef7dbf067b62895bd299d80fb8b2692077f9.tar.bz2
Empty commit
Diffstat (limited to 'static/functions/autocomplete.js')
-rw-r--r--static/functions/autocomplete.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/static/functions/autocomplete.js b/static/functions/autocomplete.js
index a6e6efa..5992707 100644
--- a/static/functions/autocomplete.js
+++ b/static/functions/autocomplete.js
@@ -5,26 +5,31 @@ $(document).ready(function() {
var url = new URL();
$('#artistsearch' + SELECTOR).autocomplete({
- serviceUrl : ARTIST_AUTOCOMPLETE_URL,
+ deferRequestBy: 300,
onSelect : function(suggestion) {
window.location = 'artist.php?id=' + suggestion['data'];
},
+ serviceUrl : ARTIST_AUTOCOMPLETE_URL,
});
if (url.path == 'torrents' || url.path == 'upload' || url.path == 'artist' || (url.path == 'requests' && url.query['action'] == 'new') || url.path == 'collages') {
$("#artist" + SELECTOR).autocomplete({
+ deferRequestBy: 300,
serviceUrl : ARTIST_AUTOCOMPLETE_URL
});
$("#artistsimilar" + SELECTOR).autocomplete({
+ deferRequestBy: 300,
serviceUrl : ARTIST_AUTOCOMPLETE_URL
});
}
if (url.path == 'torrents' || url.path == 'upload' || url.path == 'collages' || url.path == 'requests' || url.path == 'top10' || (url.path == 'requests' && url.query['action'] == 'new')) {
$("#tags" + SELECTOR).autocomplete({
- serviceUrl : TAGS_AUTOCOMPLETE_URL,
- delimiter: ','
+ deferRequestBy: 300,
+ delimiter: ',',
+ serviceUrl : TAGS_AUTOCOMPLETE_URL
});
$("#tagname" + SELECTOR).autocomplete({
+ deferRequestBy: 300,
serviceUrl : TAGS_AUTOCOMPLETE_URL,
});
}