diff options
author | 2020-02-24 13:39:41 +0200 | |
---|---|---|
committer | 2020-02-24 16:41:23 +0200 | |
commit | 568ff4d867dd09c087246fe7cc343c1d581e6255 (patch) | |
tree | ff70f61d97df41e24a8bd7db5cf786d9bf31868a /cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/scripts-tab | |
parent | 488047494da258c07c723fdd378c5092005613c6 (diff) |
enable source code editing and adding viewing feature
Issue-ID: CCSDK-2113
Signed-off-by: shaaban Altanany <shaaban.eltanany.ext@orange.com>
Change-Id: Ic7643841afe21bfacc130908d6c851519b399acd
Diffstat (limited to 'cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/scripts-tab')
2 files changed, 10 insertions, 6 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 824152035..54491488e 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 @@ -30,7 +30,7 @@ <div [attr.aria-labelledby]="'head-script-'+mapIndex" [id]="'id-script-'+mapIndex" class="collapse" data-parent="#accordion-script"> <div class="card-body"> - <ace-editor [(text)]="file.value" [mode]="'kotlin'" [autoUpdateContent]="true" + <ace-editor [(text)]="file.value" (textChange)="textChanges($event,file.key)" [mode]="'kotlin'" [autoUpdateContent]="true" [durationBeforeCallback]="1000" [theme]="'tomorrow_night_bright'" #editor style="height:300px;"> </ace-editor> @@ -91,4 +91,4 @@ </div> </div> </div> -</div>
\ No newline at end of file +</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 eee291bba..c70109fc5 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,7 +1,7 @@ -import { Component, OnInit } from '@angular/core'; -import { FileSystemFileEntry, NgxFileDropEntry } from 'ngx-file-drop'; -import { PackageCreationStore } from '../package-creation.store'; -import { PackageCreationUtils } from '../package-creation.utils'; +import {Component, OnInit} from '@angular/core'; +import {FileSystemFileEntry, NgxFileDropEntry} from 'ngx-file-drop'; +import {PackageCreationStore} from '../package-creation.store'; +import {PackageCreationUtils} from '../package-creation.utils'; import 'ace-builds/src-noconflict/ace'; import 'ace-builds/webpack-resolver'; @@ -76,4 +76,8 @@ export class ScriptsTabComponent implements OnInit { resetTheUploadedFiles() { this.uploadedFiles = []; } + + textChanges(code: any, key: string) { + this.packageCreationStore.addScripts(key, code); + } } |