diff options
author | 2020-12-15 16:58:27 +0200 | |
---|---|---|
committer | 2020-12-15 17:09:01 +0200 | |
commit | 704f42ac8dbca2a1c261f320cfd4ed8089eaf1db (patch) | |
tree | d02047c955162fbef18f37402d8364366262f7e3 /cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/scripts-tab/scripts-tab.component.ts | |
parent | 981573b5b00cdb47cd9f2bbd002735ccc0c362fc (diff) |
Fixing script text editor window that closes suddenly
Issue-ID: CCSDK-3049
Signed-off-by: Eltanany Shaaban <shaaban.eltanany.ext@orange.com>
Change-Id: I7923bab06244346dff83c05acd12f05d4f1e2350
Diffstat (limited to 'cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/scripts-tab/scripts-tab.component.ts')
-rw-r--r-- | cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/scripts-tab/scripts-tab.component.ts | 14 |
1 files changed, 10 insertions, 4 deletions
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 2653d739c..fb275a04a 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 @@ -1,8 +1,10 @@ -import { Component, OnInit } from '@angular/core'; -import { FileSystemFileEntry, NgxFileDropEntry } from 'ngx-file-drop'; -import { PackageCreationStore } from '../package-creation.store'; +import {Component, OnInit} from '@angular/core'; +import {FileSystemFileEntry, NgxFileDropEntry} from 'ngx-file-drop'; +import {PackageCreationStore} from '../package-creation.store'; import 'ace-builds/src-noconflict/ace'; import 'ace-builds/webpack-resolver'; +import {ToastrService} from 'ngx-toastr'; + declare var $: any; @Component({ @@ -20,7 +22,9 @@ export class ScriptsTabComponent implements OnInit { constructor( private packageCreationStore: PackageCreationStore, - ) { } + private toastService: ToastrService + ) { + } ngOnInit() { @@ -53,6 +57,7 @@ export class ScriptsTabComponent implements OnInit { initDelete(file) { this.fileToDelete = file; } + removeFile(filePath: string, FileIndex: number) { const filename = filePath.split('/')[2] || ''; // const filename = 'Scripts/' + this.getFileType(this.uploadedFiles[fileIndex].name) + '/' + this.uploadedFiles[fileIndex].name; @@ -107,6 +112,7 @@ export class ScriptsTabComponent implements OnInit { textChanges(code: any, key: string) { this.packageCreationStore.addScripts(key, code); + this.toastService.success(key + ' is updated successfully'); } changeDivShow(mapIndex: number) { |