#68 PDFJS Mock and test

This commit is contained in:
Eugenio Romano
2016-05-31 14:48:30 +01:00
parent 0ccdd43842
commit c42d497618
7 changed files with 90 additions and 10 deletions

View File

@@ -1,3 +1,3 @@
<alfresco-viewer [urlFile]="'http://192.168.99.100:8080/share/proxy/alfresco/slingshot/node/content/workspace/SpacesStore/f7d0ef02-24ca-46e5-a05a-37d7d878142a/Energy_Bill_20May16.pdf'">
<alfresco-viewer [urlFile]="(hrefFile)">
<div class="mdl-spinner mdl-js-spinner is-active"></div>
</alfresco-viewer>

View File

@@ -27,7 +27,22 @@ declare let __moduleName: string;
directives: [VIEWERCOMPONENT]
})
export class ViewerFileComponent {
hrefFile: string;
constructor() {
console.log('constructor');
let host = 'http://192.168.99.100:8080/';
let nameFile = 'Energy_Bill_20May16.pdf';
let workSpace = 'workspace/SpacesStore/01f144c6-bd6f-43ed-8b92-e417ad629467/';
this.hrefFile = host + 'alfresco/s/slingshot/node/content/' + workSpace + nameFile + '?alf_ticket=' + this.getAlfrescoTicket();
}
/**
* Get the token from the local storage
* @returns {any}
*/
private getAlfrescoTicket(): string {
return localStorage.getItem('token');
}
}