diff --git a/demo-shell-ng2/app/components/activiti/activiti-demo.component.html b/demo-shell-ng2/app/components/activiti/activiti-demo.component.html index 9162e56a70..943a2cacdc 100644 --- a/demo-shell-ng2/app/components/activiti/activiti-demo.component.html +++ b/demo-shell-ng2/app/components/activiti/activiti-demo.component.html @@ -72,10 +72,10 @@
Attachments
- - - - + + diff --git a/ng2-components/ng2-activiti-tasklist/src/components/adf-task-attachment-list.component.html b/ng2-components/ng2-activiti-tasklist/src/components/adf-task-attachment-list.component.html index 74208ad2f7..8eaadbb56f 100644 --- a/ng2-components/ng2-activiti-tasklist/src/components/adf-task-attachment-list.component.html +++ b/ng2-components/ng2-activiti-tasklist/src/components/adf-task-attachment-list.component.html @@ -5,7 +5,7 @@ (showRowActionsMenu)="onShowRowActionsMenu($event)" (executeRowAction)="onExecuteRowAction($event)"> - + diff --git a/ng2-components/ng2-alfresco-datatable/src/components/datatable/datatable.component.html b/ng2-components/ng2-alfresco-datatable/src/components/datatable/datatable.component.html index b3894ed078..1343f025bc 100644 --- a/ng2-components/ng2-alfresco-datatable/src/components/datatable/datatable.component.html +++ b/ng2-components/ng2-alfresco-datatable/src/components/datatable/datatable.component.html @@ -65,8 +65,14 @@ {{asIconValue(row, col)}} {{iconAltTextKey(data.getValue(row, col))|translate}} + +
+ {{ iconAltTextKey(data.getValue(row, col)) | translate }}
diff --git a/ng2-components/ng2-alfresco-datatable/src/data/object-datatable-adapter.ts b/ng2-components/ng2-alfresco-datatable/src/data/object-datatable-adapter.ts index cab70d8f9c..0f8a513652 100644 --- a/ng2-components/ng2-alfresco-datatable/src/data/object-datatable-adapter.ts +++ b/ng2-components/ng2-alfresco-datatable/src/data/object-datatable-adapter.ts @@ -25,6 +25,33 @@ export class ObjectDataTableAdapter implements DataTableAdapter { private _sorting: DataSorting; private _rows: DataRow[]; private _columns: DataColumn[]; + private icons: string[] = [ + 'empty_doc_lib.svg', + 'ft_ic_archive.svg', + 'ft_ic_audio.svg', + 'ft_ic_database.svg', + 'ft_ic_document.svg', + 'ft_ic_ebook.svg', + 'ft_ic_folder.svg', + 'ft_ic_folder_empty.svg', + 'ft_ic_form.svg', + 'ft_ic_google_docs.svg', + 'ft_ic_google_drawings.svg', + 'ft_ic_google_forms.svg', + 'ft_ic_google_sheets.svg', + 'ft_ic_google_slides.svg', + 'ft_ic_miscellaneous.svg', + 'ft_ic_ms_excel.svg', + 'ft_ic_ms_powerpoint.svg', + 'ft_ic_ms_word.svg', + 'ft_ic_pdf.svg', + 'ft_ic_presentation.svg', + 'ft_ic_raster_image.svg', + 'ft_ic_spreadsheet.svg', + 'ft_ic_vector_image.svg', + 'ft_ic_video.svg', + 'ft_ic_website.svg' + ]; selectedRow: DataRow; @@ -111,16 +138,12 @@ export class ObjectDataTableAdapter implements DataTableAdapter { } } - if (col.type === 'image') { - - if (col.key === 'icon') { - - let icon = this.getImagePath(row.getValue('icon')); - if (icon) { - return icon; - } - return this.getImagePath('ft_ic_miscellaneous.svg'); + if (col.type === 'icon') { + const iconName = row.getValue(col.key); + if (this.icons.indexOf(iconName) > -1) { + return this.getImagePath(iconName); } + return this.getImagePath('ft_ic_miscellaneous.svg'); } return value;