diff --git a/dmp-frontend/src/app/app.component.ts b/dmp-frontend/src/app/app.component.ts index fb6133528..567acb990 100644 --- a/dmp-frontend/src/app/app.component.ts +++ b/dmp-frontend/src/app/app.component.ts @@ -2,7 +2,7 @@ import { of as observableOf, Subscription } from 'rxjs'; import { switchMap, filter, map, takeUntil } from 'rxjs/operators'; -import { Component, OnInit } from '@angular/core'; +import { AfterViewInit, Component, OnInit, ViewChild } from '@angular/core'; import { ActivatedRoute, NavigationEnd, Router } from '@angular/router'; import { TranslateService } from '@ngx-translate/core'; import { environment } from '../environments/environment'; @@ -18,6 +18,8 @@ import { ConfigurationService } from './core/services/configuration/configuratio import { Location } from '@angular/common'; import { MatomoInjector } from 'ngx-matomo'; import { MatomoService } from './core/services/matomo/matomo-service'; +import { SideNavService } from './core/services/sidenav/side-nav.sevice'; +import { MatSidenav } from '@angular/material'; declare const gapi: any; @@ -28,14 +30,17 @@ declare var $: any; templateUrl: './app.component.html', styleUrls: ['./app.component.scss'] }) -export class AppComponent implements OnInit { +export class AppComponent implements OnInit, AfterViewInit { hasBreadCrumb = observableOf(false); - sideNavOpen = false; + // sideNavOpen = false; + private sideNavSubscription: Subscription; helpContentEnabled: boolean; private statusChangeSubscription: Subscription; onlySplash = true; + @ViewChild('sidenav', {static:false}) sidenav:MatSidenav; + constructor( private router: Router, private route: ActivatedRoute, @@ -49,12 +54,28 @@ export class AppComponent implements OnInit { private language: LanguageService, private configurationService: ConfigurationService, private location: Location, - private matomoService: MatomoService + private matomoService: MatomoService, + private sidenavService: SideNavService ) { this.initializeServices(); this.matomoService.init(); this.helpContentEnabled = configurationService.helpService.enabled; } + ngAfterViewInit(): void { + setTimeout(() => { + this.sideNavSubscription = this.sidenavService.status().subscribe(isopen=>{ + if(isopen){ + //update value of hamburfer + document.getElementById('hamburger').classList.add('change'); + this.sidenav.open() + }else{ + document.getElementById('hamburger').classList.remove('change'); + this.sidenav.close(); + + } + }); + }); + } onActivate(event: any) { this.breadCrumbResolverService.push(event); @@ -134,7 +155,7 @@ export class AppComponent implements OnInit { } this.ccService.destroy(); this.ccService.init(this.ccService.getConfig()); - }) + }); } translateTitle(ttl: string) { @@ -153,6 +174,7 @@ export class AppComponent implements OnInit { ngOnDestroy() { this.statusChangeSubscription.unsubscribe(); + this.sideNavSubscription.unsubscribe(); } login() { diff --git a/dmp-frontend/src/app/core/services/sidenav/side-nav.sevice.ts b/dmp-frontend/src/app/core/services/sidenav/side-nav.sevice.ts new file mode 100644 index 000000000..4fe163777 --- /dev/null +++ b/dmp-frontend/src/app/core/services/sidenav/side-nav.sevice.ts @@ -0,0 +1,24 @@ +import { Injectable } from "@angular/core"; +import { Observable } from "rxjs"; +import { BehaviorSubject } from "rxjs"; + +@Injectable({ + providedIn:'root' +}) +export class SideNavService { + + private sidebar$:BehaviorSubject = new BehaviorSubject(true); + + public status():Observable{ + return this.sidebar$.asObservable(); + } + + public setStatus(isOpen: boolean){ + this.sidebar$.next(isOpen); + } + + public toggle(){ + this.sidebar$.next(!this.sidebar$.getValue()); + } + +} diff --git a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/composite-field/dataset-profile-editor-composite-field.component.html b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/composite-field/dataset-profile-editor-composite-field.component.html index c49ea413c..0bfc28c59 100644 --- a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/composite-field/dataset-profile-editor-composite-field.component.html +++ b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/composite-field/dataset-profile-editor-composite-field.component.html @@ -81,32 +81,32 @@
- +
- +
- +
- + {{'GENERAL.VALIDATION.REQUIRED' | translate}} - + {{'GENERAL.VALIDATION.REQUIRED' | translate}} @@ -258,7 +258,7 @@
-
    +
      @@ -348,10 +348,10 @@
    • - {{'DATASET-PROFILE-EDITOR.ACTIONS.FIELDSET.COMMENT-FIELD' | translate}} + {{'DATASET-PROFILE-EDITOR.ACTIONS.FIELDSET.COMMENT-FIELD' | translate}}
    • - + {{'DATASET-PROFILE-EDITOR.ACTIONS.FIELDSET.MULTIPLICITY' | translate}}
    • diff --git a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/composite-field/dataset-profile-editor-composite-field.component.scss b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/composite-field/dataset-profile-editor-composite-field.component.scss index 917a14a46..72fd4dd52 100644 --- a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/composite-field/dataset-profile-editor-composite-field.component.scss +++ b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/composite-field/dataset-profile-editor-composite-field.component.scss @@ -83,3 +83,16 @@ $blue-color-light: #5cf7f2; .numbering-label .mat-input-element:disabled{ color: #212121; } + +:host ::ng-deep .fieldset-checkbox-action-dataset-profile-editor +{ + .mat-checkbox-label{ + font-size: 0.8em; + color: #212121; + transform: translateY(3px); + } +} + +// ::ng-deep .underline-line-field .mat-form-field-appearance-legacy .mat-form-field-wapper{ +// padding-bottom: 1.25em !important; +// } \ No newline at end of file diff --git a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/field/dataset-profile-editor-field.component.html b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/field/dataset-profile-editor-field.component.html index 1654a5b5f..b36e10663 100644 --- a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/field/dataset-profile-editor-field.component.html +++ b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/field/dataset-profile-editor-field.component.html @@ -5,7 +5,7 @@
      • - + {{'GENERAL.VALIDATION.REQUIRED' | translate}}
      • diff --git a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/field/dataset-profile-editor-field.component.scss b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/field/dataset-profile-editor-field.component.scss index 1ef7f3f98..19a7b2248 100644 --- a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/field/dataset-profile-editor-field.component.scss +++ b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/field/dataset-profile-editor-field.component.scss @@ -14,7 +14,21 @@ mat-radio-button{ } li.list-inline-item{ + color: #129D99; .mat-icon{ vertical-align: bottom; } -} \ No newline at end of file +} + +:host ::ng-deep .field-toggler +{ + .mat-slide-toggle-content{ + font-size: 0.8em; + color: #212121; + transform: translateY(3px); + } + .mat-slide-toggle.mat-checked .mat-slide-toggle-thumb { + background-color:#129D99 ; + } +} + \ No newline at end of file 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 1247844c1..68c54c95c 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 @@ -59,27 +59,44 @@ - + - - - - - - + + + + + + + @@ -97,7 +114,7 @@
        1.1 {{'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-NAME'| translate}} *
        {{'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-NAME-HINT'| translate}}
        - + {{'GENERAL.VALIDATION.REQUIRED' | @@ -109,9 +126,9 @@
        1.2 {{'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-DESCRIPTION'| translate}} *
        {{'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-DESCRIPTION-HINT'| translate}}
        - - {{'GENERAL.VALIDATION.REQUIRED' | translate}} @@ -122,9 +139,9 @@
        1.3 {{'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-LANGUAGE'| translate}} *
        - + - + {{ lang.name }} @@ -354,7 +371,7 @@
        - {{'DATASET-PROFILE-EDITOR.ACTIONS.PREVIEW-AND-FINALIZE' | translate}} + diff --git a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/dataset-profile-editor.component.scss b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/dataset-profile-editor.component.scss index 701956c07..483f62ee6 100644 --- a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/dataset-profile-editor.component.scss +++ b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/dataset-profile-editor.component.scss @@ -106,15 +106,21 @@ color: #FFF; - $blue-color : #129D99; - $blue-color-light: #5cf7f2; +$blue-color : #129D99; +$blue-color-light: #5cf7f2; +.finalize-btn { + border-radius: 30px; + border: 1px solid #129D99; + background: transparent; + padding-left: 2em; + padding-right: 2em; + box-shadow: 0px 3px 6px #1E202029; + color: #129D99; +} -// #DEDEDE - - .stepper-title-label{ cursor: pointer; @@ -123,6 +129,7 @@ color: #FFF; transition-delay: 50ms; transition-timing-function: ease-in-out; color: #212121; + font-size: 0.9em; } .stepper-title-label-locked{ @@ -168,6 +175,7 @@ color: #FFF; font-size: 1.2em; padding-right: 1em; height: auto; + color: #129D99;; } .action-list-text{ font-size: 0.9em;; @@ -186,4 +194,19 @@ color: #FFF; // .mli{ // height: auto; -// } \ No newline at end of file +// } + + +:host ::ng-deep .mat-form-field-appearance-outline .mat-form-field-outline { + background: #fafafa !important; +} + +:host ::ng-deep .mat-form-field-appearance-outline .mat-form-field-infix { + font-size: 1rem; + padding: 0.6em 0 1em 0 !important; +} + +.basic-info-input{ + margin-top: 2em; + margin-bottom: 2em; +} \ No newline at end of file diff --git a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/dataset-profile-editor.component.ts b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/dataset-profile-editor.component.ts index a740c641c..154ab725e 100644 --- a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/dataset-profile-editor.component.ts +++ b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/dataset-profile-editor.component.ts @@ -40,6 +40,7 @@ import { DatasetDescriptionCompositeFieldEditorModel, DatasetDescriptionFieldEdi import { Rule } from '@app/core/model/dataset-profile-definition/rule'; import { DatasetProfileFieldViewStyle } from '@app/core/common/enum/dataset-profile-field-view-style'; import { invalid } from '@angular/compiler/src/render3/view/util'; +import { SideNavService } from '@app/core/services/sidenav/side-nav.sevice'; const skipDisable: any[] = require('../../../../../assets/resources/skipDisable.json'); @Component({ @@ -86,14 +87,20 @@ export class DatasetProfileEditorComponent extends BaseComponent implements OnIn private enumUtils: EnumUtils, private datasetWizardService: DatasetWizardService, private visibilityRulesService: VisibilityRulesService, - private fb: FormBuilder + private fb: FormBuilder, + private sidenavService: SideNavService ) { super(); // this.profileID = route.snapshot.params['id']; // this.cloneId = route.snapshot.params['cloneid']; } + ngOnDestroy(){ + this.sidenavService.setStatus(true); + } + ngOnInit() { + this.sidenavService.setStatus(false); this.matomoService.trackPageView('Admin: Dataset Profile Edit'); this.route.paramMap.pipe(takeUntil(this._destroyed)).subscribe((paramMap: ParamMap) => { this.datasetProfileId = paramMap.get('id'); diff --git a/dmp-frontend/src/app/ui/admin/dataset-profile/listing/criteria/dataset-profile.component.html b/dmp-frontend/src/app/ui/admin/dataset-profile/listing/criteria/dataset-profile.component.html index 8ef3a55a2..ce6fb6c10 100644 --- a/dmp-frontend/src/app/ui/admin/dataset-profile/listing/criteria/dataset-profile.component.html +++ b/dmp-frontend/src/app/ui/admin/dataset-profile/listing/criteria/dataset-profile.component.html @@ -14,7 +14,7 @@
        - + search diff --git a/dmp-frontend/src/app/ui/admin/dataset-profile/table-of-contents/table-of-contents.html b/dmp-frontend/src/app/ui/admin/dataset-profile/table-of-contents/table-of-contents.html index 69f4169ce..ae8b0f26d 100644 --- a/dmp-frontend/src/app/ui/admin/dataset-profile/table-of-contents/table-of-contents.html +++ b/dmp-frontend/src/app/ui/admin/dataset-profile/table-of-contents/table-of-contents.html @@ -3,7 +3,7 @@ -

        {{'DMP-EDITOR.STEPPER.USER-GUIDE' | translate}}

        +

        {{'DMP-EDITOR.STEPPER.USER-GUIDE' | translate}}