[ADF-1547] tooltip fixes and enhancements (#2333)

* tooltip enhancements

* fix unit tests
This commit is contained in:
Denys Vuika
2017-09-13 17:31:00 +01:00
committed by Eugenio Romano
parent eafe884a9d
commit 1fd23cfd40
9 changed files with 127 additions and 17 deletions

View File

@@ -22,7 +22,7 @@
(keyup.enter)="onColumnHeaderClick(col)"
role="button"
tabindex="0"
title="{{ col.title }}">
title="{{ col.title | translate }}">
<span *ngIf="col.srTitle" class="sr-only">{{ col.srTitle | translate }}</span>
<span *ngIf="col.title">{{ col.title | translate}}</span>
</th>
@@ -88,24 +88,40 @@
(error)="onImageLoadingError($event)">
</div>
<div *ngSwitchCase="'date'" class="cell-value"
[mdTooltip]="getCellTooltip(row, col)"
[attr.data-automation-id]="'date_' + data.getValue(row, col)">
<adf-datatable-cell [data]="data" [column]="col" [row]="row"></adf-datatable-cell>
<adf-date-cell
[data]="data"
[column]="col"
[row]="row"
[tooltip]="getCellTooltip(row, col)">
</adf-date-cell>
</div>
<div *ngSwitchCase="'location'" class="cell-value"
[mdTooltip]="getCellTooltip(row, col)"
[attr.data-automation-id]="'location' + data.getValue(row, col)">
<adf-location-cell [data]="data" [column]="col" [row]="row"></adf-location-cell>
<adf-location-cell
[data]="data"
[column]="col"
[row]="row"
[tooltip]="getCellTooltip(row, col)">
</adf-location-cell>
</div>
<div *ngSwitchCase="'fileSize'" class="cell-value"
[mdTooltip]="getCellTooltip(row, col)"
[attr.data-automation-id]="'fileSize_' + data.getValue(row, col)">
<adf-datatable-cell [value]="data.getValue(row, col) | adfFileSize"></adf-datatable-cell>
<adf-filesize-cell
[data]="data"
[column]="col"
[row]="row"
[tooltip]="getCellTooltip(row, col)">
</adf-filesize-cell>
</div>
<div *ngSwitchCase="'text'" class="cell-value"
[mdTooltip]="getCellTooltip(row, col)"
[attr.data-automation-id]="'text_' + data.getValue(row, col)">
<adf-datatable-cell [data]="data" [column]="col" [row]="row"></adf-datatable-cell>
<adf-datatable-cell
[data]="data"
[column]="col"
[row]="row"
[tooltip]="getCellTooltip(row, col)">
</adf-datatable-cell>
</div>
<span *ngSwitchDefault class="cell-value">
<!-- empty cell for unknown column type -->