From 316c6ca263882f9e5845dd2e0d371dcd98c1b914 Mon Sep 17 00:00:00 2001 From: Will Abson Date: Thu, 9 Jun 2016 18:54:52 +0100 Subject: [PATCH] Revert changes which should have been made in dev-wabson-contentserviceapi --- .../app/components/search/search-bar.component.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/demo-shell-ng2/app/components/search/search-bar.component.ts b/demo-shell-ng2/app/components/search/search-bar.component.ts index 1a3fd280a6..990d025365 100644 --- a/demo-shell-ng2/app/components/search/search-bar.component.ts +++ b/demo-shell-ng2/app/components/search/search-bar.component.ts @@ -21,7 +21,6 @@ import { ALFRESCO_SEARCH_DIRECTIVES } from 'ng2-alfresco-search/dist/ng2-alfresc import { VIEWERCOMPONENT } from 'ng2-alfresco-viewer/dist/ng2-alfresco-viewer'; import { AlfrescoAuthenticationService, - AlfrescoContentService, AlfrescoSettingsService } from 'ng2-alfresco-core/dist/ng2-alfresco-core'; @@ -38,13 +37,11 @@ declare let __moduleName: string; export class SearchBarComponent { urlFile: string; - mimeType: string; fileShowed: boolean = false; constructor( public router: Router, public auth: AlfrescoAuthenticationService, - public contentService: AlfrescoContentService, public settings: AlfrescoSettingsService ) { } @@ -66,8 +63,9 @@ export class SearchBarComponent { onFileClicked(event) { if (event.value.entry.isFile) { - this.mimeType = event.value.entry.content.mimeType; - this.urlFile = this.contentService.getContentUrl(event.value); + let workSpace = 'workspace/SpacesStore/' + event.value.entry.id; + let nameFile = event.value.entry.name; + this.urlFile = this.settings.host + '/alfresco/s/slingshot/node/content/' + workSpace + '/' + nameFile; this.fileShowed = true; } }