From 704f42ac8dbca2a1c261f320cfd4ed8089eaf1db Mon Sep 17 00:00:00 2001 From: Eltanany Shaaban Date: Tue, 15 Dec 2020 16:58:27 +0200 Subject: Fixing script text editor window that closes suddenly Issue-ID: CCSDK-3049 Signed-off-by: Eltanany Shaaban Change-Id: I7923bab06244346dff83c05acd12f05d4f1e2350 --- .../package-creation.component.html | 4 +- .../scripts-tab/scripts-tab.component.html | 51 ++++++++++++---------- .../scripts-tab/scripts-tab.component.ts | 14 ++++-- .../topology-template.component.html | 2 +- 4 files changed, 40 insertions(+), 31 deletions(-) (limited to 'cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation') diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.component.html b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.component.html index 238906e2b..d188dbfa2 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.component.html +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.component.html @@ -110,9 +110,7 @@ role="tab" aria-controls="nav-imports" aria-selected="false">DEFINITIONS --> EXTERNAL - SYSTEM AUTHENTICATION - PROPERTIES + aria-controls="nav-authentication" aria-selected="false">DSL PROPERTIES 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 5027c5c02..490eef394 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 @@ -5,7 +5,9 @@ Or you can also Import File + data-toggle="modal" + (click)="resetTheUploadedFiles()" + href="#">Import File @@ -21,22 +23,22 @@
+ class="accordion-delete">
+ data-parent="#accordion-script">
+ [autoUpdateContent]="true" [durationBeforeCallback]="5000" [theme]="'eclipse'" + #editor + style="height:300px;">
@@ -73,21 +78,21 @@ 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) { diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/topology-template/topology-template.component.html b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/topology-template/topology-template.component.html index f67364421..fc8abd3c4 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/topology-template/topology-template.component.html +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/topology-template/topology-template.component.html @@ -1,4 +1,4 @@ -

topology-template works!

+