Skip to content

Commit

Permalink
Merge pull request #527 from AtlasOfLivingAustralia/release/3.0.9.1
Browse files Browse the repository at this point in the history
Release/3.0.9.1
  • Loading branch information
nickdos authored Feb 21, 2022
2 parents 471fffb + 5d9d63e commit 71b6014
Show file tree
Hide file tree
Showing 39 changed files with 601 additions and 2,681 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# biocache-hubs [![Build Status](https://travis-ci.com/AtlasOfLivingAustralia/biocache-hubs.svg?branch=develop)](https://travis-ci.com/AtlasOfLivingAustralia/biocache-hubs)
# biocache-hubs [![Build Status](https://app.travis-ci.com/AtlasOfLivingAustralia/biocache-hubs.svg?branch=develop)](https://app.travis-ci.com/github/AtlasOfLivingAustralia/biocache-hubs)

**biocache-hubs** is a Grails plugin that provides the core functionality for the _Atlas of Living Australia_ (ALA) [Occurrence search portal](https://biocache.ala.org.au/search) (Biocache) front-end.

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ buildscript {
}
}

version "3.0.8"
version "3.0.9"
group "au.org.ala.plugins.grails"

apply plugin:"eclipse"
Expand Down
Binary file removed grails-app/assets/fonts/FontAwesome.otf
Binary file not shown.
Binary file removed grails-app/assets/fonts/fontawesome-webfont.eot
Binary file not shown.
565 changes: 0 additions & 565 deletions grails-app/assets/fonts/fontawesome-webfont.svg

This file was deleted.

