[ADF-1348] Upload Dialog - 'Cancel All' button does not render (#2192)

* refactored isUploadCancelled and isUploadCompleted

* improved checks
This commit is contained in:
Cilibiu Bogdan
2017-08-10 12:26:25 +03:00
committed by Denys Vuika
parent f372f4925d
commit a277a00a96
4 changed files with 116 additions and 41 deletions

View File

@@ -11,26 +11,26 @@
{{ isDialogMinimized ? 'keyboard_arrow_up' : 'keyboard_arrow_down' }}
</md-icon>
<span
<span
class="upload-dialog__title"
*ngIf="!uploadList.isUploadCompleted()">
*ngIf="!uploadList.isUploadCompleted() && !uploadList.isUploadCancelled()">
{{ 'FILE_UPLOAD.MESSAGES.UPLOAD_PROGRESS' | translate: { completed: totalCompleted, total: filesUploadingList.length } }}
</span>
<span
<span
class="upload-dialog__title"
*ngIf="uploadList.isUploadCompleted() && !uploadList.isUploadCancelled()">
*ngIf="uploadList.isUploadCompleted()">
{{ 'FILE_UPLOAD.MESSAGES.UPLOAD_COMPLETED' | translate: { completed: totalCompleted, total: filesUploadingList.length } }}
</span>
<span
<span
class="upload-dialog__title"
*ngIf="uploadList.isUploadCancelled()">
{{ 'FILE_UPLOAD.MESSAGES.UPLOAD_CANCELED' | translate }}
</span>
</header>
<section
<section
class="upload-dialog__info"
*ngIf="uploadList.totalErrorFiles()">
{{
@@ -56,15 +56,15 @@
</section>
<footer class="upload-dialog__actions">
<button
*ngIf="!uploadList.isUploadCompleted()"
<button
*ngIf="!uploadList.isUploadCompleted() && !uploadList.isUploadCancelled()"
md-button
(click)="uploadList.cancelAllFiles($event)">
{{ 'ADF_FILE_UPLOAD.BUTTON.CANCEL_ALL' | translate }}
</button>
<button
*ngIf="uploadList.isUploadCompleted()"
*ngIf="uploadList.isUploadCompleted() || uploadList.isUploadCancelled()"
md-button
(click)="close($event)">
{{ 'ADF_FILE_UPLOAD.BUTTON.CLOSE' | translate }}