diff options
author | KAPIL SINGAL <ks220y@att.com> | 2020-08-31 12:45:32 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-08-31 12:45:32 +0000 |
commit | e09de1f851ba53c9ee30a2f32e947bb79e124de5 (patch) | |
tree | 89afbf00f265490959c73ec04c2dd150fa5e593f /cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation | |
parent | ac64cf38079f88ceb8c172b9e25152955dbe4366 (diff) | |
parent | e78a071a0f9a530e98bcc73b4ad31097fe053e81 (diff) |
Merge "fixing metadata at editing package"
Diffstat (limited to 'cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation')
2 files changed, 15 insertions, 5 deletions
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 fc001b11b..48d4dd57f 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 @@ -36,7 +36,7 @@ <div class="nav nav-tabs " id="nav-tab" role="tablist"> <a class="nav-item nav-link active" id="nav-metadata-tab" data-toggle="tab" href="#nav-metadata" role="tab" aria-controls="nav-metadata" aria-selected="false" - autofocus #nameit (focusout)="test()">METADATA</a> + autofocus #nameit (focusout)="saveMetaData()" [classList]="metadataClasses">METADATA</a> <a class="nav-item nav-link" id="nav-template-tab" data-toggle="tab" href="#nav-template" role="tab" aria-controls="nav-template" aria-selected="false">TEMPLATE & MAPPING</a> <a class="nav-item nav-link" id="nav-scripts-tab" data-toggle="tab" href="#nav-scripts" @@ -53,7 +53,7 @@ <div class="row mt-4"> <div class="col"> <div class="tab-content" id="nav-tabContent"> - <div class="tab-pane fade show active" id="nav-metadata" role="tabpanel" + <div class="tab-pane fade show active" id="nav-metadata" role="tabpanel" aria-labelledby="nav-metadata-tab"> <app-metadata-tab></app-metadata-tab> </div> diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.component.ts index bba45c810..e91313b2e 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.component.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.component.ts @@ -67,6 +67,7 @@ export class PackageCreationComponent implements OnInit { @ViewChild('nameit', {static: true}) elementRef: ElementRef; versionPattern = '^(\\d+\\.)?(\\d+\\.)?(\\*|\\d+)$'; + metadataClasses = 'nav-item nav-link active complete'; ngOnInit() { this.elementRef.nativeElement.focus(); @@ -76,8 +77,14 @@ export class PackageCreationComponent implements OnInit { && cbaPackage.metaData.name && cbaPackage.metaData.version && regexp.test(cbaPackage.metaData.version)) { this.isSaveEnabled = true; + if (!this.metadataClasses.includes('complete')) { + console.log('added'); + this.metadataClasses += 'complete'; + } + console.log('perhaps it is been added'); } else { this.isSaveEnabled = false; + this.metadataClasses = this.metadataClasses.replace('complete', ''); } }); } @@ -127,11 +134,14 @@ export class PackageCreationComponent implements OnInit { } - test() { - this.metadataTabComponent.saveMetaDataToStore(); - } goBackToDashBorad() { this.router.navigate(['/packages']); } + + saveMetaData() { + console.log('executed change'); + this.metadataTabComponent.saveMetaDataToStore(); + + } } |