diff options
Diffstat (limited to 'cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions-attribute')
3 files changed, 14 insertions, 9 deletions
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions-attribute/functions-attribute.component.css b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions-attribute/functions-attribute.component.css index 10ed56b55..1159d8f80 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions-attribute/functions-attribute.component.css +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions-attribute/functions-attribute.component.css @@ -1,3 +1,3 @@ .createAttributeTabs .active { - background: #eaeaea; + background: #C3CDDB; }
\ No newline at end of file diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions-attribute/functions-attribute.component.html b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions-attribute/functions-attribute.component.html index ea17f888d..ded7e5f23 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions-attribute/functions-attribute.component.html +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions-attribute/functions-attribute.component.html @@ -73,9 +73,10 @@ Template</label> </div> <br /> - <button type="button" data-toggle="modal" data-target="#templateModal" - class="btn btn-select-template m-auto"><i class="icon-add-circle" - type="button" aria-hidden="true"></i> Select Template</button> + <button (click)="init()" type="button" data-toggle="modal" + data-target="#templateModal" class="btn btn-select-template m-auto"><i + class="icon-add-circle" type="button" aria-hidden="true"></i> Select + Template</button> </div> <div class="attribute-wrap" @@ -235,9 +236,9 @@ </div> <div class="modal-footer"> - <button type="button" class="btn btn-secondary" (click)="cancel()" data-dismiss="modal">Close</button> - <button type="button" class="btn btn-primary" data-dismiss="modal" (click)="addTemplates()">Add - Template</button> + <button type="button" class="btn btn-secondary" (click)="cancel()" data-dismiss="modal">Cancel</button> + <button type="button" class="btn btn-primary" data-dismiss="modal" + (click)="addTemplates()">Save</button> </div> </div> </div> diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions-attribute/functions-attribute.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions-attribute/functions-attribute.component.ts index d36b16f16..f46004b0b 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions-attribute/functions-attribute.component.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions-attribute/functions-attribute.component.ts @@ -99,7 +99,7 @@ export class FunctionsAttributeComponent implements OnInit, OnDestroy { onInitMapping() { // selectedTemplates , templateAndMappingMap - this.selectedTemplates = new Map<string, TemplateAndMapping>(); + // this.selectedTemplates = new Map<string, TemplateAndMapping>(); try { const functionMap = this.designerState.template.node_templates[this.functionName].artifacts; console.log(this.templateAndMappingMap); @@ -117,6 +117,10 @@ export class FunctionsAttributeComponent implements OnInit, OnDestroy { } catch (e) { } } + init() { + this.selectedTemplates = new Map(this.finalTemplates); + } + toNodeProcess(nodeTemplate, functionName) { console.log(nodeTemplate); this.currentFuncion['instance-name'] = functionName; @@ -156,7 +160,7 @@ export class FunctionsAttributeComponent implements OnInit, OnDestroy { } addTemplates() { - this.finalTemplates = this.selectedTemplates; + this.finalTemplates = new Map(this.selectedTemplates); } cancel() { this.selectedTemplates = new Map<string, TemplateAndMapping>(); |