diff --git a/demo-shell/src/app/components/cloud/task-details-cloud-demo.component.html b/demo-shell/src/app/components/cloud/task-details-cloud-demo.component.html
index c1a956acec..4249feb8d9 100644
--- a/demo-shell/src/app/components/cloud/task-details-cloud-demo.component.html
+++ b/demo-shell/src/app/components/cloud/task-details-cloud-demo.component.html
@@ -10,6 +10,7 @@
(taskCompleted)="onTaskCompleted()"
(taskClaimed)="onTaskClaimed()"
(taskUnclaimed)="onTaskUnclaimed()"
+ (formContentClicked)="onFormContentClicked($event)"
(formSaved)="onFormSaved()">
diff --git a/demo-shell/src/app/components/cloud/task-details-cloud-demo.component.ts b/demo-shell/src/app/components/cloud/task-details-cloud-demo.component.ts
index 9a724895e5..63b1d0549a 100644
--- a/demo-shell/src/app/components/cloud/task-details-cloud-demo.component.ts
+++ b/demo-shell/src/app/components/cloud/task-details-cloud-demo.component.ts
@@ -19,6 +19,7 @@ import { Component, ViewChild } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { NotificationService } from '@alfresco/adf-core';
import { TaskHeaderCloudComponent } from '@alfresco/adf-process-services-cloud';
+import { PreviewService } from 'app/services/preview.service';
@Component({
templateUrl: './task-details-cloud-demo.component.html',
@@ -35,7 +36,8 @@ export class TaskDetailsCloudDemoComponent {
constructor(
private route: ActivatedRoute,
private router: Router,
- private notificationService: NotificationService
+ private notificationService: NotificationService,
+ private previewService: PreviewService
) {
this.route.params.subscribe((params) => {
this.taskId = params.taskId;
@@ -66,8 +68,8 @@ export class TaskDetailsCloudDemoComponent {
this.taskHeader.ngOnInit();
}
- onFormContentClicked(resourceId) {
- this.router.navigate([`/cloud/${this.appName}/task-details/${this.taskId}/files/${resourceId.nodeId}/view`]);
+ onFormContentClicked(resourceClicked: any) {
+ this.previewService.showResource(resourceClicked.nodeId);
}
onFormSaved() {
diff --git a/lib/core/form/components/widgets/core/content-link.model.ts b/lib/core/form/components/widgets/core/content-link.model.ts
index 1e9bea46f3..e2cdb4936c 100644
--- a/lib/core/form/components/widgets/core/content-link.model.ts
+++ b/lib/core/form/components/widgets/core/content-link.model.ts
@@ -25,6 +25,7 @@
created: Date;
createdBy: any;
id: number;
+ nodeId: string;
link: boolean;
mimeType: string;
name: string;
@@ -48,6 +49,7 @@
this.relatedContent = obj && obj.relatedContent;
this.simpleType = obj && obj.simpleType;
this.thumbnailStatus = obj && obj.thumbnailStatus;
+ this.nodeId = obj && obj.nodeId;
}
hasPreviewStatus(): boolean {
diff --git a/lib/process-services-cloud/src/lib/form/components/attach-file-cloud-widget/attach-file-cloud-widget.component.html b/lib/process-services-cloud/src/lib/form/components/attach-file-cloud-widget/attach-file-cloud-widget.component.html
index 173731ed8d..40c5051fa1 100644
--- a/lib/process-services-cloud/src/lib/form/components/attach-file-cloud-widget/attach-file-cloud-widget.component.html
+++ b/lib/process-services-cloud/src/lib/form/components/attach-file-cloud-widget/attach-file-cloud-widget.component.html
@@ -48,10 +48,28 @@
tabindex="0"/>
{{file.name}}
-