diff --git a/contact-us/contact-us.component.html b/contact-us/contact-us.component.html index 4ab42840..077c61fc 100644 --- a/contact-us/contact-us.component.html +++ b/contact-us/contact-us.component.html @@ -1,9 +1,8 @@

{{formTitle}}

-
+
@@ -48,22 +47,26 @@ [class.uk-form-danger]="contactForm.get('message').invalid && contactForm.get('message').touched">
-
+
-
- +
+
-
- -
+ + +
+
diff --git a/contact-us/contact-us.component.ts b/contact-us/contact-us.component.ts index 04e05047..19c1a9dc 100644 --- a/contact-us/contact-us.component.ts +++ b/contact-us/contact-us.component.ts @@ -13,9 +13,9 @@ export class ContactUsComponent { @Input() public formTitle: string; @Input() public organizationTypes: string[]; @Input() public buttonClass: string; - @Input() public alignButton: "left" | "right" | "center" = "left"; @Input() public sendButton: string = "Send"; @Input() public smallForm: boolean = false; + @Input() public scrollspy: boolean = false; @Input() public sending: boolean = false; @Output() sendEmitter: EventEmitter = new EventEmitter(); public properties: EnvProperties = properties; diff --git a/dashboard/menu/menu.component.html b/dashboard/menu/menu.component.html index fbc71e1e..7ce22cb9 100644 --- a/dashboard/menu/menu.component.html +++ b/dashboard/menu/menu.component.html @@ -39,7 +39,7 @@
-
-
No menu items found
+
+
+
Featured menu items can't have any sub menu items
@@ -118,8 +122,14 @@
+
+
Featured
+ + +
+ [options]="getTypeOptions(menuItemForm.get('isFeatured').value)" [tooltip]="false">
diff --git a/dashboard/menu/menu.component.ts b/dashboard/menu/menu.component.ts index cdedb37e..b18bec0e 100644 --- a/dashboard/menu/menu.component.ts +++ b/dashboard/menu/menu.component.ts @@ -132,11 +132,15 @@ export class MenuComponent implements OnInit { ); } - getTypeOptions() { + getTypeOptions(isFeatured: boolean = false) { if(this.isChild) { return this.typeOptions; } else { - return this.typeOptions.concat(this.rootOnlyTypeOptions); + if(isFeatured) { + return this.typeOptions; + } else { + return this.typeOptions.concat(this.rootOnlyTypeOptions); + } } } @@ -247,6 +251,7 @@ export class MenuComponent implements OnInit { route: this._fb.control(""), url: this._fb.control(""), isEnabled: this._fb.control(""), + isFeatured: this._fb.control(false), parentItemId: this._fb.control(isChild ? this.activeRootMenuId : null) }); this.isChild = isChild; @@ -261,6 +266,7 @@ export class MenuComponent implements OnInit { type: this._fb.control(menuItem['type'],Validators.required), route: this._fb.control(menuItem.route, (menuItem['type'] == "internal") ? [Validators.required] : []), url: this._fb.control(menuItem.url, (menuItem['type'] == "external") ? [Validators.required, StringUtils.urlValidator()] : []), + isFeatured: this._fb.control(menuItem.isFeatured), parentItemId: this._fb.control(menuItem['parentItemId']) }); this.isChild = isChild; diff --git a/dashboard/sharedComponents/page-content/page-content.component.ts b/dashboard/sharedComponents/page-content/page-content.component.ts index d1ad9868..2803fd79 100644 --- a/dashboard/sharedComponents/page-content/page-content.component.ts +++ b/dashboard/sharedComponents/page-content/page-content.component.ts @@ -1,82 +1,24 @@ -import { - AfterViewInit, - ChangeDetectorRef, - Component, - ElementRef, - HostListener, - OnDestroy, - ViewChild -} from "@angular/core"; -import {Observable, Subscription} from "rxjs"; -import {distinctUntilChanged} from "rxjs/operators"; +import {ChangeDetectorRef, Component, HostListener, OnDestroy, OnInit} from "@angular/core"; @Component({ selector: '[page-content]', template: `
-
- +
+
+ +
-
+
` }) -export class PageContentComponent implements OnDestroy, AfterViewInit{ - public height = 0; - private subscription: Subscription; - @ViewChild('header') header: ElementRef; +export class PageContentComponent implements OnInit{ + public offset: string; - constructor(private cdr: ChangeDetectorRef) { - } - - @HostListener('window:resize', ['$event']) - onResize(event) { - this.height = this.getHeight(); - this.cdr.detectChanges(); - } - - getHeight(): number{ - return this.header.nativeElement.offsetHeight; - } - - setupHeightMutationObserver() { - if (typeof document !== 'undefined') { - const observable = new Observable(observer => { - const callback = (mutationsList, observer2) => { - observer.next(this.getHeight()); - }; - - // Create an observer instance linked to the callback function - const elementObserver = new MutationObserver(callback); - - // Options for the observer (which mutations to observe) - const config = {attributes: true, attributeFilter: ['class'], childList: true, subtree: true}; - // Start observing the target node for configured mutations - elementObserver.observe(this.header.nativeElement, config); - }); - - this.subscription = observable - .pipe( - distinctUntilChanged()//if the value hasn't changed, don't continue - ) - .subscribe(newHeight => { - this.height = this.getHeight(); - this.cdr.detectChanges(); - }); - } - } - - ngAfterViewInit() { - this.setupHeightMutationObserver(); - this.height = this.getHeight(); - this.cdr.detectChanges(); - } - - ngOnDestroy() { - if(this.subscription) { - this.subscription.unsubscribe(); - } + ngOnInit() { + this.offset = getComputedStyle(document.documentElement).getPropertyValue('--structure-header-height'); } } diff --git a/dashboard/sharedComponents/sidebar/sideBar.component.html b/dashboard/sharedComponents/sidebar/sideBar.component.html index 4356a96c..de8830d8 100644 --- a/dashboard/sharedComponents/sidebar/sideBar.component.html +++ b/dashboard/sharedComponents/sidebar/sideBar.component.html @@ -1,15 +1,5 @@
--> diff --git a/dashboard/sharedComponents/sidebar/sideBar.component.ts b/dashboard/sharedComponents/sidebar/sideBar.component.ts index 2d9f46f3..b50522d5 100644 --- a/dashboard/sharedComponents/sidebar/sideBar.component.ts +++ b/dashboard/sharedComponents/sidebar/sideBar.component.ts @@ -11,16 +11,9 @@ import {LayoutService} from "./layout.service"; }) export class SideBarComponent implements OnInit { @Input() items: MenuItem[] = []; - @Input() logoLabel: string; - @Input() headerName: string; - @Input() headerPosition: "left" | "center" | "right" = "center"; - @Input() headerLogoUrl: string; - @Input() headerUrl: string; - @Input() showHeader: boolean = true; @Input() activeItem: string = ''; @Input() activeSubItem: string = ''; @Input() specialMenuItem: MenuItem = null; - @Input() searchParams = {}; @Input() queryParamsHandling = ""; properties; diff --git a/dashboard/sharedComponents/sidebar/sideBar.module.ts b/dashboard/sharedComponents/sidebar/sideBar.module.ts index 6958e4b5..b57e2d4c 100644 --- a/dashboard/sharedComponents/sidebar/sideBar.module.ts +++ b/dashboard/sharedComponents/sidebar/sideBar.module.ts @@ -5,12 +5,14 @@ import {RouterModule} from "@angular/router"; import {SideBarComponent} from './sideBar.component'; import {UrlPrefixModule} from "../../../utils/pipes/url-prefix.module"; +import {IconsModule} from "../../../utils/icons/icons.module"; @NgModule({ imports: [ CommonModule, RouterModule, - UrlPrefixModule + UrlPrefixModule, + IconsModule ], declarations: [ SideBarComponent diff --git a/landingPages/dataProvider/dataProvider.component.html b/landingPages/dataProvider/dataProvider.component.html index f97e0b6d..1c58b22e 100644 --- a/landingPages/dataProvider/dataProvider.component.html +++ b/landingPages/dataProvider/dataProvider.component.html @@ -499,7 +499,7 @@
- diff --git a/landingPages/organization/organization.component.html b/landingPages/organization/organization.component.html index 2b01f24a..1315c818 100644 --- a/landingPages/organization/organization.component.html +++ b/landingPages/organization/organization.component.html @@ -271,7 +271,7 @@ [texts]="pageContents['bottom']"> - diff --git a/landingPages/project/project.component.html b/landingPages/project/project.component.html index 6b559786..4e3b24b9 100644 --- a/landingPages/project/project.component.html +++ b/landingPages/project/project.component.html @@ -795,7 +795,7 @@ - diff --git a/landingPages/result/resultLanding.component.html b/landingPages/result/resultLanding.component.html index 29d56109..370392d2 100644 --- a/landingPages/result/resultLanding.component.html +++ b/landingPages/result/resultLanding.component.html @@ -658,7 +658,7 @@ - diff --git a/landingPages/result/resultLanding.component.ts b/landingPages/result/resultLanding.component.ts index 1d5a8c6f..d599f38e 100644 --- a/landingPages/result/resultLanding.component.ts +++ b/landingPages/result/resultLanding.component.ts @@ -23,7 +23,6 @@ import {Session} from "../../login/utils/helper.class"; import {AnnotationComponent} from "../annotation/annotation.component"; import {ParsingFunctions} from "../landing-utils/parsingFunctions.class"; import {ConnectHelper} from "../../connect/connectHelper"; -import {$e} from "codelyzer/angular/styles/chars"; @Component({ @@ -86,7 +85,6 @@ export class ResultLandingComponent { public warningMessage = ""; public errorMessage = ""; public showLoading: boolean = true; - public dashboard = properties.isDashboard; public routerHelper: RouterHelper = new RouterHelper(); public activeTab: string = null; diff --git a/login/userMini.component.ts b/login/userMini.component.ts index ea4caec3..74cfaf2e 100644 --- a/login/userMini.component.ts +++ b/login/userMini.component.ts @@ -1,4 +1,4 @@ -import {Component, Input, OnChanges, OnInit, SimpleChanges} from '@angular/core'; +import {Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges} from '@angular/core'; import {ActivatedRoute, Router} from '@angular/router'; import {Session, User} from './utils/helper.class'; import {RouterHelper} from '../utils/routerHelper.class'; @@ -6,156 +6,64 @@ import {Subscriber} from "rxjs"; import {MenuItem} from "../sharedComponents/menu"; import {UserManagementService} from "../services/user-management.service"; -// declare var logoutClicked; @Component({ selector: 'user-mini', template: ` - - - + ` }) export class UserMiniComponent implements OnInit, OnChanges { @@ -164,7 +72,6 @@ export class UserMiniComponent implements OnInit, OnChanges { public isAuthorized: boolean = false; @Input() public mobileView: boolean = false; public firstLetters: string = ""; - @Input() public dashboard: boolean = false; public server: boolean = true; public routerHelper: RouterHelper = new RouterHelper(); @Input() userMenuItems; @@ -172,9 +79,10 @@ export class UserMiniComponent implements OnInit, OnChanges { @Input() logOutUrl; @Input() cookieDomain; @Input() dark: boolean = false; - subscriptions = []; + @Output() closeCanvasEmitter: EventEmitter = new EventEmitter(); + private subscriptions = []; - constructor(private router: Router, private route: ActivatedRoute, private userManagementService: UserManagementService) { + constructor(private router: Router, private route: ActivatedRoute, private userManagementService: UserManagementService) { } ngOnInit() { @@ -189,7 +97,7 @@ export class UserMiniComponent implements OnInit, OnChanges { this.initUser(); } } - + ngOnDestroy() { this.subscriptions.forEach(subscription => { if (subscription instanceof Subscriber) { @@ -198,6 +106,10 @@ export class UserMiniComponent implements OnInit, OnChanges { }); } + closeCanvas() { + this.closeCanvasEmitter.emit(true); + } + initUser() { if (this.user) { this.loggedIn = true; @@ -222,14 +134,12 @@ export class UserMiniComponent implements OnInit, OnChanges { logIn() { this.userManagementService.login(); } - + isTheActiveSubMenu(menuItem: MenuItem): boolean { let currentRoute = this.router.url.split('?')[0]; - if (menuItem.route == currentRoute || menuItem.route == (currentRoute + "/") ) { - return true; - } - return false; + return menuItem.route == currentRoute || menuItem.route == (currentRoute + "/"); } + parseName() { this.firstLetters = ""; if (this.user && this.user.firstname) { diff --git a/monitor/how/how.component.ts b/monitor/how/how.component.ts index 0bd51283..01f6bb69 100644 --- a/monitor/how/how.component.ts +++ b/monitor/how/how.component.ts @@ -3,9 +3,9 @@ import {Component} from "@angular/core"; @Component({ selector: 'how', template: ` -
+
-
+
@@ -13,12 +13,12 @@ import {Component} from "@angular/core"; Starting from existing
research-related data sources
-
+
-
+
@@ -28,7 +28,7 @@ import {Component} from "@angular/core";
-
+
@@ -37,7 +37,7 @@ import {Component} from "@angular/core"; Open Science Indicators
-
+
@@ -46,7 +46,7 @@ import {Component} from "@angular/core"; Collaboration Indicators
-
+
@@ -58,7 +58,7 @@ import {Component} from "@angular/core";
-
+
diff --git a/searchPages/find/searchAll.component.html b/searchPages/find/searchAll.component.html index 2ccf4319..c3f33bf8 100644 --- a/searchPages/find/searchAll.component.html +++ b/searchPages/find/searchAll.component.html @@ -1,12 +1,11 @@
-
-
+
+
-
-
- +
+
-
diff --git a/searchPages/searchUtils/newSearchPage.component.html b/searchPages/searchUtils/newSearchPage.component.html index d85ca02f..d0772f44 100644 --- a/searchPages/searchUtils/newSearchPage.component.html +++ b/searchPages/searchUtils/newSearchPage.component.html @@ -13,7 +13,8 @@ - + {{type.name}} @@ -41,15 +42,17 @@ - - + + {{value.name}} - + @@ -68,8 +71,9 @@ class="uk-margin-top" role="alert">
-
+
No filters available Filters temporarily unavailable. Please try again later.
@@ -104,17 +108,17 @@
- +
@@ -123,29 +127,31 @@
- - +
+
+ + +
+ [searchAction]=false [description]="metaDescription">
@@ -153,8 +159,8 @@
-
-
+
+
Filters ({{(selectedRangeFilters + selectedFilters)}}) + *ngIf="(selectedRangeFilters+selectedFilters) > 0">({{(selectedRangeFilters + selectedFilters)}} + )
@@ -196,8 +203,7 @@
-
0 || (searchUtils.refineStatus == errorCodes.LOADING && searchUtils.status != errorCodes.LOADING) || (!hideFilters && (existingFiltersWithValues > 0 || (selectedRangeFilters + selectedFilters + selectedTypesNum) > 0) @@ -207,27 +213,19 @@
- -
-
- Filters: - -
-
Do you want to see results only for {{customFilter.valueName}}? Click here. + (click)="addCustomFilter();">Click here.
The following results are related to {{customFilter.valueName}}. - Are you interested to view more results? Visit + Are you interested to view more results? Visit
-
-
- - - - - - - - - -
-
- -
-
- - -
-
- -
-
-
-
diff --git a/searchPages/searchUtils/newSearchPage.component.ts b/searchPages/searchUtils/newSearchPage.component.ts index e82b7f66..6b4d4256 100644 --- a/searchPages/searchUtils/newSearchPage.component.ts +++ b/searchPages/searchUtils/newSearchPage.component.ts @@ -95,7 +95,6 @@ export class NewSearchPageComponent { @Input() showBreadcrumb: boolean = false; @Input() showDownload: boolean = true; @Input() breadcrumbs: Breadcrumb[] = []; - public dashboard: boolean = properties.isDashboard; private subscriptions = []; public parameterNames: string[] = []; public parameterValues: string[] = []; diff --git a/searchPages/searchUtils/searchResult.component.html b/searchPages/searchUtils/searchResult.component.html index 73469942..7057b770 100644 --- a/searchPages/searchUtils/searchResult.component.html +++ b/searchPages/searchUtils/searchResult.component.html @@ -1,7 +1,7 @@ -
    +
    • -
      +
      diff --git a/searchPages/searchUtils/searchResult.component.ts b/searchPages/searchUtils/searchResult.component.ts index 9bbb2ad5..84e55456 100644 --- a/searchPages/searchUtils/searchResult.component.ts +++ b/searchPages/searchUtils/searchResult.component.ts @@ -19,7 +19,7 @@ export class SearchResultComponent implements OnInit, OnChanges { @Input() showLoading: boolean = false; @Input() showSubjects: boolean = true; @Input() showOrganizations: boolean = true; - @Input() custom_class: string = "search-results"; + @Input() custom_class: string = ""; @Input() properties: EnvProperties; @Input() showImpactFactors: boolean = false; @Input() showEnermaps: boolean; diff --git a/sharedComponents/menu.ts b/sharedComponents/menu.ts index 6e646186..7cf36b96 100644 --- a/sharedComponents/menu.ts +++ b/sharedComponents/menu.ts @@ -15,6 +15,7 @@ export class MenuItem { icon: string; open: boolean; customClass: string = null; + isFeatured: boolean; constructor(id: string, title: string, url: string, route: string, needsAuthorization: boolean, entitiesRequired: string[], routeRequired: string[], params, icon=null, fragment = null, customClass = null, routeActive = null) { this._id = id; diff --git a/sharedComponents/navigationBar.component.html b/sharedComponents/navigationBar.component.html index d98e5150..b4f0da3f 100644 --- a/sharedComponents/navigationBar.component.html +++ b/sharedComponents/navigationBar.component.html @@ -1,216 +1,145 @@
      -
      - BETA - -
      -
      - - -
      -
      -
      -
      -
      - -
      -
      -
      - -
      +
      +
      +
      + +
      + +
      +
      + +
      +
      +
      +
      -
      - + {{menu.rootItem.title}} + {{menu.rootItem.title}} + {{menu.rootItem.title}} + +
    • + + +
    + + + +
-
--> -
-
-
-