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