From 1614945185a9ee46911ef2cbacf84816e806f8dd Mon Sep 17 00:00:00 2001 From: Kristan Ntavidi Date: Thu, 4 Feb 2021 10:33:03 +0200 Subject: [PATCH] More Dataset Profile editor changes --- .../dataset-profile-editor.component.html | 23 ++- .../dataset-profile-editor.component.ts | 139 +++++++++++++++++- .../table-of-contents-entry.ts | 7 + .../table-of-contents/table-of-contents.html | 6 +- .../table-of-contents/table-of-contents.ts | 16 ++ 5 files changed, 183 insertions(+), 8 deletions(-) diff --git a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/dataset-profile-editor.component.html b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/dataset-profile-editor.component.html index d9e634bd7..b0be33e63 100644 --- a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/dataset-profile-editor.component.html +++ b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/dataset-profile-editor.component.html @@ -69,10 +69,29 @@ {{'DATASET-PROFILE-EDITOR.STEPS.FORM.TITLE' | translate}}
- +
- - - {{link.label}} - + + {{link.label}} +
diff --git a/dmp-frontend/src/app/ui/admin/dataset-profile/table-of-contents/table-of-contents.ts b/dmp-frontend/src/app/ui/admin/dataset-profile/table-of-contents/table-of-contents.ts index ec6160e56..00981444a 100644 --- a/dmp-frontend/src/app/ui/admin/dataset-profile/table-of-contents/table-of-contents.ts +++ b/dmp-frontend/src/app/ui/admin/dataset-profile/table-of-contents/table-of-contents.ts @@ -36,6 +36,10 @@ export class DatasetProfileTableOfContents extends BaseComponent implements OnIn headerSelectors = '.toc-page-header, .toc-section-header, .toc-compositeField-header'; @Output() stepFound = new EventEmitter(); @Output() currentLinks = new EventEmitter(); + + @Output() itemClick = new EventEmitter(); + + subscription: Subscription; linksSubject: Subject = new Subject(); @@ -159,6 +163,18 @@ export class DatasetProfileTableOfContents extends BaseComponent implements OnIn // return +link.id.split("_", 2)[1]; // } + + itemClicked(item: ToCEntry){ + //leaf node + this.itemClick.emit([item]); + } + + propagateClickToParent(childIds:ToCEntry[], currentItem: ToCEntry){ + childIds.push(currentItem); + this.itemClick.emit(childIds); + } + + } export interface LinkToScroll {