mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
code fixes
- interpolate ng2 components html content - fix: load images for Login - fix: load images for User Info - fix: load images for Document List - fix: decorator inheritance issue for Form - fix: load images for Search
This commit is contained in:
@@ -56,7 +56,7 @@ export class ShareDataTableAdapter implements DataTableAdapter, PaginationProvid
|
||||
rootPath: string = this.DEFAULT_ROOT_PATH;
|
||||
|
||||
constructor(private documentListService: DocumentListService,
|
||||
private basePath: string,
|
||||
basePath: string,
|
||||
schema: DataColumn[]) {
|
||||
this.dataLoaded = new DataLoadedEventEmitter();
|
||||
this.rows = [];
|
||||
@@ -154,7 +154,7 @@ export class ShareDataTableAdapter implements DataTableAdapter, PaginationProvid
|
||||
let node = (<ShareDataRow> row).node;
|
||||
|
||||
if (node.entry.isFolder) {
|
||||
return `${this.basePath}/img/ft_ic_folder.svg`;
|
||||
return this.getImagePath('ft_ic_folder.svg');
|
||||
}
|
||||
|
||||
if (node.entry.isFile) {
|
||||
@@ -171,13 +171,13 @@ export class ShareDataTableAdapter implements DataTableAdapter, PaginationProvid
|
||||
if (mimeType) {
|
||||
let icon = this.documentListService.getMimeTypeIcon(mimeType);
|
||||
if (icon) {
|
||||
return `${this.basePath}/img/${icon}`;
|
||||
return this.getImagePath(icon);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return `${this.basePath}/img/ft_ic_miscellaneous.svg`;
|
||||
return this.getImagePath('ft_ic_miscellaneous.svg');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -312,6 +312,10 @@ export class ShareDataTableAdapter implements DataTableAdapter, PaginationProvid
|
||||
this.rows = rows;
|
||||
}
|
||||
|
||||
getImagePath(id: string): any {
|
||||
return require(`./../img/${id}`);
|
||||
}
|
||||
|
||||
private resetPagination() {
|
||||
this._count = 0;
|
||||
this._hasMoreItems = false;
|
||||
|
Reference in New Issue
Block a user