mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-08-07 17:48:54 +00:00
[ADF - 1030] Datatable - enable isLoading to show the spinner in all the components (#2063)
* added spinner module and translate text for process-list component * added spinner loader for data-table in processlist-variable component * added spinner loader for data-table in processlist component * added spinner loader for data-table in process-attachmentlist component * added spinner module and translate text for tasklist component * changed css for adf-datatable: selector changed in component * added spinner loader for data-table in tasklist component * added spinner loader for data-table in task-attachmentlist component * removed no-content template from task/process attachment list * fixed tasklist testcase issues * changed imort order for test cases * fixed testcase issue in processlist component
This commit is contained in:
committed by
Eugenio Romano
parent
34bb8b824d
commit
e6a2b7112b
@@ -39,6 +39,7 @@ export class TaskAttachmentListComponent implements OnChanges {
|
||||
error: EventEmitter<any> = new EventEmitter<any>();
|
||||
|
||||
attachments: any[] = [];
|
||||
loadingFlag: boolean = true;
|
||||
|
||||
constructor(private translateService: AlfrescoTranslationService,
|
||||
private activitiContentService: ActivitiContentService,
|
||||
@@ -76,6 +77,8 @@ export class TaskAttachmentListComponent implements OnChanges {
|
||||
|
||||
private loadAttachmentsByTaskId(taskId: string) {
|
||||
if (taskId) {
|
||||
this.loadingFlag = true;
|
||||
this.reset();
|
||||
this.activitiContentService.getTaskRelatedContent(taskId).subscribe(
|
||||
(res: any) => {
|
||||
let attachList = [];
|
||||
@@ -90,9 +93,11 @@ export class TaskAttachmentListComponent implements OnChanges {
|
||||
});
|
||||
this.attachments = attachList;
|
||||
this.success.emit(this.attachments);
|
||||
this.loadingFlag = false;
|
||||
},
|
||||
(err) => {
|
||||
this.error.emit(err);
|
||||
this.loadingFlag = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -175,4 +180,8 @@ export class TaskAttachmentListComponent implements OnChanges {
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
isLoading() {
|
||||
return this.loadingFlag;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user