[ADF-2755] Fix preview overlay (#3208)

* Fix overlay in the new sidenav

* Update wrong url

* Enrich BlobPreviewService

* Fix another previews

* Filepreview use the same router outlet
This commit is contained in:
Popovics András
2018-04-17 17:04:24 +01:00
committed by Eugenio Romano
parent adfc5adba8
commit fba23c4377
15 changed files with 105 additions and 62 deletions

View File

@@ -18,6 +18,7 @@
import { Component, Input, OnChanges, OnInit, ViewChild } from '@angular/core';
import { TaskListService, TaskAttachmentListComponent, TaskDetailsModel, TaskUploadService } from '@alfresco/adf-process-services';
import { UploadService, AlfrescoApiService, AppConfigService } from '@alfresco/adf-core';
import { PreviewService } from '../../services/preview.service';
export function taskUploadServiceFactory(api: AlfrescoApiService, config: AppConfigService) {
return new TaskUploadService(api, config);
@@ -44,14 +45,12 @@ export class TaskAttachmentsComponent implements OnInit, OnChanges {
@Input()
taskId: string;
fileShowed = false;
content: Blob;
contentName: string;
taskDetails: any;
constructor(private uploadService: UploadService, private activitiTaskList: TaskListService) {
}
constructor(
private uploadService: UploadService,
private activitiTaskList: TaskListService,
private preview: PreviewService) {}
ngOnInit() {
this.uploadService.fileUploadComplete.subscribe(value => this.onFileUploadComplete(value.data));
@@ -71,9 +70,7 @@ export class TaskAttachmentsComponent implements OnInit, OnChanges {
}
onAttachmentClick(content: any): void {
this.fileShowed = true;
this.content = content.contentBlob;
this.contentName = content.name;
this.preview.showBlob(content.name, content.contentBlob);
}
isCompletedTask(): boolean {