Skip to content

Commit d084516

Browse files
committed
BIE autocomplete URL set via config
Was previously hard-coded to bie.ala.org.au, now is set by config.bie.baseUrl. Also a fix for JS error on EYA page.
1 parent 4656ea8 commit d084516

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

Diff for: grails-app/conf/BiocacheHubsResources.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ modules = {
4141

4242
bieAutocomplete {
4343
dependsOn 'jquery'
44-
defaultBundle 'main-core'
44+
//defaultBundle 'main-core'
4545
resource url: [dir:'js', file:'bieAutocomplete.js', plugin:'biocache-hubs'], disposition: 'head'
4646
}
4747

Diff for: grails-app/views/home/index.gsp

+1
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@
110110
// global var for GSP tags/vars to be passed into JS functions
111111
var BC_CONF = {
112112
biocacheServiceUrl: "${alatag.getBiocacheAjaxUrl()}",
113+
bieWebappUrl: "${grailsApplication.config.bie.baseUrl}",
113114
contextPath: "${request.contextPath}",
114115
queryContext: "${grailsApplication.config.biocache.queryContext}"
115116
}

Diff for: web-app/js/bieAutocomplete.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
*/
1919
jQuery(document).ready(function() {
2020
// Autocomplete
21-
jQuery(":input#taxaQuery, :input#solrQuery, :input#taxa, :input.name_autocomplete").autocomplete('http://bie.ala.org.au/search/auto.json', {
21+
var bieBaseUrl = BC_CONF.bieWebappUrl;
22+
jQuery(":input#taxaQuery, :input#solrQuery, :input#taxa, :input.name_autocomplete").autocomplete(bieBaseUrl + '/search/auto.json', {
2223
extraParams: {limit:100},
2324
dataType: 'jsonp',
2425
parse: function(data) {

0 commit comments

Comments
 (0)