#1014 use document list to display search results (#1548)

* #1014 use document list to diplay search results

* #1014 refactor pagination

* #1014 documentation and scripts update

* fix random erros on tests executrion

* #1014 fix travis scripts and raise timeout jasmine

* #1014 fix appveyor script

* #1014 type nodeId
This commit is contained in:
Mario Romano
2017-01-27 12:22:25 +00:00
committed by Denys Vuika
parent 9e00b1d4f1
commit b05247dade
52 changed files with 917 additions and 414 deletions

View File

@@ -1,8 +1,12 @@
<div class="search-results-container">
<h1>Search results</h1>
<alfresco-search (navigate)="onNavigateItem($event)"></alfresco-search>
<alfresco-search (preview)="showFile($event)"></alfresco-search>
</div>
<alfresco-viewer *ngIf="fileShowed" [(showViewer)]="fileShowed" [fileNodeId]="fileNodeId" [overlayMode]="true">
<div class="mdl-spinner mdl-js-spinner is-active"></div>
</alfresco-viewer>
<div *ngIf="fileShowed">
<alfresco-viewer [(showViewer)]="fileShowed"
[fileNodeId]="fileNodeId"
[overlayMode]="true">
<div class="mdl-spinner mdl-js-spinner is-active"></div>
</alfresco-viewer>
</div>

View File

@@ -47,18 +47,18 @@ import { MinimalNodeEntity } from 'alfresco-js-api';
})
export class SearchComponent {
fileShowed: boolean = false;
fileNodeId: string;
fileShowed: boolean = false;
constructor(public router: Router) {
}
onNavigateItem(event: MinimalNodeEntity) {
if (event.entry.isFile) {
this.fileNodeId = event.entry.id;
showFile(event) {
if (event.value.entry.isFile) {
this.fileNodeId = event.value.entry.id;
this.fileShowed = true;
} else if (event.entry.isFolder) {
this.router.navigate(['/files', event.entry.id]);
} else {
this.fileShowed = false;
}
}
}