- clear + clear

{{'DASHBOARD.DMP-ABOUT-BEG' | translate}} {{'DASHBOARD.DATASET-DESCRIPTIONS' | translate}} @@ -104,7 +104,7 @@

- clear + clear

{{'DASHBOARD.TITLE' | translate}}

{{'DASHBOARD.INFO-TEXT' | translate}}

diff --git a/dmp-frontend/src/app/ui/dashboard/dashboard.component.scss b/dmp-frontend/src/app/ui/dashboard/dashboard.component.scss index 013a6bdd8..764ac28fc 100644 --- a/dmp-frontend/src/app/ui/dashboard/dashboard.component.scss +++ b/dmp-frontend/src/app/ui/dashboard/dashboard.component.scss @@ -49,6 +49,14 @@ .clear-icon { cursor: pointer; + color: #212121; + padding: 0.4rem; +} + +.clear-icon:hover { + background-color: #ececec !important; + border-radius: 50%; + padding: 0.4rem; } .normal-btn { diff --git a/dmp-frontend/src/app/ui/dataset/listing/criteria/dataset-criteria-dialogue/dataset-criteria-dialog.component.html b/dmp-frontend/src/app/ui/dataset/listing/criteria/dataset-criteria-dialogue/dataset-criteria-dialog.component.html index 61787906e..167a8da14 100644 --- a/dmp-frontend/src/app/ui/dataset/listing/criteria/dataset-criteria-dialogue/dataset-criteria-dialog.component.html +++ b/dmp-frontend/src/app/ui/dataset/listing/criteria/dataset-criteria-dialogue/dataset-criteria-dialog.component.html @@ -1,2 +1,2 @@ -clear +clear diff --git a/dmp-frontend/src/app/ui/dataset/listing/criteria/dataset-criteria-dialogue/dataset-criteria-dialog.component.scss b/dmp-frontend/src/app/ui/dataset/listing/criteria/dataset-criteria-dialogue/dataset-criteria-dialog.component.scss index 1d5108761..362c44bc3 100644 --- a/dmp-frontend/src/app/ui/dataset/listing/criteria/dataset-criteria-dialogue/dataset-criteria-dialog.component.scss +++ b/dmp-frontend/src/app/ui/dataset/listing/criteria/dataset-criteria-dialogue/dataset-criteria-dialog.component.scss @@ -1,3 +1,15 @@ +.clear-icon { + cursor: pointer; + color: #212121; + padding: 0.4rem; +} + +.clear-icon:hover { + background-color: #ececec !important; + border-radius: 50%; + padding: 0.4rem; +} + ::ng-deep .mat-form-field-wrapper { background-color: white !important; padding-bottom: 0 !important; diff --git a/dmp-frontend/src/app/ui/dataset/listing/dataset-listing.component.scss b/dmp-frontend/src/app/ui/dataset/listing/dataset-listing.component.scss index e278122ed..8f2734609 100644 --- a/dmp-frontend/src/app/ui/dataset/listing/dataset-listing.component.scss +++ b/dmp-frontend/src/app/ui/dataset/listing/dataset-listing.component.scss @@ -86,7 +86,15 @@ } .clear-icon { - cursor: pointer; + cursor: pointer; + color: #212121; + padding: 0.4rem; +} + +.clear-icon:hover { + background-color: #ececec !important; + border-radius: 50%; + padding: 0.4rem; } .normal-btn { diff --git a/dmp-frontend/src/app/ui/dmp/listing/criteria/dmp-criteria-dialog.component.html b/dmp-frontend/src/app/ui/dmp/listing/criteria/dmp-criteria-dialog.component.html index 8646ab950..b38f8336c 100644 --- a/dmp-frontend/src/app/ui/dmp/listing/criteria/dmp-criteria-dialog.component.html +++ b/dmp-frontend/src/app/ui/dmp/listing/criteria/dmp-criteria-dialog.component.html @@ -1,2 +1,2 @@ -clear +clear diff --git a/dmp-frontend/src/app/ui/dmp/listing/criteria/dmp-criteria-dialog.component.scss b/dmp-frontend/src/app/ui/dmp/listing/criteria/dmp-criteria-dialog.component.scss new file mode 100644 index 000000000..818303e45 --- /dev/null +++ b/dmp-frontend/src/app/ui/dmp/listing/criteria/dmp-criteria-dialog.component.scss @@ -0,0 +1,11 @@ +.clear-icon { + cursor: pointer; + color: #212121; + padding: 0.4rem; +} + +.clear-icon:hover { + background-color: #ececec !important; + border-radius: 50%; + padding: 0.4rem; +} diff --git a/dmp-frontend/src/app/ui/dmp/listing/criteria/dmp-criteria-dialog.component.ts b/dmp-frontend/src/app/ui/dmp/listing/criteria/dmp-criteria-dialog.component.ts index c835030f6..8c895d812 100644 --- a/dmp-frontend/src/app/ui/dmp/listing/criteria/dmp-criteria-dialog.component.ts +++ b/dmp-frontend/src/app/ui/dmp/listing/criteria/dmp-criteria-dialog.component.ts @@ -7,6 +7,7 @@ import { FormGroup } from '@angular/forms'; @Component({ selector: 'dmp-criteria-dialog-component', templateUrl: './dmp-criteria-dialog.component.html', + styleUrls: ['./dmp-criteria-dialog.component.scss'] }) export class DmpCriteriaDialogComponent implements OnInit { diff --git a/dmp-frontend/src/app/ui/dmp/listing/dmp-listing.component.scss b/dmp-frontend/src/app/ui/dmp/listing/dmp-listing.component.scss index 63ac32fd7..6c5f839cb 100644 --- a/dmp-frontend/src/app/ui/dmp/listing/dmp-listing.component.scss +++ b/dmp-frontend/src/app/ui/dmp/listing/dmp-listing.component.scss @@ -148,7 +148,15 @@ } .clear-icon { - cursor: pointer; + cursor: pointer; + color: #212121; + padding: 0.4rem; +} + +.clear-icon:hover { + background-color: #ececec !important; + border-radius: 50%; + padding: 0.4rem; } .normal-btn { diff --git a/dmp-frontend/src/app/ui/user-profile/user-profile.component.scss b/dmp-frontend/src/app/ui/user-profile/user-profile.component.scss index 5f8c2e9f8..462ec45e8 100644 --- a/dmp-frontend/src/app/ui/user-profile/user-profile.component.scss +++ b/dmp-frontend/src/app/ui/user-profile/user-profile.component.scss @@ -147,11 +147,18 @@ .check-icon { color: #129d99; transform: scale(0.75); + padding: 0.4rem; } .clear-icon { - color: #f16868; cursor: pointer; + color: #212121; + padding: 0.4rem; +} + +.clear-icon:hover { + background-color: #ececec !important; + border-radius: 50%; } .add-new-btn { From aa35725823513928593f0a2e0b332277cf5c1cdb Mon Sep 17 00:00:00 2001 From: apapachristou Date: Fri, 6 Nov 2020 11:00:19 +0200 Subject: [PATCH 2/6] Fixes profile/login menu on mobile mode --- .../src/app/ui/navbar/navbar.component.html | 20 ++++++++++++------- .../src/app/ui/navbar/navbar.component.ts | 6 +++--- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/dmp-frontend/src/app/ui/navbar/navbar.component.html b/dmp-frontend/src/app/ui/navbar/navbar.component.html index d1581031c..9d8cab229 100644 --- a/dmp-frontend/src/app/ui/navbar/navbar.component.html +++ b/dmp-frontend/src/app/ui/navbar/navbar.component.html @@ -8,9 +8,14 @@
- diff --git a/dmp-frontend/src/app/ui/navbar/navbar.component.ts b/dmp-frontend/src/app/ui/navbar/navbar.component.ts index 3462306ce..2f68bfbbf 100644 --- a/dmp-frontend/src/app/ui/navbar/navbar.component.ts +++ b/dmp-frontend/src/app/ui/navbar/navbar.component.ts @@ -37,7 +37,7 @@ export class NavbarComponent extends BaseComponent implements OnInit { selectedLanguage = 'en'; private user: UserListingModel; @Output() sidebarToggled: EventEmitter = new EventEmitter(); - @ViewChild(MatMenuTrigger, {static: false}) trigger: MatMenuTrigger; + @ViewChild(MatMenuTrigger, { static: false }) trigger: MatMenuTrigger; constructor(location: Location, private element: ElementRef, @@ -86,11 +86,11 @@ export class NavbarComponent extends BaseComponent implements OnInit { openMyMenu() { this.trigger.openMenu(); - } + } closeMyMenu() { this.trigger.closeMenu(); - } + } sidebarOpen() { const toggleButton = this.toggleButton; From 2313cd1ca54a25b2189aaf31c20c7fbc0aeb0169 Mon Sep 17 00:00:00 2001 From: apapachristou Date: Fri, 6 Nov 2020 11:05:05 +0200 Subject: [PATCH 3/6] Fixes align of icons on listing card items --- .../src/app/ui/dashboard/dashboard.component.scss | 12 ++++++++++++ .../src/app/ui/dashboard/drafts/drafts.component.css | 1 + .../recent-edited-activity.component.css | 10 ++++++++++ .../recent-edited-dataset-activity.component.scss | 12 ++++++++++++ .../recent-edited-dmp-activity.component.css | 1 + .../listing-item/dataset-listing-item.component.scss | 12 ++++++++++++ .../listing-item/dmp-listing-item.component.scss | 12 +++++++++++- 7 files changed, 59 insertions(+), 1 deletion(-) diff --git a/dmp-frontend/src/app/ui/dashboard/dashboard.component.scss b/dmp-frontend/src/app/ui/dashboard/dashboard.component.scss index 764ac28fc..4fac12c82 100644 --- a/dmp-frontend/src/app/ui/dashboard/dashboard.component.scss +++ b/dmp-frontend/src/app/ui/dashboard/dashboard.component.scss @@ -260,9 +260,21 @@ input[type="text"] { .icon-align { display: inline-flex; vertical-align: middle; + // line-height: .9em; // padding-bottom: 0.4rem; } +.dmp-subtitle, +.dataset-subtitle { + + .icon-align { + display: inline-flex; + vertical-align: top; + margin-right: .2rem; + line-height: .95em; + } +} + .dataset-card-actions, .dmp-card-actions { display: flex; diff --git a/dmp-frontend/src/app/ui/dashboard/drafts/drafts.component.css b/dmp-frontend/src/app/ui/dashboard/drafts/drafts.component.css index 367d34d2d..bb8b7ba9f 100644 --- a/dmp-frontend/src/app/ui/dashboard/drafts/drafts.component.css +++ b/dmp-frontend/src/app/ui/dashboard/drafts/drafts.component.css @@ -109,6 +109,7 @@ input[type="text"] { .icon-align { display: inline-flex; vertical-align: middle; + /* line-height: .9em; */ /* padding-bottom: 0.4rem; */ } diff --git a/dmp-frontend/src/app/ui/dashboard/recent-edited-activity/recent-edited-activity.component.css b/dmp-frontend/src/app/ui/dashboard/recent-edited-activity/recent-edited-activity.component.css index 0dfd290a9..a25ff592b 100644 --- a/dmp-frontend/src/app/ui/dashboard/recent-edited-activity/recent-edited-activity.component.css +++ b/dmp-frontend/src/app/ui/dashboard/recent-edited-activity/recent-edited-activity.component.css @@ -109,6 +109,7 @@ input[type="text"] { .icon-align { display: inline-flex; vertical-align: middle; + /* line-height: .9em; */ /* padding-bottom: 0.4rem; */ } @@ -121,6 +122,15 @@ input[type="text"] { color: #848484; } +.dataset-card-actions, +.dmp-card-actions { + display: flex; + flex-direction: row; + border-top: 1px solid #dbdbdb; + line-height: 4; + color: #848484; +} + .dataset-card-actions a, .dmp-card-actions a { color: #848484 !important; diff --git a/dmp-frontend/src/app/ui/dashboard/recent-edited-dataset-activity/recent-edited-dataset-activity.component.scss b/dmp-frontend/src/app/ui/dashboard/recent-edited-dataset-activity/recent-edited-dataset-activity.component.scss index 824385784..ff803031c 100644 --- a/dmp-frontend/src/app/ui/dashboard/recent-edited-dataset-activity/recent-edited-dataset-activity.component.scss +++ b/dmp-frontend/src/app/ui/dashboard/recent-edited-dataset-activity/recent-edited-dataset-activity.component.scss @@ -109,9 +109,21 @@ input[type="text"] { .icon-align { display: inline-flex; vertical-align: middle; + // line-height: .9em; // padding-bottom: 0.4rem; } +.dmp-subtitle, +.dataset-subtitle { + + .icon-align { + display: inline-flex; + vertical-align: top; + margin-right: .2rem; + line-height: .95em; + } +} + .dataset-card-actions, .dmp-card-actions { display: flex; diff --git a/dmp-frontend/src/app/ui/dashboard/recent-edited-dmp-activity/recent-edited-dmp-activity.component.css b/dmp-frontend/src/app/ui/dashboard/recent-edited-dmp-activity/recent-edited-dmp-activity.component.css index a088379d8..c046cc2db 100644 --- a/dmp-frontend/src/app/ui/dashboard/recent-edited-dmp-activity/recent-edited-dmp-activity.component.css +++ b/dmp-frontend/src/app/ui/dashboard/recent-edited-dmp-activity/recent-edited-dmp-activity.component.css @@ -105,6 +105,7 @@ input[type="text"] { .icon-align { display: inline-flex; vertical-align: middle; + /* line-height: .9em; */ /* padding-bottom: 0.4rem; */ } diff --git a/dmp-frontend/src/app/ui/dataset/listing/listing-item/dataset-listing-item.component.scss b/dmp-frontend/src/app/ui/dataset/listing/listing-item/dataset-listing-item.component.scss index 1fab045f4..e646e211c 100644 --- a/dmp-frontend/src/app/ui/dataset/listing/listing-item/dataset-listing-item.component.scss +++ b/dmp-frontend/src/app/ui/dataset/listing/listing-item/dataset-listing-item.component.scss @@ -177,9 +177,21 @@ input[type="text"] { .icon-align { display: inline-flex; vertical-align: middle; + // line-height: .9em; // padding-bottom: 0.4rem; } +.dmp-subtitle, +.dataset-subtitle { + + .icon-align { + display: inline-flex; + vertical-align: top; + margin-right: .2rem; + line-height: .95em; + } +} + .dataset-card-actions, .dmp-card-actions { display: flex; diff --git a/dmp-frontend/src/app/ui/dmp/listing/listing-item/dmp-listing-item.component.scss b/dmp-frontend/src/app/ui/dmp/listing/listing-item/dmp-listing-item.component.scss index 61ce2a8bf..5fa60b06f 100644 --- a/dmp-frontend/src/app/ui/dmp/listing/listing-item/dmp-listing-item.component.scss +++ b/dmp-frontend/src/app/ui/dmp/listing/listing-item/dmp-listing-item.component.scss @@ -210,7 +210,17 @@ input[type="text"] { .icon-align { display: inline-flex; vertical-align: middle; - // padding-bottom: 0.4rem; +} + +.dmp-subtitle, +.dataset-subtitle { + + .icon-align { + display: inline-flex; + vertical-align: top; + margin-right: .2rem; + line-height: .95em; + } } .dataset-card-actions, From 0bd5afffe16fdb7a11d319750670e4ac4b4e471a Mon Sep 17 00:00:00 2001 From: apapachristou Date: Fri, 6 Nov 2020 12:42:31 +0200 Subject: [PATCH 4/6] Fix: on save of datset, table of contents remains open --- .../dataset-wizard.component.html | 4 +- .../dataset-wizard.component.ts | 10 +- .../app/ui/dmp/clone/dmp-clone.component.html | 2 +- .../ui/dmp/editor/dmp-editor.component.html | 2 +- .../table-of-contents.ts | 122 +++++++++--------- 5 files changed, 74 insertions(+), 66 deletions(-) diff --git a/dmp-frontend/src/app/ui/dataset/dataset-wizard/dataset-wizard.component.html b/dmp-frontend/src/app/ui/dataset/dataset-wizard/dataset-wizard.component.html index 8dc190b30..49943f639 100644 --- a/dmp-frontend/src/app/ui/dataset/dataset-wizard/dataset-wizard.component.html +++ b/dmp-frontend/src/app/ui/dataset/dataset-wizard/dataset-wizard.component.html @@ -48,13 +48,13 @@
{{'DATASET-LISTING.TOOLTIP.DMP' | translate}}
{{'DMP-EDITOR.STEPPER.USER-GUIDE' | translate}}
-
+
0. {{'DMP-EDITOR.STEPPER.MAIN-INFO' | translate}} (2)
0. {{'DMP-EDITOR.STEPPER.MAIN-INFO' | translate}} (done)
- +
diff --git a/dmp-frontend/src/app/ui/dataset/dataset-wizard/dataset-wizard.component.ts b/dmp-frontend/src/app/ui/dataset/dataset-wizard/dataset-wizard.component.ts index ea706d349..f3880736e 100644 --- a/dmp-frontend/src/app/ui/dataset/dataset-wizard/dataset-wizard.component.ts +++ b/dmp-frontend/src/app/ui/dataset/dataset-wizard/dataset-wizard.component.ts @@ -23,7 +23,7 @@ import { DatasetWizardEditorModel } from '@app/ui/dataset/dataset-wizard/dataset import { BreadcrumbItem } from '@app/ui/misc/breadcrumb/definition/breadcrumb-item'; import { IBreadCrumbComponent } from '@app/ui/misc/breadcrumb/definition/IBreadCrumbComponent'; import { DatasetDescriptionFormEditorModel } from '@app/ui/misc/dataset-description-form/dataset-description-form.model'; -import { LinkToScroll } from '@app/ui/misc/dataset-description-form/tableOfContentsMaterial/table-of-contents'; +import { Link, LinkToScroll } from '@app/ui/misc/dataset-description-form/tableOfContentsMaterial/table-of-contents'; import { BaseComponent } from '@common/base/base.component'; import { FormService } from '@common/forms/form-service'; import { FormValidationErrorsDialogComponent } from '@common/forms/form-validation-errors-dialog/form-validation-errors-dialog.component'; @@ -85,6 +85,8 @@ export class DatasetWizardComponent extends BaseComponent implements OnInit, IBr datasetSavedLinks: any = null; scrollTop: number; + tocScrollTop: number; + links: Link[] = []; constructor( private datasetWizardService: DatasetWizardService, @@ -548,6 +550,7 @@ export class DatasetWizardComponent extends BaseComponent implements OnInit, IBr submit(saveType?: SaveType) { this.scrollTop = document.getElementById('dataset-editor-form').scrollTop; + this.tocScrollTop = document.getElementById('stepper-options').scrollTop; this.datasetWizardService.createDataset(this.formGroup.getRawValue()) .pipe(takeUntil(this._destroyed)) .subscribe( @@ -657,6 +660,7 @@ export class DatasetWizardComponent extends BaseComponent implements OnInit, IBr setTimeout(() => { document.getElementById('dataset-editor-form').scrollTop = this.scrollTop; + document.getElementById('stepper-options').scrollTop = this.tocScrollTop; }, 500); // this.router.navigate(['/reload']).then(() => { this.router.navigate(['/datasets', 'edit', data.id]); }); @@ -916,7 +920,7 @@ export class DatasetWizardComponent extends BaseComponent implements OnInit, IBr return this.formGroup.get('label') && this.formGroup.get('label').valid && this.formGroup.get('profile') && this.formGroup.get('profile').valid; } - onLinksInit(event) { - this.datasetSavedLinks = event; + getLinks(currentLinks: Link[]) { + this.links = currentLinks; } } diff --git a/dmp-frontend/src/app/ui/dmp/clone/dmp-clone.component.html b/dmp-frontend/src/app/ui/dmp/clone/dmp-clone.component.html index d98386bf5..c87df1925 100644 --- a/dmp-frontend/src/app/ui/dmp/clone/dmp-clone.component.html +++ b/dmp-frontend/src/app/ui/dmp/clone/dmp-clone.component.html @@ -60,7 +60,7 @@
{{'DMP-EDITOR.STEPPER.USER-GUIDE' | translate}}
-
+
  1. {{'DMP-EDITOR.STEPPER.MAIN-INFO' | translate}} (4)
  2. {{'DMP-EDITOR.STEPPER.FUNDING-INFO' | translate}} (3)
  3. diff --git a/dmp-frontend/src/app/ui/dmp/editor/dmp-editor.component.html b/dmp-frontend/src/app/ui/dmp/editor/dmp-editor.component.html index 94c168100..ea6fc8b49 100644 --- a/dmp-frontend/src/app/ui/dmp/editor/dmp-editor.component.html +++ b/dmp-frontend/src/app/ui/dmp/editor/dmp-editor.component.html @@ -31,7 +31,7 @@
    {{'DMP-EDITOR.STEPPER.USER-GUIDE' | translate}}
    -
    +
    1. {{'DMP-EDITOR.STEPPER.MAIN-INFO' | translate}} (1)
    2. {{'DMP-EDITOR.STEPPER.MAIN-INFO' | translate}} (done)
    3. diff --git a/dmp-frontend/src/app/ui/misc/dataset-description-form/tableOfContentsMaterial/table-of-contents.ts b/dmp-frontend/src/app/ui/misc/dataset-description-form/tableOfContentsMaterial/table-of-contents.ts index 873d3023d..917a80f55 100644 --- a/dmp-frontend/src/app/ui/misc/dataset-description-form/tableOfContentsMaterial/table-of-contents.ts +++ b/dmp-frontend/src/app/ui/misc/dataset-description-form/tableOfContentsMaterial/table-of-contents.ts @@ -6,7 +6,7 @@ import { distinctUntilChanged } from 'rxjs/operators'; import { type } from 'os'; import { SimpleChanges } from '@angular/core'; -interface Link { +export interface Link { /* id of the section*/ id: string; /* header type h3/h4 */ @@ -30,10 +30,11 @@ interface Link { }) export class TableOfContents extends BaseComponent implements OnInit { - links: Link[] = []; + @Input() links: Link[]; container: string; headerSelectors = '.toc-page-header, .toc-section-header, .toc-compositeField-header'; @Output() stepFound = new EventEmitter(); + @Output() currentLinks = new EventEmitter(); subscription: Subscription; linksSubject: Subject = new Subject(); @@ -54,72 +55,75 @@ export class TableOfContents extends BaseComponent implements OnInit { this.linksSubject.next(headers); }); - this.linksSubject.asObservable() - .pipe(distinctUntilChanged((p: HTMLElement[], q: HTMLElement[]) => JSON.stringify(p) == JSON.stringify(q))) - .subscribe(headers => { - const links: Array = []; + if (!this.links || this.links.length === 0) { + this.linksSubject.asObservable() + .pipe(distinctUntilChanged((p: HTMLElement[], q: HTMLElement[]) => JSON.stringify(p) == JSON.stringify(q))) + .subscribe(headers => { + const links: Array = []; - if (headers.length) { - let page; - let section; - let show - for (const header of headers) { - let name; - let id; - if (header.classList.contains('toc-page-header')) { // deprecated after removing stepper - name = header.innerText.trim().replace(/^link/, ''); - id = header.id; - page = header.id.split('_')[1]; - section = undefined; - show = true; - } else if (header.classList.contains('toc-section-header')) { - name = header.childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[0].nodeValue.trim().replace(/^link/, ''); - id = header.id; - page = header.id.split('.')[1]; - section = header.id; - if (header.id.split('.')[4]) { show = false; } - else { show = true; } - } else if (header.classList.contains('toc-compositeField-header')) { - name = (header.childNodes[0]).nodeValue.trim().replace(/^link/, ''); - id = header.id; - // id = header.parentElement.parentElement.parentElement.id; - show = false; + if (headers.length) { + let page; + let section; + let show + for (const header of headers) { + let name; + let id; + if (header.classList.contains('toc-page-header')) { // deprecated after removing stepper + name = header.innerText.trim().replace(/^link/, ''); + id = header.id; + page = header.id.split('_')[1]; + section = undefined; + show = true; + } else if (header.classList.contains('toc-section-header')) { + name = header.childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[0].nodeValue.trim().replace(/^link/, ''); + id = header.id; + page = header.id.split('.')[1]; + section = header.id; + if (header.id.split('.')[4]) { show = false; } + else { show = true; } + } else if (header.classList.contains('toc-compositeField-header')) { + name = (header.childNodes[0]).nodeValue.trim().replace(/^link/, ''); + id = header.id; + // id = header.parentElement.parentElement.parentElement.id; + show = false; + } + const { top } = header.getBoundingClientRect(); + links.push({ + name, + id, + type: header.tagName.toLowerCase(), + top: top, + active: false, + page: page, + section: section, + show: show, + selected: false + }); } - const { top } = header.getBoundingClientRect(); - links.push({ - name, - id, - type: header.tagName.toLowerCase(), - top: top, - active: false, - page: page, - section: section, - show: show, - selected: false - }); } - } - this.links = links; - // Initialize selected for button next on dataset wizard component editor - this.links.length > 0 ? this.links[0].selected = true : null; - }) + this.links = links; + // Initialize selected for button next on dataset wizard component editor + this.links.length > 0 ? this.links[0].selected = true : null; + }) + } + } ngOnChanges(changes: SimpleChanges) { - if (!this.isActive && this.links && this.links.length > 0) { - this.links.forEach(link => { - link.selected = false; - }) - this.links[0].selected = true; - } + // if (!this.isActive && this.links && this.links.length > 0) { + // this.links.forEach(link => { + // link.selected = false; + // }) + // this.links[0].selected = true; + // } } goToStep(link: Link) { - // this.selectedLinkId = link.id; this.stepFound.emit({ page: link.page, section: link.section }); + this.currentLinks.emit(this.links); setTimeout(() => { const target = document.getElementById(link.id); @@ -133,15 +137,15 @@ export class TableOfContents extends BaseComponent implements OnInit { } toggle(headerLink: Link) { - const headerPage = +headerLink.name.split(" ",1); + const headerPage = +headerLink.name.split(" ", 1); let innerPage; for (const link of this.links) { link.selected = false; if (link.type === 'mat-expansion-panel') { - innerPage = +link.name.split(".",1)[0]; - if(isNaN(innerPage)) { innerPage = +link.name.split(" ",1) } + innerPage = +link.name.split(".", 1)[0]; + if (isNaN(innerPage)) { innerPage = +link.name.split(" ", 1) } } else if (link.type === 'h5') { - innerPage = +link.name.split(".",1)[0]; + innerPage = +link.name.split(".", 1)[0]; } if (headerPage === innerPage && (link.type !== 'mat-expansion-panel' || (link.type === 'mat-expansion-panel' && link.id.split(".")[4]))) { link.show = !link.show; From 3a8d426d22f169d812b249d1888829cffbad72c1 Mon Sep 17 00:00:00 2001 From: apapachristou Date: Fri, 6 Nov 2020 14:21:14 +0200 Subject: [PATCH 5/6] Adds hover on all close buttons --- .../clone/clone-dialog/clone-dialog.component.scss | 11 +++++++---- .../dmp-to-dataset-dialog.component.scss | 9 +++++++++ .../invitation/dmp-invitation-dialog.component.scss | 9 +++++++++ .../start-new-dataset-dialog.component.scss | 9 +++++++++ .../start-new-dmp-dialog.component.scss | 9 +++++++++ 5 files changed, 43 insertions(+), 4 deletions(-) diff --git a/dmp-frontend/src/app/ui/dmp/clone/clone-dialog/clone-dialog.component.scss b/dmp-frontend/src/app/ui/dmp/clone/clone-dialog/clone-dialog.component.scss index fb8628c18..c91ee2322 100644 --- a/dmp-frontend/src/app/ui/dmp/clone/clone-dialog/clone-dialog.component.scss +++ b/dmp-frontend/src/app/ui/dmp/clone/clone-dialog/clone-dialog.component.scss @@ -22,12 +22,15 @@ .close-icon { cursor: pointer; margin-right: 20px; + padding: .4rem; + width: auto !important; + height: auto !important; } - // .close-icon:hover { - // background-color: #ECECED !important; - // border-radius: 50%; - // } + .close-icon:hover { + background-color: #ECECED !important; + border-radius: 50%; + } .cancel-btn { width: 101px; diff --git a/dmp-frontend/src/app/ui/dmp/dmp-to-dataset/dmp-to-dataset-dialog.component.scss b/dmp-frontend/src/app/ui/dmp/dmp-to-dataset/dmp-to-dataset-dialog.component.scss index 14d8d225d..1d5db8b55 100644 --- a/dmp-frontend/src/app/ui/dmp/dmp-to-dataset/dmp-to-dataset-dialog.component.scss +++ b/dmp-frontend/src/app/ui/dmp/dmp-to-dataset/dmp-to-dataset-dialog.component.scss @@ -3,6 +3,15 @@ .close-icon { cursor: pointer; + margin-right: 20px; + padding: .4rem; + width: auto !important; + height: auto !important; +} + +.close-icon:hover { + background-color: #ECECED !important; + border-radius: 50%; } .title { diff --git a/dmp-frontend/src/app/ui/dmp/invitation/dmp-invitation-dialog.component.scss b/dmp-frontend/src/app/ui/dmp/invitation/dmp-invitation-dialog.component.scss index c1fef8cbc..30e3772d8 100644 --- a/dmp-frontend/src/app/ui/dmp/invitation/dmp-invitation-dialog.component.scss +++ b/dmp-frontend/src/app/ui/dmp/invitation/dmp-invitation-dialog.component.scss @@ -6,6 +6,15 @@ .close-icon { cursor: pointer; + // margin-right: 20px; + padding: .4rem; + width: auto !important; + height: auto !important; +} + +.close-icon:hover { + background-color: #ECECED !important; + border-radius: 50%; } .title { diff --git a/dmp-frontend/src/app/ui/dmp/start-new-dataset-dialogue/start-new-dataset-dialog.component.scss b/dmp-frontend/src/app/ui/dmp/start-new-dataset-dialogue/start-new-dataset-dialog.component.scss index 6eff0e1c6..0f1479b22 100644 --- a/dmp-frontend/src/app/ui/dmp/start-new-dataset-dialogue/start-new-dataset-dialog.component.scss +++ b/dmp-frontend/src/app/ui/dmp/start-new-dataset-dialogue/start-new-dataset-dialog.component.scss @@ -14,6 +14,15 @@ .close-icon { cursor: pointer; + // margin-right: 20px; + padding: .4rem; + width: auto !important; + height: auto !important; +} + +.close-icon:hover { + background-color: #ECECED !important; + border-radius: 50%; } .content { diff --git a/dmp-frontend/src/app/ui/dmp/start-new-dmp-dialogue/start-new-dmp-dialog.component.scss b/dmp-frontend/src/app/ui/dmp/start-new-dmp-dialogue/start-new-dmp-dialog.component.scss index bd6a3b0bf..d59032e36 100644 --- a/dmp-frontend/src/app/ui/dmp/start-new-dmp-dialogue/start-new-dmp-dialog.component.scss +++ b/dmp-frontend/src/app/ui/dmp/start-new-dmp-dialogue/start-new-dmp-dialog.component.scss @@ -14,6 +14,15 @@ .close-icon { cursor: pointer; + // margin-right: 20px; + padding: .4rem; + width: auto !important; + height: auto !important; +} + +.close-icon:hover { + background-color: #ECECED !important; + border-radius: 50%; } .content { From 523a551e0a22912e7d888ce5992aa4282612c2e5 Mon Sep 17 00:00:00 2001 From: apapachristou Date: Fri, 6 Nov 2020 14:21:32 +0200 Subject: [PATCH 6/6] with previous commit --- .../form-validation-errors-dialog.component.scss | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dmp-frontend/src/common/forms/form-validation-errors-dialog/form-validation-errors-dialog.component.scss b/dmp-frontend/src/common/forms/form-validation-errors-dialog/form-validation-errors-dialog.component.scss index 71cc68947..d160835c5 100644 --- a/dmp-frontend/src/common/forms/form-validation-errors-dialog/form-validation-errors-dialog.component.scss +++ b/dmp-frontend/src/common/forms/form-validation-errors-dialog/form-validation-errors-dialog.component.scss @@ -10,6 +10,15 @@ .close-icon { cursor: pointer; + // margin-right: 20px; + padding: .4rem; + width: auto !important; + height: auto !important; +} + +.close-icon:hover { + background-color: #ECECED !important; + border-radius: 50%; } .content {