mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Replace loadingFlag with isLoading (#2074)
This commit is contained in:
committed by
Eugenio Romano
parent
ae3f5078d1
commit
52ef483216
@@ -5,10 +5,10 @@
|
||||
|
||||
|
||||
<div>
|
||||
<adf-datatable
|
||||
[data]="data"
|
||||
<adf-datatable
|
||||
[data]="data"
|
||||
[actions]="true"
|
||||
[loading]="isLoading()"
|
||||
[loading]="isLoading"
|
||||
(showRowActionsMenu)="onShowRowActionsMenu($event)"
|
||||
(executeRowAction)="onExecuteRowAction($event)">
|
||||
<loading-content-template>
|
||||
|
@@ -61,7 +61,7 @@ export class ActivitiProcessInstanceVariables implements OnInit, OnChanges {
|
||||
variableValue: string;
|
||||
variableScope: string;
|
||||
|
||||
loadingFlag: boolean = true;
|
||||
isLoading: boolean = true;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
@@ -146,16 +146,16 @@ export class ActivitiProcessInstanceVariables implements OnInit, OnChanges {
|
||||
|
||||
private getProcessInstanceVariables(processInstanceId: string) {
|
||||
if (processInstanceId) {
|
||||
this.loadingFlag = true;
|
||||
this.isLoading = true;
|
||||
this.activitiProcess.getProcessInstanceVariables(processInstanceId).subscribe(
|
||||
(res: ProcessInstanceVariable[]) => {
|
||||
let instancesRow = this.createDataRow(res);
|
||||
this.renderInstances(instancesRow);
|
||||
this.loadingFlag = false;
|
||||
this.isLoading = false;
|
||||
},
|
||||
(err) => {
|
||||
this.error.emit(err);
|
||||
this.loadingFlag = false;
|
||||
this.isLoading = false;
|
||||
}
|
||||
);
|
||||
} else {
|
||||
@@ -275,8 +275,4 @@ export class ActivitiProcessInstanceVariables implements OnInit, OnChanges {
|
||||
{ id: 'edit', title: 'Edit' }
|
||||
];
|
||||
}
|
||||
|
||||
isLoading() {
|
||||
return this.loadingFlag;
|
||||
}
|
||||
}
|
||||
|
@@ -3,7 +3,7 @@
|
||||
<div>
|
||||
<adf-datatable
|
||||
[data]="data"
|
||||
[loading]="isLoading()"
|
||||
[loading]="isLoading"
|
||||
(rowClick)="onRowClick($event)">
|
||||
<loading-content-template>
|
||||
<ng-template>
|
||||
|
@@ -62,7 +62,7 @@ export class ActivitiProcessInstanceListComponent implements OnChanges, AfterCon
|
||||
onError: EventEmitter<any> = new EventEmitter<any>();
|
||||
|
||||
currentInstanceId: string;
|
||||
loadingFlag: boolean = true;
|
||||
isLoading: boolean = true;
|
||||
|
||||
private defaultSchema: DataColumn[] = [
|
||||
{ type: 'text', key: 'name', title: 'Name', cssClass: 'full-width name-column', sortable: true },
|
||||
@@ -141,7 +141,7 @@ export class ActivitiProcessInstanceListComponent implements OnChanges, AfterCon
|
||||
}
|
||||
|
||||
private load(requestNode: ProcessFilterRequestRepresentation) {
|
||||
this.loadingFlag = true;
|
||||
this.isLoading = true;
|
||||
this.processService.getProcessInstances(requestNode)
|
||||
.subscribe(
|
||||
(response) => {
|
||||
@@ -149,11 +149,11 @@ export class ActivitiProcessInstanceListComponent implements OnChanges, AfterCon
|
||||
this.renderInstances(instancesRow);
|
||||
this.selectFirst();
|
||||
this.onSuccess.emit(response);
|
||||
this.loadingFlag = false;
|
||||
this.isLoading = false;
|
||||
},
|
||||
error => {
|
||||
this.onError.emit(error);
|
||||
this.loadingFlag = false;
|
||||
this.isLoading = false;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -279,8 +279,4 @@ export class ActivitiProcessInstanceListComponent implements OnChanges, AfterCon
|
||||
};
|
||||
return new ProcessFilterRequestRepresentation(requestNode);
|
||||
}
|
||||
|
||||
isLoading() {
|
||||
return this.loadingFlag;
|
||||
}
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<adf-datatable
|
||||
[rows]="attachments"
|
||||
[actions]="true"
|
||||
[loading]="isLoading()"
|
||||
[loading]="isLoading"
|
||||
(rowDblClick)="openContent($event)"
|
||||
(showRowActionsMenu)="onShowRowActionsMenu($event)"
|
||||
(executeRowAction)="onExecuteRowAction($event)">
|
||||
|
@@ -39,7 +39,7 @@ export class ActivitiProcessAttachmentListComponent implements OnChanges {
|
||||
error: EventEmitter<any> = new EventEmitter<any>();
|
||||
|
||||
attachments: any[] = [];
|
||||
loadingFlag: boolean = true;
|
||||
isLoading: boolean = true;
|
||||
|
||||
constructor(private translateService: AlfrescoTranslationService,
|
||||
private activitiContentService: ActivitiContentService,
|
||||
@@ -78,7 +78,7 @@ export class ActivitiProcessAttachmentListComponent implements OnChanges {
|
||||
private loadAttachmentsByProcessInstanceId(processInstanceId: string) {
|
||||
if (processInstanceId) {
|
||||
this.reset();
|
||||
this.loadingFlag = true;
|
||||
this.isLoading = true;
|
||||
this.activitiContentService.getProcessRelatedContent(processInstanceId).subscribe(
|
||||
(res: any) => {
|
||||
res.data.forEach(content => {
|
||||
@@ -91,11 +91,11 @@ export class ActivitiProcessAttachmentListComponent implements OnChanges {
|
||||
});
|
||||
});
|
||||
this.success.emit(this.attachments);
|
||||
this.loadingFlag = false;
|
||||
this.isLoading = false;
|
||||
},
|
||||
(err) => {
|
||||
this.error.emit(err);
|
||||
this.loadingFlag = false;
|
||||
this.isLoading = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -178,8 +178,4 @@ export class ActivitiProcessAttachmentListComponent implements OnChanges {
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
isLoading() {
|
||||
return this.loadingFlag;
|
||||
}
|
||||
}
|
||||
|
@@ -3,7 +3,7 @@
|
||||
<div>
|
||||
<adf-datatable
|
||||
[data]="data"
|
||||
[loading]="isLoading()"
|
||||
[loading]="isLoading"
|
||||
(rowClick)="onRowClick($event)">
|
||||
<loading-content-template>
|
||||
<ng-template>
|
||||
|
@@ -82,7 +82,7 @@ export class ActivitiTaskList implements OnChanges, AfterContentInit {
|
||||
|
||||
currentInstanceId: string;
|
||||
|
||||
loadingFlag: boolean = true;
|
||||
isLoading: boolean = true;
|
||||
|
||||
/**
|
||||
* Toggles custom data source mode.
|
||||
@@ -182,7 +182,7 @@ export class ActivitiTaskList implements OnChanges, AfterContentInit {
|
||||
}
|
||||
|
||||
private load(requestNode: TaskQueryRequestRepresentationModel) {
|
||||
this.loadingFlag = true;
|
||||
this.isLoading = true;
|
||||
this.taskListService.getTotalTasks(requestNode).subscribe(
|
||||
(res) => {
|
||||
requestNode.size = res.total;
|
||||
@@ -192,14 +192,14 @@ export class ActivitiTaskList implements OnChanges, AfterContentInit {
|
||||
this.renderInstances(instancesRow);
|
||||
this.selectTask(requestNode.landingTaskId);
|
||||
this.onSuccess.emit(response);
|
||||
this.loadingFlag = false;
|
||||
this.isLoading = false;
|
||||
}, (error) => {
|
||||
this.onError.emit(error);
|
||||
this.loadingFlag = false;
|
||||
this.isLoading = false;
|
||||
});
|
||||
}, (err) => {
|
||||
this.onError.emit(err);
|
||||
this.loadingFlag = false;
|
||||
this.isLoading = false;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -306,8 +306,4 @@ export class ActivitiTaskList implements OnChanges, AfterContentInit {
|
||||
};
|
||||
return new TaskQueryRequestRepresentationModel(requestNode);
|
||||
}
|
||||
|
||||
isLoading() {
|
||||
return this.loadingFlag;
|
||||
}
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<adf-datatable
|
||||
[rows]="attachments"
|
||||
[actions]="true"
|
||||
[loading]="isLoading()"
|
||||
[loading]="isLoading"
|
||||
(rowDblClick)="openContent($event)"
|
||||
(showRowActionsMenu)="onShowRowActionsMenu($event)"
|
||||
(executeRowAction)="onExecuteRowAction($event)">
|
||||
|
@@ -39,7 +39,7 @@ export class TaskAttachmentListComponent implements OnChanges {
|
||||
error: EventEmitter<any> = new EventEmitter<any>();
|
||||
|
||||
attachments: any[] = [];
|
||||
loadingFlag: boolean = true;
|
||||
isLoading: boolean = true;
|
||||
|
||||
constructor(private translateService: AlfrescoTranslationService,
|
||||
private activitiContentService: ActivitiContentService,
|
||||
@@ -77,7 +77,7 @@ export class TaskAttachmentListComponent implements OnChanges {
|
||||
|
||||
private loadAttachmentsByTaskId(taskId: string) {
|
||||
if (taskId) {
|
||||
this.loadingFlag = true;
|
||||
this.isLoading = true;
|
||||
this.reset();
|
||||
this.activitiContentService.getTaskRelatedContent(taskId).subscribe(
|
||||
(res: any) => {
|
||||
@@ -93,11 +93,11 @@ export class TaskAttachmentListComponent implements OnChanges {
|
||||
});
|
||||
this.attachments = attachList;
|
||||
this.success.emit(this.attachments);
|
||||
this.loadingFlag = false;
|
||||
this.isLoading = false;
|
||||
},
|
||||
(err) => {
|
||||
this.error.emit(err);
|
||||
this.loadingFlag = false;
|
||||
this.isLoading = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -180,8 +180,4 @@ export class TaskAttachmentListComponent implements OnChanges {
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
isLoading() {
|
||||
return this.loadingFlag;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user