mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Revert changes which should have been made in dev-wabson-contentserviceapi
This commit is contained in:
@@ -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 { VIEWERCOMPONENT } from 'ng2-alfresco-viewer/dist/ng2-alfresco-viewer';
|
||||||
import {
|
import {
|
||||||
AlfrescoAuthenticationService,
|
AlfrescoAuthenticationService,
|
||||||
AlfrescoContentService,
|
|
||||||
AlfrescoSettingsService
|
AlfrescoSettingsService
|
||||||
} from 'ng2-alfresco-core/dist/ng2-alfresco-core';
|
} from 'ng2-alfresco-core/dist/ng2-alfresco-core';
|
||||||
|
|
||||||
@@ -38,13 +37,11 @@ declare let __moduleName: string;
|
|||||||
export class SearchBarComponent {
|
export class SearchBarComponent {
|
||||||
|
|
||||||
urlFile: string;
|
urlFile: string;
|
||||||
mimeType: string;
|
|
||||||
fileShowed: boolean = false;
|
fileShowed: boolean = false;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
public router: Router,
|
public router: Router,
|
||||||
public auth: AlfrescoAuthenticationService,
|
public auth: AlfrescoAuthenticationService,
|
||||||
public contentService: AlfrescoContentService,
|
|
||||||
public settings: AlfrescoSettingsService
|
public settings: AlfrescoSettingsService
|
||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
@@ -66,8 +63,9 @@ export class SearchBarComponent {
|
|||||||
|
|
||||||
onFileClicked(event) {
|
onFileClicked(event) {
|
||||||
if (event.value.entry.isFile) {
|
if (event.value.entry.isFile) {
|
||||||
this.mimeType = event.value.entry.content.mimeType;
|
let workSpace = 'workspace/SpacesStore/' + event.value.entry.id;
|
||||||
this.urlFile = this.contentService.getContentUrl(event.value);
|
let nameFile = event.value.entry.name;
|
||||||
|
this.urlFile = this.settings.host + '/alfresco/s/slingshot/node/content/' + workSpace + '/' + nameFile;
|
||||||
this.fileShowed = true;
|
this.fileShowed = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user