From 49c08f50615bdca182495ea0f71a98f0c8dbdce4 Mon Sep 17 00:00:00 2001 From: apapachristou Date: Wed, 23 Sep 2020 10:21:26 +0300 Subject: [PATCH] Removes stepper from dataset description form --- .../dataset-description.component.scss | 35 ++++++++++++++----- .../dataset-description.component.ts | 16 ++++----- 2 files changed, 34 insertions(+), 17 deletions(-) diff --git a/dmp-frontend/src/app/ui/misc/dataset-description-form/dataset-description.component.scss b/dmp-frontend/src/app/ui/misc/dataset-description-form/dataset-description.component.scss index 8a3eae6ce..b081e1ae7 100644 --- a/dmp-frontend/src/app/ui/misc/dataset-description-form/dataset-description.component.scss +++ b/dmp-frontend/src/app/ui/misc/dataset-description-form/dataset-description.component.scss @@ -9,6 +9,15 @@ .form-container { } +.intro { + text-align: left; + font-weight: 400; + letter-spacing: 0px; + color: #212121; + opacity: 1; + margin: 3rem 0rem 3rem 0rem; +} + .dynamic-form-editor { mat-vertical-stepper { background-color: #ffffff; @@ -16,15 +25,23 @@ } // ::ng-deep .mat-form-field-flex > .mat-form-field-infix {padding: 0.4em 0px !important;} -::ng-deep .mat-form-field-label-wrapper { top: -1.5em; } +// ::ng-deep .mat-form-field-label-wrapper { +// top: -1.5em; +// } -::ng-deep .mat-form-field-appearance-outline.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-label { - transform: translateY(-1.1em) scale(.75); - width: 133.33333%; -} +// ::ng-deep +// .mat-form-field-appearance-outline.mat-form-field-can-float.mat-form-field-should-float +// .mat-form-field-label { +// transform: translateY(-1.1em) scale(0.75); +// width: 133.33333%; +// } -::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline {background: #fafafa !important;} +// ::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline { +// background: #fafafa !important; +// } -::ng-deep .mat-step-header .mat-step-icon-selected, .mat-step-header .mat-step-icon-state-done, .mat-step-header .mat-step-icon-state-edit { - background-color: #129D99 !important; -} +// ::ng-deep .mat-step-header .mat-step-icon-selected, +// .mat-step-header .mat-step-icon-state-done, +// .mat-step-header .mat-step-icon-state-edit { +// background-color: #129d99 !important; +// } diff --git a/dmp-frontend/src/app/ui/misc/dataset-description-form/dataset-description.component.ts b/dmp-frontend/src/app/ui/misc/dataset-description-form/dataset-description.component.ts index 0e3f80ffc..7f4f7c372 100644 --- a/dmp-frontend/src/app/ui/misc/dataset-description-form/dataset-description.component.ts +++ b/dmp-frontend/src/app/ui/misc/dataset-description-form/dataset-description.component.ts @@ -14,7 +14,7 @@ import { takeUntil } from 'rxjs/operators'; }) export class DatasetDescriptionComponent extends BaseComponent implements OnInit, AfterViewInit, OnChanges { - @ViewChild('stepper', { static: false }) stepper: MatHorizontalStepper; + // @ViewChild('stepper', { static: false }) stepper: MatHorizontalStepper; @Input() path: string; @Input() form: FormGroup; @Input() visibilityRules: Rule[] = []; @@ -42,13 +42,13 @@ export class DatasetDescriptionComponent extends BaseComponent implements OnInit ngOnChanges(changes: SimpleChanges) { // When the form is changed set stepper index to 0. - if (this.stepper && changes['form'] && !changes['form'].isFirstChange()) { - this.stepper.selectedIndex = 0; - } else if (this.stepper && changes['linkToScroll'] && changes['linkToScroll'].currentValue) { - if (changes['linkToScroll'].currentValue.page >= 0) { - this.stepper.selectedIndex = changes['linkToScroll'].currentValue.page; - } - } + // if (this.stepper && changes['form'] && !changes['form'].isFirstChange()) { + // this.stepper.selectedIndex = 0; + // } else if (this.stepper && changes['linkToScroll'] && changes['linkToScroll'].currentValue) { + // if (changes['linkToScroll'].currentValue.page >= 0) { + // this.stepper.selectedIndex = changes['linkToScroll'].currentValue.page; + // } + // } } ngAfterViewInit() {