Binary file removed grails-app/assets/fonts/fontawesome-webfont.ttf
Binary file not shown.
Binary file removed grails-app/assets/fonts/fontawesome-webfont.woff
Binary file not shown.
Binary file removed grails-app/assets/fonts/fontawesome-webfont.woff2
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,15 @@
*/
jQuery(document).ready(function() {
// Autocomplete
var bieBaseUrl = BC_CONF.bieWebServiceUrl;
var bieParams = { limit: 20 };
var autoHints = BC_CONF.autocompleteHints; // expects { fq: "kingdom:Plantae" }
$.extend( bieParams, autoHints ); // merge autoHints into bieParams
var autocompleteUrl = BC_CONF.autocompleteUrl;
var params = {};
if (BC_CONF.autocompleteUseBie) {
$.extend(params, {limit: 20});
var autoHints = BC_CONF.autocompleteHints; // expects { fq: "kingdom:Plantae" }
$.extend(params, autoHints); // merge autoHints into params
} else {
$.extend(params, {pageSize: 20});
}

function getMatchingName(item) {
if (item.scientificNameMatches && item.scientificNameMatches.length) {
Expand All @@ -34,7 +39,7 @@ jQuery(document).ready(function() {
} else {
return item.name;
}
};
}

function formatAutocompleteList(list) {
var results = [];
Expand All @@ -46,17 +51,17 @@ jQuery(document).ready(function() {
}

return results;
};
}

$.ui.autocomplete({
source: function (request, response) {
bieParams.q = request.term;
params.q = request.term;
$.ajax( {
url: bieBaseUrl + '/search/auto.json',
url: autocompleteUrl,
dataType: "json",
data: bieParams,
data: params,
success: function( data ) {
response( formatAutocompleteList(data.autoCompleteList) );
response( formatAutocompleteList(BC_CONF.autocompleteUseBie ? data.autoCompleteList : data.searchResults.results) );
}
} );
}
Expand Down
31 changes: 28 additions & 3 deletions grails-app/assets/javascripts/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,8 @@ $(document).ready(function() {
synListSize++;
synList1 += "<input type='checkbox' name='raw_taxon_guid' id='rawTaxon_" + index + "_" + j +
"' class='rawTaxonCheckBox' value='" + el1.label + "'/>&nbsp;" +
"<a href='" + BC_CONF.contextPath + "/occurrences/search?q=raw_taxon_name:%22" + el1.label +
"%22'>" + el1.label + "</a> (" + el1.count + ")<br/>";
"<a href=\"" + BC_CONF.contextPath + "/occurrences/search?q=raw_taxon_name:%22" + encodeURIComponent(el1.label) +
"%22\">" + el1.label + "</a> (" + el1.count + ")<br/>";
});
}
});
Expand Down Expand Up @@ -645,6 +645,31 @@ $(document).ready(function() {
window.location.href = BC_CONF.serverName + "/occurrences/facets/download" + BC_CONF.facetDownloadQuery + '&facets=' + facetName;
});

$('#copy-al4r').on('click', function() {
var input = document.querySelector('#al4rcode');
if (navigator.clipboard && window.isSecureContext) {
// navigator clipboard api method'
navigator.clipboard.writeText(input.value)
.then(() => {
$(this).qtip({
content: jQuery.i18n.prop('list.copylinks.tooltip.copied'),
show: true,
hide: { when: { event: 'mouseout'} }
})})
.catch((error) => { alert(jQuery.i18n.prop('list.copylinks.alert.failed') + error) })
} else {
alert("Copying to clipboard requires a secure HTTPS connection. Value copied to clipboard is: " + input.value);
}

});

$('#copy-al4r').on('mouseleave', function() {
$(this).qtip({
content: jQuery.i18n.prop('list.copylinks.tooltip.copytoclipboard'),
show: { when: { event: 'mouseover'} }
})
})

// when open the user preference dlg
$('.DQPrefSettingsLink').click(function() {
var prefSettings = $('#DQPrefSettings');
Expand Down Expand Up @@ -1185,7 +1210,7 @@ $(document).ready(function() {
});

// user preference settings and download link tooltips will be above the control
$("#usersettings, a.newDownload").qtip({
$("#usersettings, a.copyLink").qtip({
style: {
classes: 'ui-tooltip-rounded ui-tooltip-shadow'
},
Expand Down
50 changes: 44 additions & 6 deletions grails-app/assets/javascripts/show.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,33 @@
//= require linkifyjs/linkify-jquery.js
//= require leaflet/leaflet.js
//= require leaflet-plugins/layer/tile/Google.js
//= require biocache-hubs.js
//= require_self
*/
/**
* JQuery on document ready callback
*/

function updatei18n() {
$('.i8nupdate').each(function() {
var key = $(this).attr('i18nkey')
if (key !== undefined) {
$(this).text(jQuery.i18n.prop(key));
}
});
}

$(document).ready(function() {
if (typeof BC_CONF != 'undefined' && BC_CONF.hasOwnProperty('contextPath')) {
jQuery.i18n.properties({
name: 'messages',
path: BC_CONF.contextPath + '/messages/i18n/',
mode: 'map',
async: true,
cache: true,
language: BC_CONF.locale, // default is to use browser specified locale
callback: updatei18n
});
}

$('#showUncheckedTests').on('click', function(e){
$('.uncheckTestResult').toggle();
Expand Down Expand Up @@ -349,7 +369,10 @@ $(document).ready(function() {
}).click('click', function(e) { e.preventDefault(); });

// add BS tooltip to elements with class "tooltips"
$(".tooltips").tooltip();
$(".tooltips").tooltip( {
trigger: "hover",
delay: { "show": 100, "hide": 1000 }
});

$(".dataQualityHelpLink").popover({
html : true,
Expand Down Expand Up @@ -402,6 +425,21 @@ $(document).ready(function() {
}
});

// Copied from list.js TODO: consolidate into common JS code
$('#copy-al4r').on('click', function() {
var input = document.querySelector('#al4rcode');
if (navigator.clipboard && window.isSecureContext) {
// navigator clipboard api method'
navigator.clipboard.writeText(input.value)

.then(() => { alert(jQuery.i18n.prop('list.copylinks.tooltip.copied')) })
.catch((error) => { alert(jQuery.i18n.prop('list.copylinks.alert.failed') + error) })
} else {
alert("Copying to clipboard requires a secure HTTPS connection. Value: " + input.value);
}

});

}); // end JQuery document ready

/**
Expand Down Expand Up @@ -481,7 +519,7 @@ function refreshUserAnnotations(){
// if the code == 50000, then we have verification - so don't display here
if (userAssertion.code != 50000) {
$clone.prop('id', "userAnnotation_" + userAssertion.uuid);
$clone.find('.issue').text(jQuery.i18n.prop(userAssertion.name));
$clone.find('.issue').text(jQuery.i18n.prop(userAssertion.name)).attr('i18nkey', userAssertion.name);
$clone.find('.user').text(userAssertion.userDisplayName);
if (userAssertion.hasOwnProperty('comment')) {
$clone.find('.comment').text('Comment: ' + userAssertion.comment);
Expand Down Expand Up @@ -533,8 +571,8 @@ function refreshUserAnnotations(){
}
if (userAssertion.relatedRecordReason) {
$clone.find('.related-record-reason').show();
$clone.find('.related-record-reason-span').text(jQuery.i18n.prop('related.record.reason.' + userAssertion.relatedRecordReason));
$clone.find('.related-record-reason-explanation').text(jQuery.i18n.prop('related.record.reason.explanation.' + userAssertion.relatedRecordReason)).show();
$clone.find('.related-record-reason-span').text(jQuery.i18n.prop('related.record.reason.' + userAssertion.relatedRecordReason)).attr('i18nkey', 'related.record.reason.' + userAssertion.relatedRecordReason);
$clone.find('.related-record-reason-explanation').text(jQuery.i18n.prop('related.record.reason.explanation.' + userAssertion.relatedRecordReason)).attr('i18nkey', 'related.record.reason.explanation.' + userAssertion.relatedRecordReason).show();
}
if (userAssertion.userRole != null) {
$clone.find('.userRole').text(', ' + userAssertion.userRole);
Expand Down Expand Up @@ -575,7 +613,7 @@ function refreshUserAnnotations(){
var $clone = $('#userVerificationTemplate').clone();
$clone.prop('id', "userVerificationAnnotation_" + sortedVerifiedAssertion[i].uuid);
var qaStatusMessage = jQuery.i18n.prop("user_assertions." + sortedVerifiedAssertion[i].qaStatus);
$clone.find('.qaStatus').text(qaStatusMessage);
$clone.find('.qaStatus').text(qaStatusMessage).attr('i18nkey', "user_assertions." + sortedVerifiedAssertion[i].qaStatus);
$clone.find('.comment').text(sortedVerifiedAssertion[i].comment);
$clone.find('.userDisplayName').text(sortedVerifiedAssertion[i].userDisplayName);
$clone.find('.created').text((moment(sortedVerifiedAssertion[i].created, "YYYY-MM-DDTHH:mm:ssZ").format('YYYY-MM-DD HH:mm:ss')));
Expand Down
77 changes: 77 additions & 0 deletions grails-app/assets/stylesheets/search.css
Original file line number Diff line number Diff line change
Expand Up @@ -1097,3 +1097,80 @@ a.leaflet-control-zoom-fullscreen + a.leaflet-control-zoom-fullscreen {
font-style: normal;
font-weight: bold;
}

#dq-collapse-caret {
color: black;
}

#DQProfileDetails .filter-description {
word-break: break-word;
}

#DQProfileDetails .filter-value {
word-break: keep-all;
}

#DQProfileDetails .filter-value span{
white-space: nowrap;
}

#DQManageFilters .expand {
vertical-align: middle;
margin: 0;
padding: 0;
text-decoration: none;
font-size: 14px
}

#DQManageFilters .expanded {
vertical-align: middle;
margin: 0;
font-style: italic;
}

.valign-middle {
vertical-align: middle;
}

.DQPrefSettingsLink {
float: right;
}

.DQPrefSettingsLink span {
color: black;
}

#excluded, #filter-value {
margin-bottom: 0
}

#view-excluded, #expandfilters {
text-decoration: none;
padding: 0;
}

#DQDetailsTable {
margin-top: 20px;
}

#fqdetail-heading-description {
font-style: italic;
}

#download-button-area {
padding-right: 5px;
}

a.copyLink {
border-color: black;
color: black
}

#copy-al4r {
border-color: black;
}

#content .tooltip-inner {
word-break: break-word;
white-space: normal;
}
4 changes: 3 additions & 1 deletion grails-app/assets/stylesheets/searchMap.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
#leafletMap, input {
margin: 0px;
}
.tooltip-inner {
#content .leaflet-draw-section .tooltip-inner {
max-width: 350px;
/*min-width: 100px;*/
white-space: nowrap;
word-break: normal;
/* If max-width does not work, try using width instead */
/*width: 150px;*/
}
Expand Down
Loading

0 comments on commit 71b6014

Please sign in to comment.