mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
@@ -177,9 +177,7 @@
|
||||
</div>
|
||||
|
||||
<alfresco-viewer [(showViewer)]="fileShowed"
|
||||
[urlFile]="urlFile"
|
||||
[fileName]="fileName"
|
||||
[mimeType]="mimeType"
|
||||
[fileNodeId]="fileNodeId"
|
||||
[overlayMode]="true">
|
||||
<div class="mdl-spinner mdl-js-spinner is-active"></div>
|
||||
</alfresco-viewer>
|
||||
|
@@ -58,9 +58,7 @@ declare let __moduleName: string;
|
||||
export class FilesComponent implements OnInit {
|
||||
currentPath: string = '/Sites/swsdp/documentLibrary';
|
||||
|
||||
urlFile: string;
|
||||
fileName: string;
|
||||
mimeType: string;
|
||||
fileNodeId: any;
|
||||
fileShowed: boolean = false;
|
||||
multipleFileUpload: boolean = false;
|
||||
folderUpload: boolean = false;
|
||||
@@ -92,9 +90,7 @@ export class FilesComponent implements OnInit {
|
||||
|
||||
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.fileNodeId = event.value.entry.id;
|
||||
this.fileShowed = true;
|
||||
} else {
|
||||
this.fileShowed = false;
|
||||
|
@@ -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>
|
||||
|
@@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user