Skip to content

Commit

Permalink
avoid jsf:render in button
Browse files Browse the repository at this point in the history
  • Loading branch information
qqmyers committed Oct 18, 2018
1 parent fc8b745 commit ed5999b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions src/main/webapp/file.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -330,12 +330,11 @@
<h:outputText id="fileTypeOutputTabular" value="#{bundle['file.type.tabularData']}" rendered="#{FilePage.fileMetadata.dataFile.tabularData}"/>
<h:outputText id="fileSize" value=" - #{FilePage.fileMetadata.dataFile.friendlySize}" />
<h:outputText id="fileCreatePublishDate" value=" - #{bundle['file.lastupdated.label']}: #{FilePage.fileMetadata.fileDateToDisplay}" rendered="#{!(empty FilePage.fileMetadata.id)}"/>
<div class="checksum-block" jsf:rendered="#{!FilePage.file.tabularData}">
<div class="checksum-block" jsf:rendered="#{!FilePage.file.tabularData and !(empty FilePage.file.checksumValue)}">
<button class="btn btn-secondary checksum" type="button"
data-clipboard-action="copy"
data-clipboard-text="#{FilePage.file.checksumValue}"
title="#{bundle['file.checksum.copy']} #{FilePage.file.checksumValue}"
jsf:rendered="#{!(empty FilePage.file.checksumValue)}">
title="#{bundle['file.checksum.copy']} #{FilePage.file.checksumValue}">
#{FilePage.file.tabularData ? FilePage.file.originalChecksumType : FilePage.file.checksumType}
<span class="glyphicon glyphicon-copy"></span>
</button>
Expand Down
4 changes: 2 additions & 2 deletions src/main/webapp/filesFragment.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,8 @@
<f:param value="#{DatasetPage.getGuestbookResponseCount(fileMetadata)}"/>
</h:outputFormat>

<div class="checksum-block" jsf:rendered="#{!fileMetadata.dataFile.tabularData}">
<button class="btn btn-secondary checksum" type="button" data-clipboard-action="copy" data-clipboard-text="#{fileMetadata.dataFile.checksumValue}" title="#{bundle['file.checksum.copy']} #{fileMetadata.dataFile.checksumValue}" jsf:rendered="#{!(empty fileMetadata.dataFile.checksumValue) and ((DatasetPage.editMode != 'FILE' and DatasetPage.editMode != 'CREATE') or !DatasetPage.isDuplicate(fileMetadata))}">
<div class="checksum-block" jsf:rendered="#{!fileMetadata.dataFile.tabularData and !(empty fileMetadata.dataFile.checksumValue) and ((DatasetPage.editMode != 'FILE' and DatasetPage.editMode != 'CREATE') or !DatasetPage.isDuplicate(fileMetadata))}">
<button class="btn checksum" type="button" data-clipboard-action="copy" data-clipboard-text="#{fileMetadata.dataFile.checksumValue}" title="#{bundle['file.checksum.copy']} #{fileMetadata.dataFile.checksumValue}">
#{fileMetadata.dataFile.checksumType}
<span class="glyphicon glyphicon-copy"></span>
</button>
Expand Down

0 comments on commit ed5999b

Please sign in to comment.