Skip to content

Commit

Permalink
Hide thumbnail image in metadata page when the image can't be loaded …
Browse files Browse the repository at this point in the history
…due to an error.
  • Loading branch information
josegar74 committed Sep 6, 2023
1 parent 7fb4cea commit e0aed4d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@
<img data-gn-img-modal="md"
class="gn-img-thumbnail"
alt="{$schemaStrings/overview}"
src="{.}"/>
src="{.}"
onerror="this.onerror=null; $('.gn-md-side-overview').hide()"/>
</xsl:for-each>
</section>
</xsl:template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,8 @@
<img data-gn-img-modal="md"
class="gn-img-thumbnail center-block"
alt="{$schemaStrings/overview}"
src="{mcc:fileName/*}"/>
src="{mcc:fileName/*}"
onerror="this.onerror=null; $('.gn-md-side-overview').hide()"/>

<xsl:for-each select="mcc:fileDescription">
<div class="gn-img-thumbnail-caption">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,8 @@
<img data-gn-img-modal="md"
class="gn-img-thumbnail"
alt="{$schemaStrings/overview}"
src="{gmd:fileName/*}"/>
src="{gmd:fileName/*}"
onerror="this.onerror=null; $('.gn-md-side-overview').hide()"/>

<xsl:for-each select="gmd:fileDescription">
<div class="gn-img-thumbnail-caption">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
alt="{{'overview' | translate}}"
title="{{img.name}}"
data-ng-src="{{img.url}}"
onerror="this.onerror=null; this.style.display='none';"
/>
<p class="text-center" data-ng-if="img.name != ''">{{img.name}}</p>
</li>
Expand Down

0 comments on commit e0aed4d

Please sign in to comment.