Skip to content

Commit

Permalink
update bie-index autocomplete URL, cancel explore/your-area in progre…
Browse files Browse the repository at this point in the history
…ss get requests
  • Loading branch information
Adam Collins committed Apr 5, 2024
1 parent fd68070 commit 486f117
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion grails-app/assets/javascripts/exploreYourArea.js
Original file line number Diff line number Diff line change
Expand Up @@ -640,11 +640,17 @@ function addAddressToPage(response) {
var speciesJson
var globalSortOrder
var globalOffset
var currentGroup
var dataRequest

/**
* Species group was clicked
*/
function groupClicked(el) {
if (dataRequest) {
dataRequest.abort();
}

speciesJson = []

// Change the global var speciesGroup
Expand Down Expand Up @@ -680,7 +686,7 @@ function groupClicked(el) {

$('#spinnerRow').show();
$("div#rightList").data("sort", sortField); // save 'sort' value to the DOM
$.getJSON(uri, params, function(data) {
dataRequest = $.getJSON(uri, params, function(data) {
$('#spinnerRow').hide();

// global store
Expand Down
2 changes: 1 addition & 1 deletion grails-app/views/home/index.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
contextPath: "${request.contextPath}",
locale: "${org.springframework.web.servlet.support.RequestContextUtils.getLocale(request)}",
queryContext: "${grailsApplication.config.getProperty('biocache.queryContext')}",
autocompleteUrl: "${grailsApplication.config.getProperty('skin.useAlaBie', Boolean) ? (grailsApplication.config.getProperty('bieService.baseUrl') + '/search/auto.json') : biocacheServiceUrl + '/autocomplete/search'}",
autocompleteUrl: "${grailsApplication.config.getProperty('skin.useAlaBie', Boolean) ? (grailsApplication.config.getProperty('bieService.baseUrl') + '/search/auto') : biocacheServiceUrl + '/autocomplete/search'}",
autocompleteUseBie: ${grailsApplication.config.getProperty('skin.useAlaBie', Boolean, false)}
}
</script>
Expand Down

0 comments on commit 486f117

Please sign in to comment.