RED-8679: added specific ids for annotation wrappers and actions.

This commit is contained in:
Nicoleta Panaghiu 2024-03-14 15:55:02 +02:00
parent 5923084bb5
commit b17ebee4fa
2 changed files with 15 additions and 0 deletions

View File

@ -11,6 +11,7 @@
[tooltipPosition]="tooltipPosition"
[tooltip]="resized ? ('annotation-actions.resize-accept.label' | translate) : ''"
[type]="buttonType"
[buttonId]="annotations.length === 1 ? 'annotation-' + annotations[0].id + '-accept_resize' : 'annotations-accept_resize'"
icon="iqser:check"
></iqser-circle-button>
@ -19,6 +20,7 @@
[tooltipPosition]="tooltipPosition"
[tooltip]="'annotation-actions.resize-cancel.label' | translate"
[type]="buttonType"
[buttonId]="annotations.length === 1 ? 'annotation-' + annotations[0].id + '-cancel_resize' : 'annotations-cancel_resize'"
icon="iqser:close"
></iqser-circle-button>
</ng-container>
@ -32,6 +34,7 @@
[tooltipPosition]="tooltipPosition"
[tooltip]="'annotation-actions.resize.label' | translate"
[type]="buttonType"
[buttonId]="annotations.length === 1 ? 'annotation-' + annotations[0].id + '-resize' : 'annotations-resize'"
icon="iqser:resize"
></iqser-circle-button>
@ -42,6 +45,7 @@
[tooltipPosition]="tooltipPosition"
[tooltip]="'annotation-actions.edit-redaction.label' | translate"
[type]="buttonType"
[buttonId]="annotations.length === 1 ? 'annotation-' + annotations[0].id + '-edit' : 'annotations-edit'"
icon="iqser:edit"
></iqser-circle-button>
@ -52,6 +56,11 @@
[tooltipPosition]="tooltipPosition"
[tooltip]="'annotation-actions.accept-recommendation.label' | translate"
[type]="buttonType"
[buttonId]="
annotations.length === 1
? 'annotation-' + annotations[0].id + '-accept_recommendation'
: 'annotations-accept_recommendation'
"
icon="iqser:check"
></iqser-circle-button>
@ -98,6 +107,7 @@
[tooltipPosition]="tooltipPosition"
[tooltip]="'annotation-actions.force-redaction.label' | translate"
[type]="buttonType"
[buttonId]="annotations.length === 1 ? 'annotation-' + annotations[0].id + '-force_redaction' : 'annotations-force_redaction'"
icon="iqser:thumb-up"
></iqser-circle-button>
@ -108,6 +118,7 @@
[tooltipPosition]="tooltipPosition"
[tooltip]="'annotation-actions.force-hint.label' | translate"
[type]="buttonType"
[buttonId]="annotations.length === 1 ? 'annotation-' + annotations[0].id + '-force_hint' : 'annotations-force_hint'"
icon="iqser:thumb-up"
></iqser-circle-button>
@ -118,6 +129,7 @@
[tooltipPosition]="tooltipPosition"
[tooltip]="'annotation-actions.hide' | translate"
[type]="buttonType"
[buttonId]="annotations.length === 1 ? 'annotation-' + annotations[0].id + '-hide' : 'annotations-hide'"
icon="red:visibility-off"
></iqser-circle-button>
@ -127,6 +139,7 @@
[tooltipPosition]="tooltipPosition"
[tooltip]="'annotation-actions.show' | translate"
[type]="buttonType"
[buttonId]="annotations.length === 1 ? 'annotation-' + annotations[0].id + '-show' : 'annotations-show'"
icon="red:visibility"
></iqser-circle-button>
@ -137,6 +150,7 @@
[tooltipPosition]="tooltipPosition"
[tooltip]="'annotation-actions.remove-annotation.remove-redaction' | translate"
[type]="buttonType"
[buttonId]="annotations.length === 1 ? 'annotation-' + annotations[0].id + '-remove' : 'annotations-remove'"
icon="iqser:trash"
></iqser-circle-button>
</ng-container>

View File

@ -6,6 +6,7 @@
<redaction-annotation-wrapper
(click)="annotationClicked(annotation.item, $event)"
[annotation]="annotation"
[id]="'annotation-' + annotation.item.id"
></redaction-annotation-wrapper>
</ng-container>