mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-09-10 14:11:42 +00:00
Adjust table visualization
This commit is contained in:
@@ -17,15 +17,21 @@
|
||||
<div id="adf-attach-widget-readonly-list">
|
||||
<table mat-table [dataSource]="fileData" class="mat-elevation-z8" *ngIf="hasFile">
|
||||
|
||||
<ng-container matColumnDef="name">
|
||||
<th mat-header-cell *matHeaderCellDef> File Name </th>
|
||||
<ng-container matColumnDef="icon">
|
||||
<th mat-header-cell *matHeaderCellDef></th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<mat-icon mat-list-icon class="adf-datatable-selected" *ngIf="selectedNode && element.id === selectedNode.id" (click)="onRowClicked(element)">
|
||||
check_circle
|
||||
</mat-icon>
|
||||
<img mat-list-icon class="adf-attach-widget__icon" *ngIf="!selectedNode || element.id !== selectedNode.id" [id]="'file-'+element?.id+'-icon'" (click)="onRowClicked(element)"
|
||||
[src]="element.content ? getIcon(element.content.mimeType) : getIcon(element['mimeType'])" [alt]="mimeTypeIcon"
|
||||
role="button" tabindex="0" />
|
||||
[src]="element.content ? getIcon(element.content.mimeType) : getIcon(element['mimeType'])" [alt]="mimeTypeIcon"
|
||||
role="button" tabindex="0" />
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="name">
|
||||
<th mat-header-cell *matHeaderCellDef> File Name </th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<span matLine id="{{'file-'+element?.id}}" role="button" tabindex="0" class="adf-file" (click)="onRowClicked(element)">{{element.name}}</span>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
@@ -101,5 +101,6 @@ table {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.mat-line {
|
||||
.adf-datatable-selected {
|
||||
padding: 6px;
|
||||
}
|
||||
|
@@ -71,7 +71,7 @@ export class AttachFileCloudWidgetComponent extends UploadCloudWidgetComponent i
|
||||
|
||||
contentModelProps = [ 'cm:versionLabel', 'cm:versionType'];
|
||||
fileData = [];
|
||||
displayedColumns = ['name', ...this.contentModelProps, 'action'];
|
||||
displayedColumns = ['icon', 'name', ...this.contentModelProps, 'action'];
|
||||
|
||||
_nodesApi: NodesApi;
|
||||
get nodesApi(): NodesApi {
|
||||
|
Reference in New Issue
Block a user