check before unsubscribe in landing and search/find, change the cookie link in app component

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@53026 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
argiro.kokogiannaki 2018-09-05 12:37:47 +00:00
parent 6063fad585
commit e14e81269d
9 changed files with 26 additions and 10 deletions

View File

@ -37,7 +37,7 @@ import{MenuItem,RootMenuItem} from './sharedComponents/menu';
<cookie-law *ngIf= "isClient" position="bottom">
OpenAIRE uses cookies in order to function properly.<br>
Cookies are small pieces of data that websites store in your browser to allow us to give you the best browsing experience possible.
By using the OpenAIRE portal you accept our use of cookies. <a href="//ec.europa.eu/ipg/basics/legal/cookies/index_en.htm" target="_blank"> Read more <span class="uk-icon">
By using the OpenAIRE portal you accept our use of cookies. <a href="http://ec.europa.eu/ipg/basics/legal/cookies/index_en.htm" target="_blank"> Read more <span class="uk-icon">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="chevron-right" ratio="1"><polyline fill="none" stroke="#000" stroke-width="1.03" points="7 4 13 10 7 16"></polyline></svg>
</span></a>
</cookie-law>

View File

@ -148,7 +148,9 @@ export class DataProviderComponent {
}
ngOnDestroy() {
this.sub.unsubscribe();
if(this.sub){
this.sub.unsubscribe();
}
if(this.piwiksub){
this.piwiksub.unsubscribe();
}

View File

@ -101,7 +101,9 @@ export class DatasetComponent {
}
ngOnDestroy() {
this.sub.unsubscribe();
if(this.sub){
this.sub.unsubscribe();
}
if(this.piwiksub){
this.piwiksub.unsubscribe();
}

View File

@ -156,7 +156,9 @@ export class OrganizationComponent {
ngOnDestroy() {
this.sub.unsubscribe();
if(this.sub){
this.sub.unsubscribe();
}
if(this.piwiksub){
this.piwiksub.unsubscribe();
}

View File

@ -98,7 +98,9 @@ export class OrpComponent {
}
ngOnDestroy() {
this.sub.unsubscribe();
if(this.sub){
this.sub.unsubscribe();
}
if(this.piwiksub){
this.piwiksub.unsubscribe();
}

View File

@ -214,7 +214,9 @@ actionsAfterLoadId(){
this.fetchOrps.getNumForEntity("project", this.projectId, this.properties);
}
ngOnDestroy() {
this.sub.unsubscribe();
if(this.sub){
this.sub.unsubscribe();
}
if(this.piwiksub){
this.piwiksub.unsubscribe();
}

View File

@ -114,7 +114,9 @@ export class PublicationComponent {
}
ngOnDestroy() {
this.sub.unsubscribe();
if(this.sub){
this.sub.unsubscribe();
}
if(this.piwiksub){
this.piwiksub.unsubscribe();
}

View File

@ -100,7 +100,9 @@ export class SoftwareComponent {
}
ngOnDestroy() {
this.sub.unsubscribe();
if(this.sub){
this.sub.unsubscribe();
}
if(this.piwiksub){
this.piwiksub.unsubscribe();
}

View File

@ -155,7 +155,7 @@ public subPub;public subData; public subSoftware; public subOrps; public subProj
this.showOrganizations = showEntity["organization"];
this.showDataProviders = showEntity["datasource"];
this.showSoftware = showEntity["software"];
this.showOrps = true;//showEntity["other"];
this.showOrps = showEntity["other"];
this.sub = this.route.queryParams.subscribe(params => {
@ -196,7 +196,9 @@ public subPub;public subData; public subSoftware; public subOrps; public subProj
public ngOnDestroy() {
this.sub.unsubscribe();
if(this.sub){
this.sub.unsubscribe();
}
if(this.piwiksub){
this.piwiksub.unsubscribe();
}