[ADF-4823] added download and show preview for attach cloud widget (#4996)

* [ADF-4823] fixed download and start fixing show preview

* [ADF-4823] fixed preview files

* [ADF-4823] - added unit test

* [ADF-4823] - fixed lint problem

* [ADF-4823] - rebased and fixed lint problem

* added a new method in BrowserActions to check that the action menu is visible, and using that in the tests.

* linting fixes
This commit is contained in:
Vito
2019-09-03 11:10:40 +01:00
committed by Eugenio Romano
parent c142371222
commit 19a17ca6e6
14 changed files with 478 additions and 281 deletions

View File

@@ -10,6 +10,7 @@
(taskCompleted)="onTaskCompleted()"
(taskClaimed)="onTaskClaimed()"
(taskUnclaimed)="onTaskUnclaimed()"
(formContentClicked)="onFormContentClicked($event)"
(formSaved)="onFormSaved()">
</adf-cloud-task-form>
</div>

View File

@@ -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() {