Skip to content

Commit

Permalink
remove fail from script, fixes gh-69
Browse files Browse the repository at this point in the history
  • Loading branch information
stkenny committed Jan 14, 2025
1 parent f166b98 commit 1b866ae
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions app/assets/javascripts/dri/autocomplete_vocabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,13 @@ function addVocabAutocomplete(id) {
source: function(request, response) {
$.ajax({
url: endpoint + request.term.toLowerCase(),
timeout: 5000,
timeout: 8000,
type: 'GET',
dataType: 'json',
complete: function(xhr, status) {
var results = $.parseJSON(xhr.responseText);
response(results);
}
}).fail(function(){
var endpoint_name = $(dropdown_selector).find(':selected').text().trim();
var end_message = '. Please try a different autocomplete source';
alert('error fetching ' + endpoint_name + end_message);
}).always(function(){
// remove loading gif
$(input_selector).removeClass('ui-autocomplete-loading');
Expand Down

0 comments on commit 1b866ae

Please sign in to comment.