mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
rebased and fixed the wrong directive for matList'
This commit is contained in:
@@ -56,35 +56,19 @@
|
||||
<div data-automation-id="adf-attach-widget-readonly-list">
|
||||
<mat-list *ngIf="hasFile">
|
||||
<mat-list-item class="adf-attach-files-row" *ngFor="let file of field.value">
|
||||
<img
|
||||
mat-list-icon
|
||||
class="adf-attach-widget__icon"
|
||||
[id]="'file-' + file.id + '-icon'"
|
||||
[src]="file.content ? getIcon(file.content.mimeType) : getIcon(file.mimeType)"
|
||||
[alt]="mimeTypeIcon"
|
||||
(click)="onAttachFileClicked(file)"
|
||||
(keyup.enter)="onAttachFileClicked(file)"
|
||||
[attr.aria-label]="file.name"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
/>
|
||||
<span
|
||||
matLine
|
||||
id="{{ 'file-' + file.id }}"
|
||||
(click)="onAttachFileClicked(file)"
|
||||
[matTooltip]="file.name"
|
||||
(keyup.enter)="onAttachFileClicked(file)"
|
||||
tabindex="0"
|
||||
role="button"
|
||||
class="adf-file"
|
||||
>{{ file.name }}</span
|
||||
>
|
||||
<button
|
||||
id="{{ 'file-' + file.id + '-option-menu' }}"
|
||||
mat-icon-button
|
||||
[matMenuTriggerFor]="fileActionMenu"
|
||||
[attr.aria-label]="'ADF_PROCESS_LIST.DETAILS.BUTTON.FILE_OPTION_MENU' | translate"
|
||||
>
|
||||
<img matListItemLine class="adf-attach-widget__icon"
|
||||
[id]="'file-'+file.id+'-icon'"
|
||||
[src]="file.content ? getIcon(file.content.mimeType) : getIcon(file.mimeType)"
|
||||
[alt]="mimeTypeIcon"
|
||||
(click)="onAttachFileClicked(file)"
|
||||
(keyup.enter)="onAttachFileClicked(file)"
|
||||
role="img"
|
||||
[attr.aria-label]="file.name"
|
||||
tabindex="0"/>
|
||||
<span matLine id="{{'file-'+file.id}}" (click)="onAttachFileClicked(file)" [matTooltip]="file.name" (keyup.enter)="onAttachFileClicked(file)"
|
||||
tabindex="0" class="adf-file">{{file.name}}</span>
|
||||
<button id="{{'file-'+file.id+'-option-menu'}}" mat-icon-button [matMenuTriggerFor]="fileActionMenu"
|
||||
[attr.aria-label]="'ADF_PROCESS_LIST.DETAILS.BUTTON.FILE_OPTION_MENU' | translate">
|
||||
<mat-icon>more_vert</mat-icon>
|
||||
</button>
|
||||
<mat-menu #fileActionMenu="matMenu" xPosition="before">
|
||||
|
@@ -4,34 +4,18 @@
|
||||
<div>
|
||||
<mat-list *ngIf="hasFile">
|
||||
<mat-list-item class="adf-upload-files-row" *ngFor="let file of field.value">
|
||||
<img
|
||||
mat-list-icon
|
||||
class="adf-upload-widget__icon"
|
||||
[id]="'file-'+file.id+'-icon'"
|
||||
[src]="getIcon(file.mimeType)"
|
||||
[alt]="mimeTypeIcon"
|
||||
(click)="fileClicked(file)"
|
||||
(keyup.enter)="fileClicked(file)"
|
||||
tabindex="0"
|
||||
role="button"
|
||||
/>
|
||||
<span
|
||||
matLine
|
||||
id="{{'file-'+file.id}}"
|
||||
(click)="fileClicked(file)"
|
||||
(keyup.enter)="fileClicked(file)"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
class="adf-file"
|
||||
>{{file.name}}</span
|
||||
>
|
||||
<button
|
||||
*ngIf="!field.readOnly"
|
||||
mat-icon-button
|
||||
[id]="'file-'+file.id+'-remove'"
|
||||
(click)="removeFile(file);"
|
||||
(keyup.enter)="removeFile(file);"
|
||||
>
|
||||
<img matListItemLine class="adf-upload-widget__icon"
|
||||
[id]="'file-'+file.id+'-icon'"
|
||||
[src]="getIcon(file.mimeType)"
|
||||
[alt]="mimeTypeIcon"
|
||||
(click)="fileClicked(file)"
|
||||
(keyup.enter)="fileClicked(file)"
|
||||
role="button"
|
||||
tabindex="0"/>
|
||||
<span matLine id="{{'file-'+file.id}}" (click)="fileClicked(file)" (keyup.enter)="fileClicked(file)"
|
||||
role="button" tabindex="0" class="adf-file">{{file.name}}</span>
|
||||
<button *ngIf="!field.readOnly" mat-icon-button [id]="'file-'+file.id+'-remove'"
|
||||
(click)="removeFile(file);" (keyup.enter)="removeFile(file);">
|
||||
<mat-icon class="mat-24">highlight_off</mat-icon>
|
||||
</button>
|
||||
</mat-list-item>
|
||||
|
@@ -14,7 +14,7 @@
|
||||
<div class="menu-container" *ngIf="activeTasks?.length > 0" data-automation-id="active-tasks">
|
||||
<mat-list>
|
||||
<mat-list-item class="process-tasks__task-item" *ngFor="let task of activeTasks" (click)="clickTask(task)">
|
||||
<mat-icon mat-list-icon>assignment</mat-icon>
|
||||
<mat-icon matListItemLine>assignment</mat-icon>
|
||||
<h3 matLine>{{task.name || 'Nameless task'}}</h3>
|
||||
<span matLine>
|
||||
{{ 'ADF_PROCESS_LIST.DETAILS.LABELS.TASK_SUBTITLE' | translate:{user: getUserFullName(task.assignee), created: getFormatDate(task.created, 'mediumDate') } }}
|
||||
@@ -36,7 +36,7 @@
|
||||
<div class="menu-container" data-automation-id="start-form">
|
||||
<mat-list>
|
||||
<mat-list-item class="process-tasks__task-item" (click)="clickStartTask()">
|
||||
<mat-icon mat-list-icon>assignment</mat-icon>
|
||||
<mat-icon matListItemLine>assignment</mat-icon>
|
||||
<h3 matLine>{{ 'ADF_PROCESS_LIST.DETAILS.LABELS.START_FORM'|translate }}</h3>
|
||||
<span matLine>
|
||||
{{ 'ADF_PROCESS_LIST.DETAILS.LABELS.TASK_SUBTITLE' | translate:{user:getUserFullName(processInstanceDetails.startedBy), created: getFormatDate(processInstanceDetails.started, 'mediumDate') } }}
|
||||
@@ -56,7 +56,7 @@
|
||||
<div class="menu-container" *ngIf="completedTasks?.length > 0" data-automation-id="completed-tasks">
|
||||
<mat-list>
|
||||
<mat-list-item class="process-tasks__task-item" *ngFor="let task of completedTasks" (click)="clickTask(task)">
|
||||
<mat-icon mat-list-icon>assignment</mat-icon>
|
||||
<mat-icon matListItemLine>assignment</mat-icon>
|
||||
<h3 matLine>{{task.name || 'Nameless task'}}</h3>
|
||||
<span matLine>
|
||||
{{ 'ADF_PROCESS_LIST.DETAILS.LABELS.TASK_SUBTITLE' | translate:{user:getUserFullName(task.assignee), created: getFormatDate(task.created, 'mediumDate') } }}
|
||||
|
Reference in New Issue
Block a user