mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-08-07 17:48:54 +00:00
[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:
committed by
Eugenio Romano
parent
adfc5adba8
commit
fba23c4377
@@ -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;
|
||||
}
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
<adf-viewer
|
||||
[showViewer]="true"
|
||||
[blobFile]="content"
|
||||
[displayName]="name">
|
||||
</adf-viewer>
|
Reference in New Issue
Block a user