insert new logic in the demo Shell

This commit is contained in:
Eugenio Romano
2016-08-04 10:24:50 +01:00
parent efa39eefe8
commit eb68bd5f48
7 changed files with 29 additions and 29 deletions

View File

@@ -1,6 +1,8 @@
<alfresco-search-control *ngIf="isLoggedIn()" [searchTerm]="searchTerm" [autocomplete]="false"
(searchChange)="searchTermChange($event);" (expand)="onExpandToggle($event);" (preview)="onFileClicked($event)"></alfresco-search-control>
<alfresco-viewer [(showViewer)]="fileShowed" [urlFile]="urlFile" [fileName]="fileName" [mimeType]="mimeType" [overlayMode]="true">
<alfresco-viewer [(showViewer)]="fileShowed"
[fileNodeId]="fileNodeId"
[overlayMode]="true">
<div class="mdl-spinner mdl-js-spinner is-active"></div>
</alfresco-viewer>

View File

@@ -56,15 +56,14 @@ export class SearchComponent {
previewName: string;
previewMimeType: string;
previewActive: boolean = false;
fileNodeId: string;
constructor(public contentService: AlfrescoContentService) {
}
onFileClicked(event) {
if (event.value.entry.isFile) {
this.previewName = event.value.entry.name;
this.previewMimeType = event.value.entry.content.mimeType;
this.previewContentUrl = this.contentService.getContentUrl(event.value);
this.fileNodeId = event.value.entry.id;
this.previewActive = true;
}
}