[ADF-1649] [Document List] IE11 select icon is not aligned (#2594)

* [Document List] IE11 select icon is not aligned
[Document List] Login is not aligned
Register Alfresco file type icons within the mat-icon
remove old material-icons pice of code

* fix lint 180 in thumbnailservice

* remove unnecessary duplicate code

* fix thumbnail test
This commit is contained in:
Eugenio Romano
2017-11-02 16:17:35 +00:00
committed by GitHub
parent 5ca66bb75f
commit 861d44f021
21 changed files with 168 additions and 140 deletions

View File

@@ -75,18 +75,20 @@
<div *ngIf="!col.template" class="cell-container">
<ng-container [ngSwitch]="col.type">
<div *ngSwitchCase="'image'" class="cell-value">
<i *ngIf="isIconValue(row, col)" class="material-icons">{{ asIconValue(row, col) }}</i>
<img *ngIf="!isIconValue(row, col)"
<mat-icon *ngIf="isIconValue(row, col)">{{ asIconValue(row, col) }}</mat-icon>
<mat-icon *ngIf="!isIconValue(row, col) && row.isSelected" svgIcon="selected" >
</mat-icon>
<img *ngIf="!isIconValue(row, col) && !row.isSelected"
alt="{{ iconAltTextKey(data.getValue(row, col)) | translate }}"
src="{{ data.getValue(row, col) }}"
(error)="onImageLoadingError($event)">
</div>
<div *ngSwitchCase="'icon'" class="cell-value">
<img alt="{{ iconAltTextKey(data.getValue(row, col)) | translate }}"
src="{{ data.getValue(row, col) }}"
(error)="onImageLoadingError($event)">
<div *ngSwitchCase="'icon'" class="cell-value">
<span class="sr-only">{{ iconAltTextKey(data.getValue(row, col)) | translate }}</span>
<mat-icon>{{ data.getValue(row, col) }}</mat-icon>
</div>
<div *ngSwitchCase="'date'" class="cell-value"
<div *ngSwitchCase="'date'" class="cell-value"
[attr.data-automation-id]="'date_' + data.getValue(row, col)">
<adf-date-cell
[data]="data"

View File

@@ -152,6 +152,7 @@
.adf-data-table-cell {
text-align: left;
height: 100%;
&--text {
text-align: left;
@@ -166,11 +167,15 @@
}
&--image {
.cell-value {
height: 24px;
}
text-align: left;
img {
width: 24px;
height: 24px;
height: 100%;
}
}
}
@@ -199,7 +204,7 @@
.ellipsis-cell {
.cell-container {
height: 1em;
height: 100%;
}
.cell-container > * {
@@ -215,7 +220,7 @@
/* visible content */
.cell-value {
display: block;
position: absolute;
position: relative;
max-width: calc(100% - 2em);
white-space: nowrap;
overflow: hidden;

View File

@@ -17,7 +17,7 @@
import {
AfterContentInit, Component, ContentChild, DoCheck, ElementRef, EventEmitter, Input,
IterableDiffers, OnChanges, Output, SimpleChange, SimpleChanges, TemplateRef
IterableDiffers, OnChanges, Output, SimpleChange, SimpleChanges, TemplateRef, ViewEncapsulation
} from '@angular/core';
import { MatCheckboxChange } from '@angular/material';
import { DataColumnListComponent } from 'ng2-alfresco-core';
@@ -35,7 +35,8 @@ import { DataRowActionEvent } from './data-row-action.event';
@Component({
selector: 'adf-datatable',
styleUrls: ['./datatable.component.scss'],
templateUrl: './datatable.component.html'
templateUrl: './datatable.component.html',
encapsulation: ViewEncapsulation.None
})
export class DataTableComponent implements AfterContentInit, OnChanges, DoCheck {
@@ -386,7 +387,7 @@ export class DataTableComponent implements AfterContentInit, OnChanges, DoCheck
}
iconAltTextKey(value: string): string {
return 'ICONS.' + value.substring(value.lastIndexOf('/') + 1).replace(/\.[a-z]+/, '');
return value ? 'ICONS.' + value.substring(value.lastIndexOf('/') + 1).replace(/\.[a-z]+/, '') : '';
}
isColumnSorted(col: DataColumn, direction: string): boolean {

View File

@@ -15,12 +15,13 @@
* limitations under the License.
*/
import { Component, Directive } from '@angular/core';
import { Component, Directive, ViewEncapsulation } from '@angular/core';
@Component({
selector: 'adf-empty-list',
styleUrls: ['./empty-list.component.scss'],
templateUrl: './empty-list.component.html'
templateUrl: './empty-list.component.html',
encapsulation: ViewEncapsulation.None
})
export class EmptyListComponent {}