diff options
author | 2020-06-17 12:25:19 +0200 | |
---|---|---|
committer | 2020-06-18 12:17:28 +0000 | |
commit | 75ed136c6a55694465319f482b61069c95859bc1 (patch) | |
tree | fd5bd543335c2cbb0f6d8a3e3f84b8a2371a2027 /cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/scripts-tab | |
parent | cec8ff4951b9c045e84dd6d08d898b78c723d2e5 (diff) |
enable delete button in upload modal.
Disable import button when thre is no file
Issue-ID: CCSDK-2402
Signed-off-by: AhmedEldeeb50 <ahmed.eldeeb.ext@orange.com>
Change-Id: Idb119170646eb7cac1d75bafabc90e7fb452ad60
Diffstat (limited to 'cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/scripts-tab')
2 files changed, 7 insertions, 2 deletions
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/scripts-tab/scripts-tab.component.html b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/scripts-tab/scripts-tab.component.html index 1ecf2985e..6688a9202 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/scripts-tab/scripts-tab.component.html +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/scripts-tab/scripts-tab.component.html @@ -106,7 +106,7 @@ <tr *ngFor="let item of uploadedFiles; let i=index"> <th width="40"><img src="assets/img/icon-file-code.svg" /></th> <th>{{ item.name }}</th> - <th width="40" class="text-right"><img src="assets/img/icon-remove-file.svg" /></th> + <th (click)="removeInitFile(i)" width="40" class="text-right"><img src="assets/img/icon-remove-file.svg" /></th> </tr> </thead> </table> @@ -116,7 +116,7 @@ <button (click)="resetTheUploadedFiles()" class="btn btn-sm btn-secondary" data-dismiss="modal" type="button">Cancel </button> - <button (click)="setFilesToStore()" class="btn btn-sm btn-primary" data-dismiss="modal" type="button"> + <button (click)="setFilesToStore()" class="btn btn-sm btn-primary" [disabled]="uploadedFiles?.length<=0" data-dismiss="modal" type="button"> Import </button> </div> diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/scripts-tab/scripts-tab.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/scripts-tab/scripts-tab.component.ts index 63a734726..c3704365c 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/scripts-tab/scripts-tab.component.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/scripts-tab/scripts-tab.component.ts @@ -44,6 +44,11 @@ export class ScriptsTabComponent implements OnInit { } } } + + removeInitFile(index) { + this.uploadedFiles.splice(index, 1); + } + initDelete(file) { this.fileToDelete = file; } |