Skip to content

Commit

Permalink
Indicate unmatched species with ? icon #248
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisala committed May 15, 2024
1 parent 6cb0e69 commit 93834b5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions grails-app/assets/javascripts/speciesModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,9 @@ var SpeciesViewModel = function(data, options, context) {
self.transients.bieUrl = ko.observable();
self.transients.speciesInformation = ko.observable();
self.transients.speciesTitle = ko.observable();
self.transients.matched = ko.computed(function() {
return self.guid() && self.guid() != "A_GUID" && self.listId != "unmatched";
});
self.transients.editing = ko.observable(false);
self.transients.textFieldValue = ko.observable();
self.transients.bioProfileUrl = ko.computed(function (){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -371,8 +371,8 @@ public class EditModelWidgetRenderer implements ModelWidgetRenderer {
context.writer << """<div${context.attributes.toString()}>
<div data-bind="with:${context.source}" class="input-group"">
<select class="form-control form-control-sm" data-bind="speciesSelect2:\$data" ${context.validationAttr}></select>
<div class="input-group-append">
<span class="input-group-text" data-bind="visible:name(), popover: {title: transients.speciesTitle, content: transients.speciesInformation}"><i class="fa fa-info-circle"></i></span>
<div class="input-group-append"">
<span class="input-group-text" data-bind="visible:name(), popover: {title: transients.speciesTitle, content: transients.speciesInformation}, css:{'bg-warning':!transients.matched()}"><i class="fa" data-bind="css:{'fa-info-circle':transients.matched(), 'fa-question-circle':!transients.matched()}"></i></span>
</div>
</div></div>"""
}
Expand Down

0 comments on commit 93834b5

Please sign in to comment.