Merge branch 'master' into angular-14

This commit is contained in:
Konstantinos Triantafyllou 2022-11-29 14:29:30 +02:00
commit 0b8218d69f
5 changed files with 81 additions and 21 deletions

View File

@ -1,4 +1,4 @@
import {Component, Inject, OnDestroy, OnInit, RendererFactory2, ViewChild, ViewEncapsulation} from '@angular/core'; import {Component, ElementRef, Inject, OnDestroy, OnInit, RendererFactory2, ViewChild, ViewEncapsulation} from '@angular/core';
import {ActivatedRoute, NavigationEnd, Router} from '@angular/router'; import {ActivatedRoute, NavigationEnd, Router} from '@angular/router';
import {EnvProperties} from './openaireLibrary/utils/properties/env-properties'; import {EnvProperties} from './openaireLibrary/utils/properties/env-properties';
@ -88,14 +88,14 @@ import {DOCUMENT} from "@angular/common";
points="7 4 13 10 7 16"></polyline></svg> points="7 4 13 10 7 16"></polyline></svg>
</span></a> </span></a>
</cookie-law> </cookie-law>
<bottom *ngIf="properties && isClient && showMenu && !community" [grantAdvance]="false" <bottom #bottom *ngIf="properties && isClient && showMenu && !community" [grantAdvance]="false"
[properties]="properties"></bottom> [properties]="properties"></bottom>
<bottom *ngIf="properties && isClient && showMenu && community" class=" communityPanelBackground " <bottom *ngIf="properties && isClient && showMenu && community" class=" communityPanelBackground "
[showSocialButtons]="true" [showMenuItems]="true" [grantAdvance]="false" [showOpenaire]="true" [showSocialButtons]="true" [showMenuItems]="true" [grantAdvance]="false" [showOpenaire]="true"
[communityId]="community.communityId" [menuItems]=bottomMenuItems [properties]="properties" [communityId]="community.communityId" [menuItems]=bottomMenuItems [properties]="properties"
[darkBackground]="true" [centered]="true"></bottom> [darkBackground]="true" [centered]="true"></bottom>
<quick-contact #quickContact *ngIf="showQuickContact && contactForm" (sendEmitter)="send($event)" <quick-contact #quickContact *ngIf="showQuickContact && contactForm" (sendEmitter)="send($event)"
[contact]="'Help'" [images]="images" [background]="'uk-background-secondary'" [contact]="'Help'" [images]="images" [background]="{class: 'uk-background-primary', dark: false}"
[contactForm]="contactForm" [sending]="sending"></quick-contact> [contactForm]="contactForm" [sending]="sending"></quick-contact>
<modal-alert #modal [overflowBody]="false"></modal-alert> <modal-alert #modal [overflowBody]="false"></modal-alert>
<role-verification *ngIf="community" service="connect" <role-verification *ngIf="community" service="connect"
@ -125,6 +125,7 @@ export class AppComponent implements OnInit, OnDestroy {
public images: string[] = []; public images: string[] = [];
@ViewChild('modal') modal: AlertModal; @ViewChild('modal') modal: AlertModal;
@ViewChild('quickContact') quickContact: QuickContactComponent; @ViewChild('quickContact') quickContact: QuickContactComponent;
@ViewChild('bottom', {read: ElementRef}) bottom: ElementRef;
private subscriptions = []; private subscriptions = [];
layout: Layout = null; layout: Layout = null;
layouts: Layout[] = null; layouts: Layout[] = null;
@ -195,6 +196,27 @@ export class AppComponent implements OnInit, OnDestroy {
this.smoothScroll.clearSubscriptions(); this.smoothScroll.clearSubscriptions();
} }
createObservers() {
let options = {
root: null,
rootMargin: '0px',
threshold: 0.1
};
let intersectionObserver = new IntersectionObserver(entries => {
entries.forEach(entry => {
if (entry.isIntersecting && this.showQuickContact) {
this.showQuickContact = false;
this.quickContactService.setDisplay(this.showQuickContact);
} else if (!entry.isIntersecting && !this.showQuickContact) {
this.showQuickContact = true;
this.quickContactService.setDisplay(this.showQuickContact);
}
});
}, options);
intersectionObserver.observe(this.bottom.nativeElement);
this.subscriptions.push(intersectionObserver);
}
get isManager() { get isManager() {
return Session.isCommunityCurator(this.user) || Session.isPortalAdministrator(this.user) || (this.communityId && Session.isManager('community', this.communityId, this.user)) return Session.isCommunityCurator(this.user) || Session.isPortalAdministrator(this.user) || (this.communityId && Session.isManager('community', this.communityId, this.user))
} }
@ -452,6 +474,9 @@ export class AppComponent implements OnInit, OnDestroy {
restrictedData ? "" : "/myCommunities", false, [], [], {})); restrictedData ? "" : "/myCommunities", false, [], [], {}));
} }
this.showMenu = true; this.showMenu = true;
setTimeout(() => {
this.createObservers();
});
} }
/** /**

View File

@ -3,7 +3,6 @@ import {ActivatedRoute, Router} from '@angular/router';
import {DOCUMENT, Location} from '@angular/common'; import {DOCUMENT, Location} from '@angular/common';
import {Meta, Title} from '@angular/platform-browser'; import {Meta, Title} from '@angular/platform-browser';
import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties'; import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties';
import {CommunityService} from "../openaireLibrary/connect/community/community.service"; import {CommunityService} from "../openaireLibrary/connect/community/community.service";
import {ConfigurationService} from '../openaireLibrary/utils/configuration/configuration.service'; import {ConfigurationService} from '../openaireLibrary/utils/configuration/configuration.service';
import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service'; import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service';
@ -12,8 +11,6 @@ import {ZenodoCommunitiesService} from '../openaireLibrary/connect/zenodoCommuni
import {Session, User} from '../openaireLibrary/login/utils/helper.class'; import {Session, User} from '../openaireLibrary/login/utils/helper.class';
import {StatisticsForDashboardComponent} from '../statistics/statistics.component'; import {StatisticsForDashboardComponent} from '../statistics/statistics.component';
import {StringUtils} from '../openaireLibrary/utils/string-utils.class'; import {StringUtils} from '../openaireLibrary/utils/string-utils.class';
import {PiwikHelper} from '../utils/piwikHelper';
import {SearchCommunityDataprovidersService} from "../openaireLibrary/connect/contentProviders/searchDataproviders.service"; import {SearchCommunityDataprovidersService} from "../openaireLibrary/connect/contentProviders/searchDataproviders.service";
import {SearchCommunityProjectsService} from "../openaireLibrary/connect/projects/searchProjects.service"; import {SearchCommunityProjectsService} from "../openaireLibrary/connect/projects/searchProjects.service";
import {SearchResearchResultsService} from "../openaireLibrary/services/searchResearchResults.service"; import {SearchResearchResultsService} from "../openaireLibrary/services/searchResearchResults.service";
@ -140,6 +137,7 @@ export class CommunityComponent {
}; };
disableSelect: boolean = true; disableSelect: boolean = true;
openaireEntities= OpenaireEntities; openaireEntities= OpenaireEntities;
piwikSiteId;
constructor( constructor(
private element: ElementRef, private element: ElementRef,
@ -206,7 +204,12 @@ export class CommunityComponent {
this._meta.updateTag({content: community.title}, "property='og:title'"); this._meta.updateTag({content: community.title}, "property='og:title'");
this._title.setTitle(community.title); this._title.setTitle(community.title);
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) { if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
this.subs.push(this._piwikService.trackView(this.properties, community.title, PiwikHelper.getSiteId(this.communityId)).subscribe()); this.subs.push(this.config.communityInformationState.subscribe(portal => {
if(portal && portal.piwik) {
this.piwikSiteId = portal.piwik;
this.subs.push(this._piwikService.trackView(this.properties, community.title, this.piwikSiteId).subscribe());
}
}));
} }
if (this.community.zenodoCommunity) { if (this.community.zenodoCommunity) {
this.subs.push(this._zenodoCommunitieService.getZenodoCommunityById(this.properties, this.properties.zenodoCommunities + this.community.zenodoCommunity, null).subscribe( this.subs.push(this._zenodoCommunitieService.getZenodoCommunityById(this.properties, this.properties.zenodoCommunities + this.community.zenodoCommunity, null).subscribe(

View File

@ -1,4 +1,4 @@
import {Component, OnInit} from '@angular/core'; import {Component, ElementRef, OnInit, ViewChild} from '@angular/core';
import {ActivatedRoute, Router} from '@angular/router'; import {ActivatedRoute, Router} from '@angular/router';
import {Meta, Title} from '@angular/platform-browser'; import {Meta, Title} from '@angular/platform-browser';
import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service'; import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service';
@ -8,6 +8,7 @@ import {SEOService} from "../openaireLibrary/sharedComponents/SEO/SEO.service";
import {Breadcrumb} from "../openaireLibrary/utils/breadcrumbs/breadcrumbs.component"; import {Breadcrumb} from "../openaireLibrary/utils/breadcrumbs/breadcrumbs.component";
import {Subscriber} from "rxjs"; import {Subscriber} from "rxjs";
import {properties} from "../../environments/environment"; import {properties} from "../../environments/environment";
import {QuickContactService} from '../openaireLibrary/sharedComponents/quick-contact/quick-contact.service';
@Component({ @Component({
selector: 'learn-how', selector: 'learn-how',
@ -208,7 +209,7 @@ import {properties} from "../../environments/environment";
</div> </div>
</div> </div>
</div> </div>
<div class="uk-section uk-container uk-container-large uk-text-center uk-flex uk-flex-column uk-flex-middle"> <div #contact class="uk-section uk-container uk-container-large uk-text-center uk-flex uk-flex-column uk-flex-middle">
<h2 class="uk-h2 uk-margin-medium-top uk-width-3-5@m">We look forward to working together and helping you unlock the full potential of your research community through open science<span class="uk-text-primary">.</span></h2> <h2 class="uk-h2 uk-margin-medium-top uk-width-3-5@m">We look forward to working together and helping you unlock the full potential of your research community through open science<span class="uk-text-primary">.</span></h2>
<a class="uk-button uk-button-primary uk-text-uppercase uk-margin-medium-top uk-margin-medium-bottom" routerLink="/contact-us">Contact us</a> <a class="uk-button uk-button-primary uk-text-uppercase uk-margin-medium-top uk-margin-medium-bottom" routerLink="/contact-us">Contact us</a>
</div> </div>
@ -222,7 +223,7 @@ export class LearnHowComponent implements OnInit {
steps: any[] = [ steps: any[] = [
{name: 'All 4 Steps', icon: '<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 234.82 236.48"><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><circle class="cls-1" cx="48.45" cy="48.45" r="48.45"/><circle class="cls-1" cx="186.37" cy="48.45" r="48.45"/><circle class="cls-1" cx="48.45" cy="188.03" r="48.45"/><circle class="cls-1" cx="186.37" cy="188.03" r="48.45"/></g></g></svg>'}, {name: 'All 4 Steps', icon: '<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 234.82 236.48"><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><circle class="cls-1" cx="48.45" cy="48.45" r="48.45"/><circle class="cls-1" cx="186.37" cy="48.45" r="48.45"/><circle class="cls-1" cx="48.45" cy="188.03" r="48.45"/><circle class="cls-1" cx="186.37" cy="188.03" r="48.45"/></g></g></svg>'},
{name: '1st Step', icon: '<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 227.96 265.77"><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><path class="cls-1" d="M195.82,3.62h-29V27h29a7.74,7.74,0,0,1,8,7.48V234.88a7.73,7.73,0,0,1-8,7.47H32.14a7.73,7.73,0,0,1-8-7.47V34.52a7.74,7.74,0,0,1,8-7.48h29V3.62h-29C14.42,3.62,0,17.48,0,34.52V234.88c0,17,14.42,30.89,32.14,30.89H195.82c17.72,0,32.14-13.86,32.14-30.89V34.52C228,17.48,213.54,3.62,195.82,3.62Z"/><path class="cls-1" d="M75.47,30.67h77a4.7,4.7,0,0,0,4.6-4.79V4.78A4.7,4.7,0,0,0,152.48,0h-77a4.7,4.7,0,0,0-4.6,4.78v21.1A4.7,4.7,0,0,0,75.47,30.67Z"/><rect class="cls-1" x="49.23" y="122.53" width="42.79" height="30.11" rx="5.57"/><polygon class="cls-1" points="173.33 99.65 151.52 129.09 147.3 124.17 136.14 133.74 152.37 152.65 185.14 108.39 173.33 99.65"/></g></g></svg>'}, {name: '1st Step', icon: '<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 227.96 265.77"><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><path class="cls-1" d="M195.82,3.62h-29V27h29a7.74,7.74,0,0,1,8,7.48V234.88a7.73,7.73,0,0,1-8,7.47H32.14a7.73,7.73,0,0,1-8-7.47V34.52a7.74,7.74,0,0,1,8-7.48h29V3.62h-29C14.42,3.62,0,17.48,0,34.52V234.88c0,17,14.42,30.89,32.14,30.89H195.82c17.72,0,32.14-13.86,32.14-30.89V34.52C228,17.48,213.54,3.62,195.82,3.62Z"/><path class="cls-1" d="M75.47,30.67h77a4.7,4.7,0,0,0,4.6-4.79V4.78A4.7,4.7,0,0,0,152.48,0h-77a4.7,4.7,0,0,0-4.6,4.78v21.1A4.7,4.7,0,0,0,75.47,30.67Z"/><rect class="cls-1" x="49.23" y="122.53" width="42.79" height="30.11" rx="5.57"/><polygon class="cls-1" points="173.33 99.65 151.52 129.09 147.3 124.17 136.14 133.74 152.37 152.65 185.14 108.39 173.33 99.65"/></g></g></svg>'},
{name: '2ng Step', icon: '<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 227.96 265.77"><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><path class="cls-1" d="M162.75,210.23V176.77L137.8,150S142.05,85.75,114,65.62C85.91,85.75,90.16,150,90.16,150l-25,26.8v33.46s39.13-33.17,32.32-23.82.57,16.45.57,16.45l-8.51,9.64h48.77l-8.5-9.64s7.37-7.09.56-16.45S162.75,210.23,162.75,210.23Z"/><path class="cls-1" d="M195.82,3.62h-29V27h29a7.74,7.74,0,0,1,8,7.48V234.88a7.73,7.73,0,0,1-8,7.47H32.14a7.73,7.73,0,0,1-8-7.47V34.52a7.74,7.74,0,0,1,8-7.48h29V3.62h-29C14.42,3.62,0,17.48,0,34.52V234.88c0,17,14.42,30.89,32.14,30.89H195.82c17.72,0,32.14-13.86,32.14-30.89V34.52C228,17.48,213.54,3.62,195.82,3.62Z"/><path class="cls-1" d="M76.4,30.67h75.15A4.65,4.65,0,0,0,156,25.88V4.78A4.65,4.65,0,0,0,151.55,0H76.4a4.65,4.65,0,0,0-4.49,4.78v21.1A4.66,4.66,0,0,0,76.4,30.67Z"/></g></g></svg>'}, {name: '2nd Step', icon: '<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 227.96 265.77"><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><path class="cls-1" d="M162.75,210.23V176.77L137.8,150S142.05,85.75,114,65.62C85.91,85.75,90.16,150,90.16,150l-25,26.8v33.46s39.13-33.17,32.32-23.82.57,16.45.57,16.45l-8.51,9.64h48.77l-8.5-9.64s7.37-7.09.56-16.45S162.75,210.23,162.75,210.23Z"/><path class="cls-1" d="M195.82,3.62h-29V27h29a7.74,7.74,0,0,1,8,7.48V234.88a7.73,7.73,0,0,1-8,7.47H32.14a7.73,7.73,0,0,1-8-7.47V34.52a7.74,7.74,0,0,1,8-7.48h29V3.62h-29C14.42,3.62,0,17.48,0,34.52V234.88c0,17,14.42,30.89,32.14,30.89H195.82c17.72,0,32.14-13.86,32.14-30.89V34.52C228,17.48,213.54,3.62,195.82,3.62Z"/><path class="cls-1" d="M76.4,30.67h75.15A4.65,4.65,0,0,0,156,25.88V4.78A4.65,4.65,0,0,0,151.55,0H76.4a4.65,4.65,0,0,0-4.49,4.78v21.1A4.66,4.66,0,0,0,76.4,30.67Z"/></g></g></svg>'},
{name: '3rd Step', icon: '<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 293.74 263.39"><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><path class="cls-1" d="M260.75,0H33A33,33,0,0,0,0,33V176.61a33,33,0,0,0,33,33h74.4v23h-19v30.82H203.66V232.57H184.44v-23h76.31a33,33,0,0,0,33-33V33A33,33,0,0,0,260.75,0Zm3.75,174.83a7,7,0,0,1-6.86,7.1H36.1a7,7,0,0,1-6.86-7.1V34.76a7,7,0,0,1,6.86-7.09H257.64a7,7,0,0,1,6.86,7.09Z"/><path class="cls-1" d="M260.75,0H33A33,33,0,0,0,0,33V176.61a33,33,0,0,0,33,33h74.4v23h-19v30.82H203.66V232.57H184.44v-23h76.31a33,33,0,0,0,33-33V33A33,33,0,0,0,260.75,0Zm3.75,174.83a7,7,0,0,1-6.86,7.1H36.1a7,7,0,0,1-6.86-7.1V34.76a7,7,0,0,1,6.86-7.09H257.64a7,7,0,0,1,6.86,7.09Z"/><path class="cls-1" d="M260.75,0H33A33,33,0,0,0,0,33V176.61a33,33,0,0,0,33,33h74.4v23h-19v30.82H203.66V232.57H184.44v-23h76.31a33,33,0,0,0,33-33V33A33,33,0,0,0,260.75,0Zm3.75,174.83a7,7,0,0,1-6.86,7.1H36.1a7,7,0,0,1-6.86-7.1V34.76a7,7,0,0,1,6.86-7.09H257.64a7,7,0,0,1,6.86,7.09Z"/><path class="cls-1" d="M123,155.32V132.26l-17.19-18.47s2.93-44.26-16.42-58.13C70.05,69.53,73,113.79,73,113.79l-17.2,18.47v23.06s27-22.86,22.28-16.41.39,11.33.39,11.33l-5.86,6.65h33.61l-5.87-6.65s5.09-4.88.4-11.33S123,155.32,123,155.32Z"/><rect class="cls-1" x="164.94" y="117.66" width="15.88" height="39.22"/><rect class="cls-1" x="215.69" y="99.44" width="15.88" height="57.44"/><rect class="cls-1" x="190.27" y="75.62" width="15.88" height="81.26"/></g></g></svg>'}, {name: '3rd Step', icon: '<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 293.74 263.39"><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><path class="cls-1" d="M260.75,0H33A33,33,0,0,0,0,33V176.61a33,33,0,0,0,33,33h74.4v23h-19v30.82H203.66V232.57H184.44v-23h76.31a33,33,0,0,0,33-33V33A33,33,0,0,0,260.75,0Zm3.75,174.83a7,7,0,0,1-6.86,7.1H36.1a7,7,0,0,1-6.86-7.1V34.76a7,7,0,0,1,6.86-7.09H257.64a7,7,0,0,1,6.86,7.09Z"/><path class="cls-1" d="M260.75,0H33A33,33,0,0,0,0,33V176.61a33,33,0,0,0,33,33h74.4v23h-19v30.82H203.66V232.57H184.44v-23h76.31a33,33,0,0,0,33-33V33A33,33,0,0,0,260.75,0Zm3.75,174.83a7,7,0,0,1-6.86,7.1H36.1a7,7,0,0,1-6.86-7.1V34.76a7,7,0,0,1,6.86-7.09H257.64a7,7,0,0,1,6.86,7.09Z"/><path class="cls-1" d="M260.75,0H33A33,33,0,0,0,0,33V176.61a33,33,0,0,0,33,33h74.4v23h-19v30.82H203.66V232.57H184.44v-23h76.31a33,33,0,0,0,33-33V33A33,33,0,0,0,260.75,0Zm3.75,174.83a7,7,0,0,1-6.86,7.1H36.1a7,7,0,0,1-6.86-7.1V34.76a7,7,0,0,1,6.86-7.09H257.64a7,7,0,0,1,6.86,7.09Z"/><path class="cls-1" d="M123,155.32V132.26l-17.19-18.47s2.93-44.26-16.42-58.13C70.05,69.53,73,113.79,73,113.79l-17.2,18.47v23.06s27-22.86,22.28-16.41.39,11.33.39,11.33l-5.86,6.65h33.61l-5.87-6.65s5.09-4.88.4-11.33S123,155.32,123,155.32Z"/><rect class="cls-1" x="164.94" y="117.66" width="15.88" height="39.22"/><rect class="cls-1" x="215.69" y="99.44" width="15.88" height="57.44"/><rect class="cls-1" x="190.27" y="75.62" width="15.88" height="81.26"/></g></g></svg>'},
{name: '4th Step', icon: '<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 177.86 248.05"><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><path class="cls-1" d="M177.86,236.27V197.84A25.23,25.23,0,0,0,170.48,180l-38.12-38.11s7.4-104-40-140.7a5.62,5.62,0,0,0-6.92,0c-47.37,36.67-40,140.7-40,140.7L7.39,180A25.24,25.24,0,0,0,0,197.84v38.43a3.86,3.86,0,0,0,6.23,3c17.1-13.33,62.85-48.53,52.71-35.55-12.41,15.88,1,27.92,1,27.92L47.13,245.23a1.67,1.67,0,0,0,1.21,2.82h81.18a1.67,1.67,0,0,0,1.21-2.82l-12.84-13.55s13.44-12,1-27.92c-10.13-13,35.61,22.22,52.71,35.55A3.86,3.86,0,0,0,177.86,236.27Z"/></g></g></svg>'}, {name: '4th Step', icon: '<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 177.86 248.05"><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><path class="cls-1" d="M177.86,236.27V197.84A25.23,25.23,0,0,0,170.48,180l-38.12-38.11s7.4-104-40-140.7a5.62,5.62,0,0,0-6.92,0c-47.37,36.67-40,140.7-40,140.7L7.39,180A25.24,25.24,0,0,0,0,197.84v38.43a3.86,3.86,0,0,0,6.23,3c17.1-13.33,62.85-48.53,52.71-35.55-12.41,15.88,1,27.92,1,27.92L47.13,245.23a1.67,1.67,0,0,0,1.21,2.82h81.18a1.67,1.67,0,0,0,1.21-2.82l-12.84-13.55s13.44-12,1-27.92c-10.13-13,35.61,22.22,52.71,35.55A3.86,3.86,0,0,0,177.86,236.27Z"/></g></g></svg>'},
]; ];
@ -232,6 +233,8 @@ export class LearnHowComponent implements OnInit {
public pageDescription: string = "Learn the process: Build a Gateway to your community's open and linked research outcomes. Customized to your needs."; public pageDescription: string = "Learn the process: Build a Gateway to your community's open and linked research outcomes. Customized to your needs.";
public breadcrumbs: Breadcrumb[] = [{name: 'home', route: '/'}, {name: 'About'}]; public breadcrumbs: Breadcrumb[] = [{name: 'home', route: '/'}, {name: 'About'}];
properties: EnvProperties = properties; properties: EnvProperties = properties;
public showQuickContact: boolean;
@ViewChild('contact') contact: ElementRef;
subscriptions = []; subscriptions = [];
constructor( constructor(
private route: ActivatedRoute, private route: ActivatedRoute,
@ -240,7 +243,8 @@ export class LearnHowComponent implements OnInit {
private _title: Title, private _title: Title,
private seoService: SEOService, private seoService: SEOService,
private _piwikService: PiwikService, private _piwikService: PiwikService,
private helper: HelperService) { private helper: HelperService,
private quickContactService: QuickContactService) {
} }
public ngOnInit() { public ngOnInit() {
@ -276,6 +280,33 @@ export class LearnHowComponent implements OnInit {
}); });
} }
ngAfterViewInit() {
if (typeof window !== "undefined") {
this.createObservers();
}
}
createObservers() {
let options = {
root: null,
rootMargin: '200px',
threshold: 1.0
};
let intersectionObserver = new IntersectionObserver(entries => {
entries.forEach(entry => {
if (entry.isIntersecting && this.showQuickContact) {
this.showQuickContact = false;
this.quickContactService.setDisplay(this.showQuickContact);
} else if (!entry.isIntersecting && !this.showQuickContact) {
this.showQuickContact = true;
this.quickContactService.setDisplay(this.showQuickContact);
}
});
}, options);
intersectionObserver.observe(this.contact.nativeElement);
this.subscriptions.push(intersectionObserver);
}
private updateDescription(description: string) { private updateDescription(description: string) {
this._meta.updateTag({content: description}, "name='description'"); this._meta.updateTag({content: description}, "name='description'");

View File

@ -34,7 +34,8 @@ export class PiwikHelper{
"eutopia":608, "eutopia":608,
"north-america-studies": 609, "north-america-studies": 609,
"iperionhs":610, "iperionhs":610,
"neanias-atmospheric": 613 "neanias-atmospheric": 613,
"forthem": 625
}; };
public static getSiteId(communityId:string){ public static getSiteId(communityId:string){
return this.siteIDs[communityId]; return this.siteIDs[communityId];

View File

@ -58,9 +58,9 @@ export let properties: EnvProperties = {
piwikBaseUrl: 'https://analytics.openaire.eu/piwik.php?idsite=', piwikBaseUrl: 'https://analytics.openaire.eu/piwik.php?idsite=',
piwikSiteId: '80', piwikSiteId: '80',
registryUrl: 'http://mpagasas.di.uoa.gr:8080/dnet-openaire-users-1.0.0-SNAPSHOT/api/registry/', registryUrl: 'http://mpagasas.di.uoa.gr:8080/dnet-openaire-users-1.0.0-SNAPSHOT/api/registry/',
loginUrl: "http://mpagasas.di.uoa.gr:8080/login-service//openid_connect_login", loginUrl: "http://mpagasas.di.uoa.gr:19080/login-service//openid_connect_login",
userInfoUrl: "http://mpagasas.di.uoa.gr:8080/login-service/userInfo", userInfoUrl: "http://mpagasas.di.uoa.gr:19080/login-service/userInfo",
logoutUrl: "http://mpagasas.di.uoa.gr:8080/login-service/openid_logout", logoutUrl: "http://mpagasas.di.uoa.gr:19080/login-service/openid_logout",
cookieDomain: '.di.uoa.gr', cookieDomain: '.di.uoa.gr',
feedbackmail: 'openaire.test@gmail.com', feedbackmail: 'openaire.test@gmail.com',
cacheUrl: 'http://dl170.madgik.di.uoa.gr:3000/get?url=', cacheUrl: 'http://dl170.madgik.di.uoa.gr:3000/get?url=',