diff --git a/landingPages/dataProvider/relatedDatasourcesTab.component.ts b/landingPages/dataProvider/relatedDatasourcesTab.component.ts index 5142c1cc..f5e7da2f 100644 --- a/landingPages/dataProvider/relatedDatasourcesTab.component.ts +++ b/landingPages/dataProvider/relatedDatasourcesTab.component.ts @@ -112,6 +112,16 @@ export class RelatedDatasourcesTabComponent { updatePage($event) { this.page = $event.value; + this.scrollToTabTop("relatedDatasources"); + } + + scrollToTabTop(tabId:string){ + setTimeout(() => { + window.scrollTo({ + top: document.getElementById(tabId) ? document.getElementById(tabId).offsetTop - 250 : 250, + behavior: 'smooth' + }); + }, 200); } public getKeys( map) { diff --git a/landingPages/landing-utils/landing-header/landing-header.component.ts b/landingPages/landing-utils/landing-header/landing-header.component.ts index 805ded09..39ebfbed 100644 --- a/landingPages/landing-utils/landing-header/landing-header.component.ts +++ b/landingPages/landing-utils/landing-header/landing-header.component.ts @@ -56,7 +56,7 @@ import {AlertModal} from "../../../utils/modal/alert";
- +
` }) diff --git a/landingPages/landing-utils/projects-in-modal.component.ts b/landingPages/landing-utils/projects-in-modal.component.ts index fe498711..a0d8a1c7 100644 --- a/landingPages/landing-utils/projects-in-modal.component.ts +++ b/landingPages/landing-utils/projects-in-modal.component.ts @@ -34,7 +34,7 @@ import {OpenaireEntities} from '../../utils/properties/searchFields';
- @@ -84,14 +84,25 @@ export class ProjectsInModalComponent { private search(refine: boolean, filterQuery: string) { var refineFields: string [] = ["funder"]; this.fetchProjects.getResultsForOrganizations(this.organizationId, filterQuery, this.page, this.size, (refine) ? refineFields : [], this.properties); + this.scrollToTabTop("projects"); } public pageChange($event) { this.page = $event.value; this.search(false, this.filterQuery); } + + scrollToTabTop(tabId:string){ + setTimeout(() => { + window.scrollTo({ + top: document.getElementById(tabId) ? document.getElementById(tabId).offsetTop - 250 : 250, + behavior: 'smooth' + }); + }, 200); + } public filterChange($event) { + this.page = 1; this.updateFilters(); //this.search(true, this.filterQuery); this.search(false, this.filterQuery); diff --git a/landingPages/organization/deletedByInference/deletedByInference.component.ts b/landingPages/organization/deletedByInference/deletedByInference.component.ts index 59fb72cf..8bc7716b 100644 --- a/landingPages/organization/deletedByInference/deletedByInference.component.ts +++ b/landingPages/organization/deletedByInference/deletedByInference.component.ts @@ -12,26 +12,29 @@ import {ResultPreview} from "../../../utils/result-preview/result-preview"; import {AlertModal} from "../../../utils/modal/alert"; import {Subscriber} from "rxjs"; import {properties} from "../../../../../environments/environment"; +import {HelperFunctions} from "../../../utils/HelperFunctions.class"; @Component({ selector: 'organizationsDeletedByInference', template: ` - - - - - - +
+ + + + + + +
` }) export class OrganizationsDeletedByInferenceComponent { @@ -111,5 +114,6 @@ export class OrganizationsDeletedByInferenceComponent { public updatePage($event) { this.page = $event.value; + HelperFunctions.scrollToId("versions_container"); } } diff --git a/landingPages/result/deletedByInference/deletedByInference.component.ts b/landingPages/result/deletedByInference/deletedByInference.component.ts index ece00295..52cd3781 100644 --- a/landingPages/result/deletedByInference/deletedByInference.component.ts +++ b/landingPages/result/deletedByInference/deletedByInference.component.ts @@ -12,26 +12,29 @@ import {ResultPreview} from "../../../utils/result-preview/result-preview"; import {AlertModal} from "../../../utils/modal/alert"; import {Subscriber} from "rxjs"; import {properties} from "../../../../../environments/environment"; +import {HelperFunctions} from "../../../utils/HelperFunctions.class"; @Component({ selector: 'deletedByInference', template: ` - - - - - - +
+ + + + + + +
` }) export class DeletedByInferenceComponent { @@ -113,5 +116,6 @@ export class DeletedByInferenceComponent { public updatePage($event) { this.page = $event.value; + HelperFunctions.scrollToId("versions_container"); } } diff --git a/landingPages/result/resultLanding.component.html b/landingPages/result/resultLanding.component.html index fe90e220..caefc3cc 100644 --- a/landingPages/result/resultLanding.component.html +++ b/landingPages/result/resultLanding.component.html @@ -424,8 +424,10 @@
-
- +
+
+ +
diff --git a/landingPages/result/resultLanding.component.ts b/landingPages/result/resultLanding.component.ts index d9b2c4ac..290c61e7 100644 --- a/landingPages/result/resultLanding.component.ts +++ b/landingPages/result/resultLanding.component.ts @@ -599,10 +599,12 @@ export class ResultLandingComponent { public updateReferencesPage($event) { this.referencesPage = $event.value; + this.scrollToTabTop('references'); } public updateBioentitiesPage($event) { this.bioentitiesPage = $event.value; + this.scrollToTabTop('bioentities'); } public updateRelatedPage($event) { diff --git a/utils/authors/showAuthors.component.ts b/utils/authors/showAuthors.component.ts index 0003a933..89971fbd 100644 --- a/utils/authors/showAuthors.component.ts +++ b/utils/authors/showAuthors.component.ts @@ -12,17 +12,17 @@ import {properties} from "../../../../environments/environment"; selector: 'showAuthors', template: ` - + {{author.fullName + ";"}} - + orcid orcid bw {{author.fullName + ";"}} -
@@ -99,6 +99,7 @@ import {properties} from "../../../../environments/environment"; export class ShowAuthorsComponent { @Input() authors: Author[]; + @Input() isSticky: boolean = false; @Input() authorsLimit: number = 7; @Input() showAll: boolean = true; @Input() modal: AlertModal;