Fix filename shown in title area of viewer component

This commit is contained in:
Will Abson
2016-06-10 12:20:59 +01:00
parent de80f3bca9
commit f0e00e39c3
7 changed files with 32 additions and 6 deletions

View File

@@ -148,7 +148,7 @@
[multipleFiles]="true"
(onSuccess)="refreshDocumentList($event)"></alfresco-upload-button>
<alfresco-viewer [(showViewer)]="fileShowed" [urlFile]="urlFile" [mimeType]="mimeType" [overlayMode]="true">
<alfresco-viewer [(showViewer)]="fileShowed" [urlFile]="urlFile" [fileName]="fileName" [mimeType]="mimeType" [overlayMode]="true">
<div class="mdl-spinner mdl-js-spinner is-active"></div>
</alfresco-viewer>
<file-uploading-dialog></file-uploading-dialog>

View File

@@ -46,6 +46,7 @@ export class FilesComponent {
relativePath: string = '';
urlFile: string;
fileName: string;
mimeType: string;
fileShowed: boolean = false;
@@ -75,6 +76,7 @@ export class FilesComponent {
showFile(event) {
if (event.value.entry.isFile) {
this.fileName = event.value.entry.name;
this.mimeType = event.value.entry.content.mimeType;
this.urlFile = this.contentService.getContentUrl(event.value);
this.fileShowed = true;

View File

@@ -37,6 +37,7 @@ declare let __moduleName: string;
export class SearchBarComponent {
urlFile: string;
fileName: string;
mimeType: string;
fileShowed: boolean = false;
@@ -65,6 +66,7 @@ export class SearchBarComponent {
onFileClicked(event) {
if (event.value.entry.isFile) {
this.fileName = event.value.entry.name;
this.mimeType = event.value.entry.content.mimeType;
this.urlFile = this.contentService.getContentUrl(event.value);
this.fileShowed = true;