Fix uploads from folders opened from search results

Refs #1248
This commit is contained in:
Will Abson
2016-12-16 17:52:57 +00:00
parent 2bed309023
commit fb851271e9
8 changed files with 101 additions and 21 deletions

View File

@@ -1,6 +1,7 @@
<div class="container">
<alfresco-upload-drag-area
[currentFolderPath]="currentPath"
[rootFolderId]="uploadRootFolderId"
[currentFolderPath]="uploadFolderPath"
[versioning] = "versioning"
(onSuccess)="documentList.reload()">
<alfresco-document-list-breadcrumb
@@ -182,7 +183,8 @@
</div>
<div *ngIf="!acceptedFilesTypeShow">
<alfresco-upload-button data-automation-id="multiple-file-upload"
[currentFolderPath]="currentPath"
[rootFolderId]="uploadRootFolderId"
[currentFolderPath]="uploadFolderPath"
[multipleFiles]="multipleFileUpload"
[uploadFolders]="folderUpload"
[versioning] = "versioning"
@@ -192,7 +194,8 @@
</div>
<div *ngIf="acceptedFilesTypeShow">
<alfresco-upload-button data-automation-id="multiple-file-upload"
[currentFolderPath]="currentPath"
[rootFolderId]="uploadRootFolderId"
[currentFolderPath]="uploadFolderPath"
acceptedFilesType="{{acceptedFilesType}}"
[multipleFiles]="multipleFileUpload"
[uploadFolders]="folderUpload"

View File

@@ -47,6 +47,14 @@ export class FilesComponent implements OnInit {
acceptedFilesType: string = '.jpg,.pdf,.js';
get uploadRootFolderId(): string {
return this.currentFolderId || this.rootFolderId;
}
get uploadFolderPath(): string {
return this.currentFolderId ? '/' : this.currentPath;
}
@ViewChild(DocumentList)
documentList: DocumentList;