[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

@@ -0,0 +1,21 @@
import { Component } from '@angular/core';
import { PreviewService } from '../../services/preview.service';
import { Router } from '@angular/router';
@Component({
templateUrl: 'bob-preview.component.html'
})
export class BlobPreviewComponent {
content: Blob;
name: string;
constructor(preview: PreviewService, router: Router) {
if (preview.content === null || preview.name === null) {
router.navigate([{ outlets: { overlay: null } }]);
return;
}
this.content = preview.content;
this.name = preview.name;
}
}

View File

@@ -0,0 +1,5 @@
<adf-viewer
[showViewer]="true"
[blobFile]="content"
[displayName]="name">
</adf-viewer>