#46 refresh documentList after file uploaded

This commit is contained in:
mauriziovitale84
2016-05-14 21:21:55 +01:00
parent bbcd83b377
commit 82c1621edd
3 changed files with 37 additions and 9 deletions

View File

@@ -39,7 +39,7 @@ export class FilesComponent {
breadcrumb: boolean = false;
navigation: boolean = true;
events: any[] = [];
absolutePath: string = '';
absolutePath: string = '/Sites/swsdp/documentLibrary';
relativePath: string = '';
constructor(documentActions: DocumentActionsService) {
@@ -63,11 +63,15 @@ export class FilesComponent {
this.relativePath = this.getRelativeDirectory(this.absolutePath);
}
refreshDocumentList(event: Object) {
this.absolutePath += '/';
}
getRelativeDirectory(currentFolderPath: string): string {
if(currentFolderPath.indexOf('swsdp/documentLibrary/') !=-1) {
return currentFolderPath.replace('swsdp/documentLibrary/', '')
if(currentFolderPath.indexOf('/Sites/swsdp/documentLibrary/') !=-1) {
return currentFolderPath.replace('/Sites/swsdp/documentLibrary/', '')
} else {
return currentFolderPath.replace('swsdp/documentLibrary', '')
return currentFolderPath.replace('/Sites/swsdp/documentLibrary', '')
}
}
}