From 84cb6b6d96753ed7d465d9767c33160a0c01a7f4 Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Fri, 6 May 2022 16:31:40 +0300 Subject: [PATCH] [Library | new-theme]: In landing pages, title & tabs sticky even when bottom is in viewport | Other versions modals title updated | DMPs tab updated. 1. dataProvider.component.html & project.component.html & resultLanding.component.html: Removed "shouldSticky" check from id="main-tabs-div" - title & tabs sticky even when bottom is in viewport. 2. dataProvider.component.ts & organization.component.ts & project.component.ts & resultLanding.component.ts: Commented shouldSticky and observer for bottom - title & tabs sticky even when bottom is in viewport. 3. organization.component.ts & resultLanding.component.ts: In modal for other versions, title updated without "of". 4. project.component.html: In for DMPs added resultType="DMPs" | Title in DMPs tab changed to Data Management Plans. 5. search-tab.component.ts: Moved after tab title and | In method "getEntityName()" return "this.resultType" if exists and no other condition matches. --- .../dataProvider/dataProvider.component.html | 2 +- .../dataProvider/dataProvider.component.ts | 22 ++++++++--------- .../organization/organization.component.ts | 24 +++++++++---------- landingPages/project/project.component.html | 6 ++--- landingPages/project/project.component.ts | 22 ++++++++--------- .../result/resultLanding.component.html | 2 +- .../result/resultLanding.component.ts | 24 +++++++++---------- utils/tabs/contents/search-tab.component.ts | 9 ++++--- 8 files changed, 57 insertions(+), 54 deletions(-) diff --git a/landingPages/dataProvider/dataProvider.component.html b/landingPages/dataProvider/dataProvider.component.html index fe0adbe3..cf9d2319 100644 --- a/landingPages/dataProvider/dataProvider.component.html +++ b/landingPages/dataProvider/dataProvider.component.html @@ -127,7 +127,7 @@
diff --git a/landingPages/dataProvider/dataProvider.component.ts b/landingPages/dataProvider/dataProvider.component.ts index 7249b7e5..a11923d1 100644 --- a/landingPages/dataProvider/dataProvider.component.ts +++ b/landingPages/dataProvider/dataProvider.component.ts @@ -127,7 +127,7 @@ export class DataProviderComponent { public graph_height: number = 0; @ViewChild("graph_and_feedback") graph_and_feedback; - public shouldSticky: boolean = true; + // public shouldSticky: boolean = true; subscriptions = []; properties: EnvProperties = properties; @@ -191,16 +191,16 @@ export class DataProviderComponent { ngAfterViewInit() { if (typeof document !== 'undefined') { this.offset = Number.parseInt(getComputedStyle(document.documentElement).getPropertyValue('--navbar-height')); - let bottom = document.getElementById('bottom'); - if(bottom) { - let observer = new IntersectionObserver(entries => { - entries.forEach(entry => { - this.shouldSticky = !entry.isIntersecting; - }) - }); - this.subscriptions.push(observer); - observer.observe(bottom); - } + // let bottom = document.getElementById('bottom'); + // if(bottom) { + // let observer = new IntersectionObserver(entries => { + // entries.forEach(entry => { + // this.shouldSticky = !entry.isIntersecting; + // }) + // }); + // this.subscriptions.push(observer); + // observer.observe(bottom); + // } if(this.graph_and_feedback) { this.observeGraphAndFeedback(); } diff --git a/landingPages/organization/organization.component.ts b/landingPages/organization/organization.component.ts index 05313861..c9adcac3 100644 --- a/landingPages/organization/organization.component.ts +++ b/landingPages/organization/organization.component.ts @@ -107,7 +107,7 @@ export class OrganizationComponent { public graph_height: number = 0; @ViewChild("graph_and_feedback") graph_and_feedback; - public shouldSticky: boolean = true; + // public shouldSticky: boolean = true; subscriptions = []; innerReportSubscriptions = []; @@ -191,16 +191,16 @@ export class OrganizationComponent { ngAfterViewInit() { if (typeof document !== 'undefined') { this.offset = Number.parseInt(getComputedStyle(document.documentElement).getPropertyValue('--navbar-height')); - let bottom = document.getElementById('bottom'); - if(bottom) { - let observer = new IntersectionObserver(entries => { - entries.forEach(entry => { - this.shouldSticky = !entry.isIntersecting; - }) - }); - this.subscriptions.push(observer); - observer.observe(bottom); - } + // let bottom = document.getElementById('bottom'); + // if(bottom) { + // let observer = new IntersectionObserver(entries => { + // entries.forEach(entry => { + // this.shouldSticky = !entry.isIntersecting; + // }) + // }); + // this.subscriptions.push(observer); + // observer.observe(bottom); + // } if(this.graph_and_feedback) { this.observeGraphAndFeedback(); } @@ -652,7 +652,7 @@ export class OrganizationComponent { this.deleteByInferenceOpened = true; this.alertModalDeletedByInference.cancelButton = false; this.alertModalDeletedByInference.okButton = false; - this.alertModalDeletedByInference.alertTitle = "Other versions of"; + this.alertModalDeletedByInference.alertTitle = "Other versions"; this.alertModalDeletedByInference.open(); } diff --git a/landingPages/project/project.component.html b/landingPages/project/project.component.html index 9bf55fa9..59460b77 100644 --- a/landingPages/project/project.component.html +++ b/landingPages/project/project.component.html @@ -237,7 +237,7 @@
@@ -346,8 +346,8 @@
- +
diff --git a/landingPages/result/resultLanding.component.ts b/landingPages/result/resultLanding.component.ts index e954e3be..b07ec4b4 100644 --- a/landingPages/result/resultLanding.component.ts +++ b/landingPages/result/resultLanding.component.ts @@ -130,7 +130,7 @@ export class ResultLandingComponent { public graph_height: number = 0; @ViewChild("graph_and_feedback") graph_and_feedback; - public shouldSticky: boolean = true; + // public shouldSticky: boolean = true; public viewAll: string = ""; public noCommunities: boolean = false; @@ -222,16 +222,16 @@ export class ResultLandingComponent { ngAfterViewInit() { if (typeof document !== 'undefined') { this.offset = Number.parseInt(getComputedStyle(document.documentElement).getPropertyValue('--navbar-height')); - let bottom = document.getElementById('bottom'); - if(bottom) { - let observer = new IntersectionObserver(entries => { - entries.forEach(entry => { - this.shouldSticky = !entry.isIntersecting; - }) - }); - this.subscriptions.push(observer); - observer.observe(bottom); - } + // let bottom = document.getElementById('bottom'); + // if(bottom) { + // let observer = new IntersectionObserver(entries => { + // entries.forEach(entry => { + // this.shouldSticky = !entry.isIntersecting; + // }) + // }); + // this.subscriptions.push(observer); + // observer.observe(bottom); + // } if(this.graph_and_feedback) { this.observeGraphAndFeedback(); } @@ -685,7 +685,7 @@ export class ResultLandingComponent { this.deleteByInferenceOpened = true; this.alertModalDeletedByInference.cancelButton = false; this.alertModalDeletedByInference.okButton = false; - this.alertModalDeletedByInference.alertTitle = "Other versions of"; + this.alertModalDeletedByInference.alertTitle = "Other versions"; this.alertModalDeletedByInference.open(); } diff --git a/utils/tabs/contents/search-tab.component.ts b/utils/tabs/contents/search-tab.component.ts index 06ac7793..0008c257 100644 --- a/utils/tabs/contents/search-tab.component.ts +++ b/utils/tabs/contents/search-tab.component.ts @@ -10,9 +10,6 @@ import {OpenaireEntities} from "../../properties/searchFields"; [queryParams]="params" [routerLink]="searchLinkToAdvancedPage"> - -
Recent @@ -29,6 +26,10 @@ import {OpenaireEntities} from "../../properties/searchFields";
+ + + @@ -76,6 +77,8 @@ export class SearchTabComponent { return OpenaireEntities.PROJECTS; } else if (entityType == "dataprovider") { return OpenaireEntities.DATASOURCES; + } else if (this.resultType) { + return this.resultType; } } }