From 8d47d1c9923d9044135f37efd953f6b4d22a7956 Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Tue, 16 Apr 2019 10:31:30 +0000 Subject: [PATCH] [Trunk|Library]: communities.component: Error message for fetching subscribed info only for development (now commented) bug fix in setting 'loading' (set it when checking all communities for subscription align search-form to left with input variable 'setFormCentered' use class 'uk-text-bold' instead of tags git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@55372 d315682c-612b-4755-9ff5-7f18f6832af3 --- .../communities/communities.component.html | 6 +++--- src/app/communities/communities.component.ts | 20 +++++++++++++++---- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/src/app/communities/communities.component.html b/src/app/communities/communities.component.html index d07dde2..36afd09 100644 --- a/src/app/communities/communities.component.html +++ b/src/app/communities/communities.component.html @@ -95,8 +95,8 @@

Search, share, link results of your research community

-
Start by locating your community
- +
Start by locating your community
+
@@ -104,7 +104,7 @@
-
Browse Research Communities
+
Browse Research Communities
diff --git a/src/app/communities/communities.component.ts b/src/app/communities/communities.component.ts index 23f7f1c..b86614a 100644 --- a/src/app/communities/communities.component.ts +++ b/src/app/communities/communities.component.ts @@ -108,6 +108,7 @@ export class CommunitiesComponent { //console.log(communitiesResults); this.sort(communitiesResults); + var subscribedLoading = communitiesResults.length; var mail = Session.getUserEmail(); communitiesResults.forEach((community, index) => { let showCommunity: boolean = true; @@ -154,15 +155,26 @@ export class CommunitiesComponent { } } - this.loading = false; + subscribedLoading--; + if(subscribedLoading == 0) { + this.loading = false; + } }, error => { - this.subscriberErrorMessage = "Error fetching communities you are subscribed to"; + // if(this.properties.environment == "development") { + // this.subscriberErrorMessage = "Error fetching communities you are subscribed to"; + // } this.handleError("Error getting response if email: "+mail+" is subscribed to community with id: "+community.communityId, error); - this.loading = false; + subscribedLoading--; + if(subscribedLoading == 0) { + this.loading = false; + } }); } else { - this.loading = false; + subscribedLoading--; + if(subscribedLoading == 0) { + this.loading = false; + } } }); },