From 734c1260cab49d400bd39d522f72a9c9a0aad12a Mon Sep 17 00:00:00 2001 From: Cilibiu Bogdan Date: Thu, 10 Aug 2017 12:26:25 +0300 Subject: [PATCH] [ADF-1348] Upload Dialog - 'Cancel All' button does not render (#2192) * refactored isUploadCancelled and isUploadCompleted * improved checks --- .../src/models/file.model.ts | 2 +- .../file-uploading-dialog.component.html | 18 +-- .../file-uploading-list.component.spec.ts | 107 +++++++++++++++--- .../file-uploading-list.component.ts | 30 ++--- 4 files changed, 116 insertions(+), 41 deletions(-) diff --git a/ng2-components/ng2-alfresco-core/src/models/file.model.ts b/ng2-components/ng2-alfresco-core/src/models/file.model.ts index f4b9f8fa7a..30abb7979e 100644 --- a/ng2-components/ng2-alfresco-core/src/models/file.model.ts +++ b/ng2-components/ng2-alfresco-core/src/models/file.model.ts @@ -54,7 +54,7 @@ export class FileModel { this.id = this.generateId(); this.name = file.name; this.size = file.size; - this.data = {}; + this.data = null; this.progress = { loaded: 0, diff --git a/ng2-components/ng2-alfresco-upload/src/components/file-uploading-dialog.component.html b/ng2-components/ng2-alfresco-upload/src/components/file-uploading-dialog.component.html index d5d699ae3d..164037bc94 100644 --- a/ng2-components/ng2-alfresco-upload/src/components/file-uploading-dialog.component.html +++ b/ng2-components/ng2-alfresco-upload/src/components/file-uploading-dialog.component.html @@ -11,26 +11,26 @@ {{ isDialogMinimized ? 'keyboard_arrow_up' : 'keyboard_arrow_down' }} - + *ngIf="!uploadList.isUploadCompleted() && !uploadList.isUploadCancelled()"> {{ 'FILE_UPLOAD.MESSAGES.UPLOAD_PROGRESS' | translate: { completed: totalCompleted, total: filesUploadingList.length } }} - + *ngIf="uploadList.isUploadCompleted()"> {{ 'FILE_UPLOAD.MESSAGES.UPLOAD_COMPLETED' | translate: { completed: totalCompleted, total: filesUploadingList.length } }} - {{ 'FILE_UPLOAD.MESSAGES.UPLOAD_CANCELED' | translate }} -
{{ @@ -56,15 +56,15 @@