|
|
|
@ -59,36 +59,49 @@ |
|
|
|
</div> |
|
|
|
</mat-toolbar> |
|
|
|
<div fxFlex class="table-container"> |
|
|
|
<table mat-table [dataSource]="dataSource" |
|
|
|
<table mat-table |
|
|
|
[dataSource]="dataSource" |
|
|
|
matSort [matSortActive]="pageLink.sortOrder.property" [matSortDirection]="pageLink.sortDirection()" matSortDisableClear |
|
|
|
cdkDropList [cdkDropListData]="dataSource" (cdkDropListDropped)="dropAction($event)"> |
|
|
|
cdkDropList cdkDropListOrientation="vertical" |
|
|
|
[cdkDropListData]="dataSource" |
|
|
|
(cdkDropListDropped)="dropAction($event)" |
|
|
|
[cdkDropListDisabled]="dragDisabled" |
|
|
|
class="tb-drop-list"> |
|
|
|
<ng-container matColumnDef="actionSourceId"> |
|
|
|
<mat-header-cell *matHeaderCellDef mat-sort-header style="width: 40px"> {{ 'widget-config.action-source-order' | translate }} </mat-header-cell> |
|
|
|
<mat-header-cell *matHeaderCellDef style="width: 36px"></mat-header-cell> |
|
|
|
<mat-cell *matCellDef="let action"> |
|
|
|
<mat-icon cdkDragHandle>reorder</mat-icon> |
|
|
|
<div cdkDragHandle |
|
|
|
class="tb-drag-handle" |
|
|
|
style="min-width: 36px" |
|
|
|
(mousedown)="dragDisabled = false" |
|
|
|
(mouseup)="dragDisabled = true" |
|
|
|
matTooltip="{{ 'action.drag' | translate }}" |
|
|
|
matTooltipPosition="above"> |
|
|
|
<mat-icon>drag_handle</mat-icon> |
|
|
|
</div> |
|
|
|
</mat-cell> |
|
|
|
</ng-container> |
|
|
|
<ng-container matColumnDef="actionSourceName"> |
|
|
|
<mat-header-cell *matHeaderCellDef mat-sort-header style="width: 20%"> {{ 'widget-config.action-source' | translate }} </mat-header-cell> |
|
|
|
<mat-cell *matCellDef="let action"> |
|
|
|
<mat-cell *matCellDef="let action" style="width: 20%"> |
|
|
|
{{ action.actionSourceName }} |
|
|
|
</mat-cell> |
|
|
|
</ng-container> |
|
|
|
<ng-container matColumnDef="name"> |
|
|
|
<mat-header-cell *matHeaderCellDef mat-sort-header style="width: 30%"> {{ 'widget-config.action-name' | translate }} </mat-header-cell> |
|
|
|
<mat-cell *matCellDef="let action"> |
|
|
|
<mat-cell *matCellDef="let action" style="width: 30%"> |
|
|
|
{{ action.name }} |
|
|
|
</mat-cell> |
|
|
|
</ng-container> |
|
|
|
<ng-container matColumnDef="icon"> |
|
|
|
<mat-header-cell *matHeaderCellDef mat-sort-header style="width: 40px"> {{ 'widget-config.action-icon' | translate }} </mat-header-cell> |
|
|
|
<mat-cell *matCellDef="let action"> |
|
|
|
<mat-header-cell *matHeaderCellDef style="width: 40px"> {{ 'widget-config.action-icon' | translate }} </mat-header-cell> |
|
|
|
<mat-cell *matCellDef="let action" style="width: 40px"> |
|
|
|
<mat-icon>{{ action.icon }}</mat-icon> |
|
|
|
</mat-cell> |
|
|
|
</ng-container> |
|
|
|
<ng-container matColumnDef="typeName"> |
|
|
|
<mat-header-cell *matHeaderCellDef mat-sort-header style="width: 50%"> {{ 'widget-config.action-type' | translate }} </mat-header-cell> |
|
|
|
<mat-cell *matCellDef="let action"> |
|
|
|
<mat-cell *matCellDef="let action" style="width: 50%"> |
|
|
|
{{ action.typeName }} |
|
|
|
</mat-cell> |
|
|
|
</ng-container> |
|
|
|
@ -114,8 +127,8 @@ |
|
|
|
</div> |
|
|
|
</mat-cell> |
|
|
|
</ng-container> |
|
|
|
<mat-header-row [ngClass]="{'mat-row-select': true}" *matHeaderRowDef="displayedColumns; sticky: true"></mat-header-row> |
|
|
|
<mat-row [ngClass]="{'mat-row-select': true}" |
|
|
|
<mat-header-row class="mat-row-select" *matHeaderRowDef="displayedColumns; sticky: true"></mat-header-row> |
|
|
|
<mat-row class="mat-row-select tb-draggable" |
|
|
|
*matRowDef="let action; columns: displayedColumns;" |
|
|
|
cdkDrag [cdkDragData]="action"></mat-row> |
|
|
|
</table> |
|
|
|
|