Skip to content

Commit

Permalink
Add tooltips to buttons and fix Checkstyle violations
Browse files Browse the repository at this point in the history
  • Loading branch information
solth committed Oct 22, 2024
1 parent cb039a4 commit fd9c882
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,9 @@ public boolean isMetadataGroup() {
public void updateComparison() {
switch (selection) {
case KEEP:
if (canAdd())
if (canAdd()) {
selection = Reimport.ADD;
}
else if (canReplace()) {
selection = Reimport.REPLACE;
}
Expand All @@ -161,8 +162,9 @@ else if (canReplace()) {
case REPLACE:
if (canKeep()) {
selection = Reimport.KEEP;
} else if (canAdd())
} else if (canAdd()) {
selection = Reimport.ADD;
}
break;
default:
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,16 @@
</p:dataList>
</p:column>
<p:column id="selectionColumn"
width="40"
headerText="#{msgs['dataEditor.updateMetadata.updateMode']}">
width="40">
<f:facet name="header">
<p:commandButton id="selectColumnHeaderButton"
type="button"
icon="fa fa-exchange fa-lg" />
icon="fa fa-exchange fa-lg" >
<p:tooltip for="selectColumnHeaderButton"
position="left">
#{msgs['dataEditor.updateMetadata.updateMode']}
</p:tooltip>
</p:commandButton>
</f:facet>
<p:outputPanel>
<!--@elvariable id="rowIdx" type="java.lang.Integer"-->
Expand All @@ -106,23 +110,38 @@
actionListener="#{comparison.updateComparison()}"
update="metadataUpdateTable:@row(#{rowIdx})"
rendered="#{comparison.selection eq reimportEnum.KEEP}"
icon="fa fa-long-arrow-left fa-lg"/>
icon="fa fa-long-arrow-left fa-lg">
<p:tooltip for="selectOldValuesButton"
position="bottom">
#{msgs['dataEditor.updateMetadata.modeKeep']}
</p:tooltip>
</p:commandButton>
<p:commandButton id="selectBothValuesButton"
partialSubmit="true"
process="@this"
title="#{msgs['dataEditor.updateMetadata.modeExtend']}"
actionListener="#{comparison.updateComparison()}"
update="metadataUpdateTable:@row(#{rowIdx})"
rendered="#{comparison.selection eq reimportEnum.ADD}"
icon="fa fa-arrows-h fa-lg"/>
icon="fa fa-arrows-h fa-lg">
<p:tooltip for="selectBothValuesButton"
position="bottom">
#{msgs['dataEditor.updateMetadata.modeExtend']}
</p:tooltip>
</p:commandButton>
<p:commandButton id="selectNewValuesButton"
partialSubmit="true"
process="@this"
title="#{msgs['dataEditor.updateMetadata.modeReplace']}"
actionListener="#{comparison.updateComparison()}"
update="metadataUpdateTable:@row(#{rowIdx})"
rendered="#{comparison.selection eq reimportEnum.REPLACE}"
icon="fa fa-long-arrow-right fa-lg"/>
icon="fa fa-long-arrow-right fa-lg">
<p:tooltip for="selectNewValuesButton"
position="bottom">
#{msgs['dataEditor.updateMetadata.modeReplace']}
</p:tooltip>
</p:commandButton>
</p:outputPanel>
</p:column>
<p:column id="newValueColumn"
Expand Down

0 comments on commit fd9c882

Please sign in to comment.