Files
alfresco-content-app/src/app/components/context-menu/context-menu.component.html
Cilibiu Bogdan 091e0d3e3f [ACA-1696] contextmenu (#587)
* enbale contextmenu by default

* attach event only when backdrop is set

* outside event for contextmenu

* apply outside event directive

* workaround fro contextmenu event row selection

* remove Output parameter

* update dockerfile

* update docker compose file
2018-08-29 13:44:47 +01:00

49 lines
1.8 KiB
HTML

<div mat-menu class="mat-menu-panel"
@panelAnimation
acaContextMenuOutsideEvent
(clickOutside)="onClickOutsideEvent()">
<div class="mat-menu-content">
<ng-container *ngFor="let entry of actions" [ngSwitch]="entry.type">
<ng-container *ngSwitchCase="'default'">
<button mat-menu-item
[id]="entry.id"
acaContextMenuItem
(click)="runAction(entry.actions.click)">
<mat-icon color="primary">{{ entry.icon }}</mat-icon>
<span>{{ entry.title | translate }}</span>
</button>
</ng-container>
<ng-container *ngSwitchCase="'button'">
<button mat-menu-item
[id]="entry.id"
acaContextMenuItem
(click)="runAction(entry.actions.click)">
<mat-icon color="primary">{{ entry.icon }}</mat-icon>
<span>{{ entry.title | translate }}</span>
</button>
</ng-container>
<span *ngSwitchCase="'separator'"
class="aca-context-menu__separator"
[id]="entry.id">
</span>
<ng-container *ngSwitchCase="'menu'">
<button mat-menu-item
acaContextMenuItem
[id]="entry.id"
class="aca-context-menu__more-actions">
<mat-icon color="primary">{{ entry.icon }}</mat-icon>
<span>{{ entry.title | translate }}</span>
</button>
</ng-container>
<ng-container *ngSwitchCase="'custom'">
<app-custom-component [id]="entry.component"></app-custom-component>
</ng-container>
</ng-container>
</div>
</div>