From 75ed136c6a55694465319f482b61069c95859bc1 Mon Sep 17 00:00:00 2001 From: AhmedEldeeb50 Date: Wed, 17 Jun 2020 12:25:19 +0200 Subject: enable delete button in upload modal. Disable import button when thre is no file Issue-ID: CCSDK-2402 Signed-off-by: AhmedEldeeb50 Change-Id: Idb119170646eb7cac1d75bafabc90e7fb452ad60 --- .../templ-mapp-creation/templ-mapp-creation.component.html | 11 +++++------ .../templ-mapp-creation/templ-mapp-creation.component.ts | 11 +++++++++-- 2 files changed, 14 insertions(+), 8 deletions(-) (limited to 'cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping') diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-creation/templ-mapp-creation.component.html b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-creation/templ-mapp-creation.component.html index fdf10e0a9..99b085507 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-creation/templ-mapp-creation.component.html +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-creation/templ-mapp-creation.component.html @@ -1,8 +1,8 @@ -
Create Template
- +
@@ -252,7 +252,7 @@ {{ item.name }} - + @@ -260,12 +260,11 @@
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-creation/templ-mapp-creation.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-creation/templ-mapp-creation.component.ts index 7b777696f..5feb76e06 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-creation/templ-mapp-creation.component.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-creation/templ-mapp-creation.component.ts @@ -1,4 +1,4 @@ -import { Component, EventEmitter, OnDestroy, OnInit, Output, ViewChild, AfterViewInit, ElementRef } from '@angular/core'; +import { Component, EventEmitter, OnDestroy, OnInit, Output, ViewChild } from '@angular/core'; import { FileSystemFileEntry, NgxFileDropEntry } from 'ngx-file-drop'; import { PackageCreationStore } from '../../package-creation.store'; import { TemplateInfo, TemplateStore } from '../../template.store'; @@ -9,8 +9,9 @@ import { Mapping, MappingAdapter } from '../../mapping-models/mappingAdapter.mod import { PackageCreationUtils } from '../../package-creation.utils'; import { JsonConvert, Any } from 'json2typescript'; import { ToastrService } from 'ngx-toastr'; -import { Router, ActivatedRoute } from '@angular/router'; +import { ActivatedRoute } from '@angular/router'; import { SharedService } from '../shared-service'; +declare var $: any; @Component({ selector: 'app-templ-mapp-creation', @@ -178,6 +179,9 @@ export class TemplMappCreationComponent implements OnInit, OnDestroy { } } } + removeFile(index) { + this.uploadedFiles.splice(index, 1); + } uploadFile() { this.dependancies.clear(); @@ -187,6 +191,9 @@ export class TemplMappCreationComponent implements OnInit, OnDestroy { } else { this.setTemplateFilesToStore(); } + $('.btn-cancel').click(); + + } fetchCSVkeys() { -- cgit 1.2.3-korg