[ACA-2621] Shared link - when dialog is closed focus is not returned to trigger (#1255)

* use custom component action

* adjust component. to render icon and menu action

* pass action data

* update selection after dialog closes

* update mocks
This commit is contained in:
Cilibiu Bogdan
2019-11-22 14:16:23 +02:00
committed by Adina Parpalita
parent 236d80106d
commit f526db9657
5 changed files with 58 additions and 48 deletions

View File

@@ -1,14 +1,30 @@
<ng-container *ngIf="selection$ | async as selection">
<button
mat-menu-item
data-automation-id="share-action-button"
(click)="editSharedNode(selection)"
>
<mat-icon>link</mat-icon>
<ng-container *ngIf="isShared(selection); else not_shared">
<span>{{ 'APP.ACTIONS.SHARE_EDIT' | translate }}</span>
</ng-container>
</button>
<ng-container *ngIf="!data.iconButton">
<button
mat-menu-item
data-automation-id="share-action-button"
(click)="editSharedNode(selection)"
>
<mat-icon>link</mat-icon>
<ng-container *ngIf="isShared(selection); else not_shared">
<span>{{ 'APP.ACTIONS.SHARE_EDIT' | translate }}</span>
</ng-container>
</button>
</ng-container>
<ng-container *ngIf="data.iconButton">
<button
mat-icon-button
data-automation-id="share-action-button"
(click)="editSharedNode(selection)"
[attr.title]="
(isShared(selection) ? 'APP.ACTIONS.SHARE_EDIT' : 'APP.ACTIONS.SHARE')
| translate
"
>
<mat-icon>link</mat-icon>
</button>
</ng-container>
</ng-container>
<ng-template #not_shared>