Add loading gif on tabs at community page

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@53479 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
sofia.baltzi 2018-10-16 15:00:13 +00:00
parent ec84429004
commit 5a16042d40
1 changed files with 7 additions and 0 deletions

View File

@ -53,6 +53,8 @@ export class CommunityComponent {
public communityInfo = null;
public showLoading: boolean = true;
// TODO Unsubscribe
public subPublications;
public subResearchData;
@ -121,6 +123,7 @@ export class CommunityComponent {
this._searchEntriesService.getTotal(this.properties.searchAPIURLLAst+'publications/count?format=json&fq=communityid='+this.communityId).subscribe(
publicationTotal => {
this.publicationTotal = publicationTotal;
this.showLoading = true;
this.searchPublications();
});
@ -174,6 +177,7 @@ export class CommunityComponent {
this._searchEntriesService.getResults(this.properties.searchAPIURLLAst+'publications?fq=communityid%20exact%20%22'+this.communityId+'%22&sortBy=resultdateofacceptance,descending&format=json&size=5').subscribe(
publicationResults => {
this.publicationResults = publicationResults;
this.showLoading = false;
//console.log(publicationResults);
});
}
@ -184,6 +188,7 @@ export class CommunityComponent {
this._searchEntriesService.getResults(this.properties.searchAPIURLLAst+'datasets?fq=communityid%20exact%20%22'+this.communityId+'%22&sortBy=resultdateofacceptance,descending&format=json&size=5').subscribe(
researchDataResults => {
this.researchDataResults = researchDataResults;
this.showLoading = false;
});
}
}
@ -193,6 +198,7 @@ export class CommunityComponent {
this._searchEntriesService.getResults(this.properties.searchAPIURLLAst+'software?fq=communityid%20exact%20%22'+this.communityId+'%22&sortBy=resultdateofacceptance,descending&format=json&size=5').subscribe(
softwareResults => {
this.softwareResults = softwareResults;
this.showLoading = false;
});
}
}
@ -202,6 +208,7 @@ export class CommunityComponent {
this._searchEntriesService.getResults(this.properties.searchAPIURLLAst+'other?fq=communityid%20exact%20%22'+this.communityId+'%22&sortBy=resultdateofacceptance,descending&format=json&size=5').subscribe(
orpResults => {
this.orpResults = orpResults;
this.showLoading = false;
});
}
}