Skip to content

Commit

Permalink
Hide the 'no images' message by default
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Collins committed Jun 12, 2023
1 parent 4eb4ee4 commit 9c8681b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion grails-app/assets/javascripts/species.show.js
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,6 @@ function loadGalleryType(category, start) {
var br = "<br>";
var $categoryTmpl = $('#cat_' + category);
$categoryTmpl.removeClass('hide');
$('#cat_nonavailable').addClass('hide');

$.each(data.occurrences, function(i, el) {
// clone template div & populate with metadata
Expand Down Expand Up @@ -748,6 +747,8 @@ function loadGalleryType(category, start) {
+ (start + pageSize) + ');">Load more images <img src="' + spinnerLink + '" class="hide"/></button></div>';
$categoryTmpl.find('.taxon-gallery').append(btn);
}
} else {
$('#cat_nonavailable').addClass('show');
}
}).fail(function(jqxhr, textStatus, error) {
alert('Error loading gallery: ' + textStatus + ', ' + error);
Expand Down
2 changes: 1 addition & 1 deletion grails-app/views/species/_gallery.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

</g:each>

<div id="cat_nonavailable">
<div id="cat_nonavailable" class="hide">
<h2><g:message code="gallery.title"/></h2>


Expand Down

0 comments on commit 9c8681b

Please sign in to comment.