diff options
author | 2020-04-09 12:44:24 +0000 | |
---|---|---|
committer | 2020-04-09 12:44:24 +0000 | |
commit | 6eed7abf47a41bdf28005d4aafdfc0bae4831d3a (patch) | |
tree | 20d1f536db8ffbe8195fabc4ee68c7fa77203a32 /cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/imports-tab/imports-tab.component.ts | |
parent | 54974ab95489cbe6a6e13078459f68d982601d47 (diff) | |
parent | 053de4277d61ee49dbcfe47a6c2fee4c97544712 (diff) |
Merge "Fixing All Accordion panels is only open and not closed"
Diffstat (limited to 'cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/imports-tab/imports-tab.component.ts')
-rw-r--r-- | cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/imports-tab/imports-tab.component.ts | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/imports-tab/imports-tab.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/imports-tab/imports-tab.component.ts index dc0cf7f3b..3b9d38c1a 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/imports-tab/imports-tab.component.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/imports-tab/imports-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'; @Component({ @@ -19,6 +19,7 @@ export class ImportsTabComponent implements OnInit { constructor(private packageCreationStore: PackageCreationStore, private packageCreationUtils: PackageCreationUtils) { } + ngOnInit(): void { this.packageCreationStore.state$.subscribe(cbaPackage => { if (cbaPackage.definitions && cbaPackage.definitions.imports && cbaPackage.definitions.imports.size > 0) { @@ -76,4 +77,14 @@ export class ImportsTabComponent implements OnInit { textChanges(code: any, key: string) { this.packageCreationStore.addDefinition(key, code); } + + changeDivShow(mapIndex: number) { + const divElement = document.getElementById('id-' + mapIndex) as HTMLElement; + if (divElement.getAttribute('class').includes('show')) { + divElement.setAttribute('class', 'collapse'); + } else { + divElement.setAttribute('class', 'collapse show'); + } + console.log(divElement.getAttribute('class')); + } } |