mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-19 17:14:57 +00:00
Using host from settings to display pdf
This commit is contained in:
parent
dede2126c9
commit
0c03a128dd
@ -21,7 +21,10 @@ import {
|
|||||||
DOCUMENT_LIST_PROVIDERS,
|
DOCUMENT_LIST_PROVIDERS,
|
||||||
DocumentActionsService
|
DocumentActionsService
|
||||||
} from 'ng2-alfresco-documentlist/dist/ng2-alfresco-documentlist';
|
} from 'ng2-alfresco-documentlist/dist/ng2-alfresco-documentlist';
|
||||||
import { MDL } from 'ng2-alfresco-core/dist/ng2-alfresco-core';
|
import {
|
||||||
|
MDL,
|
||||||
|
AlfrescoSettingsService
|
||||||
|
} from 'ng2-alfresco-core/dist/ng2-alfresco-core';
|
||||||
import { ALFRESCO_ULPOAD_COMPONENTS } from 'ng2-alfresco-upload/dist/ng2-alfresco-upload';
|
import { ALFRESCO_ULPOAD_COMPONENTS } from 'ng2-alfresco-upload/dist/ng2-alfresco-upload';
|
||||||
import { AlfrescoPipeTranslate } from 'ng2-alfresco-core/dist/ng2-alfresco-core';
|
import { AlfrescoPipeTranslate } from 'ng2-alfresco-core/dist/ng2-alfresco-core';
|
||||||
import { VIEWERCOMPONENT } from 'ng2-alfresco-viewer/dist/ng2-alfresco-viewer';
|
import { VIEWERCOMPONENT } from 'ng2-alfresco-viewer/dist/ng2-alfresco-viewer';
|
||||||
@ -47,7 +50,9 @@ export class FilesComponent {
|
|||||||
|
|
||||||
acceptedFilesType: string = '.jpg,.pdf,.js';
|
acceptedFilesType: string = '.jpg,.pdf,.js';
|
||||||
|
|
||||||
constructor(documentActions: DocumentActionsService) {
|
constructor(
|
||||||
|
private settings: AlfrescoSettingsService,
|
||||||
|
documentActions: DocumentActionsService) {
|
||||||
documentActions.setHandler('my-handler', this.myDocumentActionHandler.bind(this));
|
documentActions.setHandler('my-handler', this.myDocumentActionHandler.bind(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -72,8 +77,7 @@ export class FilesComponent {
|
|||||||
let workSpace = 'workspace/SpacesStore/' + event.value.entry.id;
|
let workSpace = 'workspace/SpacesStore/' + event.value.entry.id;
|
||||||
let nameFile = event.value.entry.name;
|
let nameFile = event.value.entry.name;
|
||||||
|
|
||||||
let host = 'http://192.168.99.100:8080/';
|
this.urlFile = this.settings.host + '/alfresco/s/slingshot/node/content/' + workSpace + '/' + nameFile;
|
||||||
this.urlFile = host + 'alfresco/s/slingshot/node/content/' + workSpace + '/' + nameFile;
|
|
||||||
|
|
||||||
this.fileShowed = true;
|
this.fileShowed = true;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user