diff --git a/src/app/communities/communities.component.ts b/src/app/communities/communities.component.ts index 6fe3472..bf64d79 100644 --- a/src/app/communities/communities.component.ts +++ b/src/app/communities/communities.component.ts @@ -80,13 +80,13 @@ export class CommunitiesComponent { } private getPageContents() { - this.helper.getPageHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => { + this.helper.getPageHelpContents(this.properties, 'connect', this._router.url).subscribe(contents => { this.pageContents = contents; }) } private getDivContents() { - this.helper.getDivHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => { + this.helper.getDivHelpContents(this.properties, 'connect', this._router.url).subscribe(contents => { this.divContents = contents; }) } diff --git a/src/app/contact/contact.component.ts b/src/app/contact/contact.component.ts index eb490a7..275d2e5 100644 --- a/src/app/contact/contact.component.ts +++ b/src/app/contact/contact.component.ts @@ -65,13 +65,13 @@ export class ContactComponent implements OnInit { } private getPageContents() { - this.helper.getPageHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => { + this.helper.getPageHelpContents(this.properties, 'connect', this._router.url).subscribe(contents => { this.pageContents = contents; }) } private getDivContents() { - this.helper.getDivHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => { + this.helper.getDivHelpContents(this.properties, 'connect', this._router.url).subscribe(contents => { this.divContents = contents; }) } @@ -100,7 +100,7 @@ export class ContactComponent implements OnInit { private sendMail(admins: any) { this.showLoading = true; - this._emailService.contact(this.properties.adminToolsAPIURL + '/contact', + this._emailService.contact(this.properties, Composer.composeEmailForNewCommunity(this.contactForm.value, admins), this.contactForm.value.recaptcha).subscribe( res => { diff --git a/src/app/content/contentPage.component.ts b/src/app/content/contentPage.component.ts index 3f60795..5b972bc 100644 --- a/src/app/content/contentPage.component.ts +++ b/src/app/content/contentPage.component.ts @@ -68,13 +68,13 @@ export class ContentPageComponent { } private getPageContents() { - this.helper.getPageHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => { + this.helper.getPageHelpContents(this.properties, 'connect', this._router.url).subscribe(contents => { this.pageContents = contents; }) } private getDivContents() { - this.helper.getDivHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => { + this.helper.getDivHelpContents(this.properties, 'connect', this._router.url).subscribe(contents => { this.divContents = contents; }) } diff --git a/src/app/curators/curators.component.ts b/src/app/curators/curators.component.ts index c3667be..00c4e77 100644 --- a/src/app/curators/curators.component.ts +++ b/src/app/curators/curators.component.ts @@ -65,8 +65,7 @@ export class CuratorsComponent { this.downloadUrl = this.properties.utilsService + '/download/'; if(!this.longView) { let emails = this.managers.join(); - this.curatorsService.getCurators(this.properties, - this.properties.adminToolsAPIURL + '/curator?emails=' + emails).subscribe(curators => { + this.curatorsService.getCurators(this.properties, emails).subscribe(curators => { this.curators = curators; for(let i = 0; i < this.curators.length; i++) { this.showMore[i]= false; @@ -86,8 +85,7 @@ export class CuratorsComponent { this.properties.communityAPI + this.communityId).subscribe(community => { this.managers = community[0].managers; let emails = this.managers.join(); - this.curatorsService.getCurators(this.properties, - this.properties.adminToolsAPIURL + '/curator?emails=' + emails).subscribe(curators => { + this.curatorsService.getCurators(this.properties, emails).subscribe(curators => { this.curators = curators; for(let i = 0; i < this.curators.length; i++) { this.showMore[i]= false; @@ -108,13 +106,13 @@ export class CuratorsComponent { } private getPageContents() { - this.helper.getPageHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => { + this.helper.getPageHelpContents(this.properties, 'connect', this._router.url).subscribe(contents => { this.pageContents = contents; }) } private getDivContents() { - this.helper.getDivHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => { + this.helper.getDivHelpContents(this.properties, 'connect', this._router.url).subscribe(contents => { this.divContents = contents; }) } diff --git a/src/app/deposit/zenodo/shareInZenodo.component.ts b/src/app/deposit/zenodo/shareInZenodo.component.ts index 329f8ab..53eb8b3 100644 --- a/src/app/deposit/zenodo/shareInZenodo.component.ts +++ b/src/app/deposit/zenodo/shareInZenodo.component.ts @@ -162,13 +162,13 @@ export class ShareInZenodoComponent { } private getPageContents() { - this.helper.getPageHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => { + this.helper.getPageHelpContents(this.properties, 'connect', this._router.url).subscribe(contents => { this.pageContents = contents; }) } private getDivContents() { - this.helper.getDivHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => { + this.helper.getDivHelpContents(this.properties, 'connect', this._router.url).subscribe(contents => { this.divContents = contents; }) } diff --git a/src/app/helper-test/helper-test.component.ts b/src/app/helper-test/helper-test.component.ts index eb021f4..83e8da3 100644 --- a/src/app/helper-test/helper-test.component.ts +++ b/src/app/helper-test/helper-test.component.ts @@ -29,7 +29,7 @@ export class HelperTestComponent implements OnInit{ } private getPageContents() { - this.helper.getPageHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => { + this.helper.getPageHelpContents(this.properties, "connect", this._router.url).subscribe(contents => { this.pageContents = contents; }) } diff --git a/src/app/htmlPages/htmlPage.component.ts b/src/app/htmlPages/htmlPage.component.ts index 6080992..e6291fe 100644 --- a/src/app/htmlPages/htmlPage.component.ts +++ b/src/app/htmlPages/htmlPage.component.ts @@ -34,7 +34,7 @@ export class HtmlPageComponent { this.communityId = this.properties.adminToolsCommunity; } if(location){ - this.sub = this._service.getHtmlContent(location.pathname, this.properties, this.communityId).subscribe( + this.sub = this._service.getHtmlContent(this.properties, this.communityId, location.pathname).subscribe( data => { if(data.length > 0) { this.content = data[0].content; diff --git a/src/app/htmlPages/htmlPage.service.ts b/src/app/htmlPages/htmlPage.service.ts index 3099ab8..52bef41 100644 --- a/src/app/htmlPages/htmlPage.service.ts +++ b/src/app/htmlPages/htmlPage.service.ts @@ -10,10 +10,10 @@ import{EnvProperties} from '../openaireLibrary/utils/properties/env-properties'; export class HtmlPageService { constructor(private http: HttpClient) {} - getHtmlContent (router: string, properties:EnvProperties, communityId:string ):any { + getHtmlContent (properties:EnvProperties, communityId:string, page_route: string):any { //console.info("get router html content for : "+router); - let url = properties.adminToolsAPIURL + '/htmlpagecontent?community='+communityId+'&page='+router; + let url = properties.adminToolsAPIURL + '/htmlpagecontent?community='+communityId+'&page='+page_route; return this.http.get>((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url); //.map(res => > res.json()); diff --git a/src/app/htmlPages/organizations/organizationsPage.component.ts b/src/app/htmlPages/organizations/organizationsPage.component.ts index c2da0f6..22b9849 100644 --- a/src/app/htmlPages/organizations/organizationsPage.component.ts +++ b/src/app/htmlPages/organizations/organizationsPage.component.ts @@ -57,13 +57,13 @@ export class OrganizationsPageComponent { } private getPageContents() { - this.helper.getPageHelpContents(this._router.url, this.properties, this.communityId).subscribe(contents => { + this.helper.getPageHelpContents(this.properties, this.communityId, this._router.url).subscribe(contents => { this.pageContents = contents; }) } private getDivContents() { - this.helper.getDivHelpContents(this._router.url, this.properties, this.communityId).subscribe(contents => { + this.helper.getDivHelpContents(this.properties, this.communityId, this._router.url).subscribe(contents => { this.divContents = contents; }) } diff --git a/src/app/learn-how/learn-how.component.ts b/src/app/learn-how/learn-how.component.ts index 50a1d91..17fda2e 100644 --- a/src/app/learn-how/learn-how.component.ts +++ b/src/app/learn-how/learn-how.component.ts @@ -161,13 +161,13 @@ export class LearnHowComponent { } private getPageContents() { - this.helper.getPageHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => { + this.helper.getPageHelpContents(this.properties, 'connect', this._router.url).subscribe(contents => { this.pageContents = contents; }) } private getDivContents() { - this.helper.getDivHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => { + this.helper.getDivHelpContents(this.properties, 'connect', this._router.url).subscribe(contents => { this.divContents = contents; }) } diff --git a/src/app/learn-how/learnInDepth/learn-in-depth.component.ts b/src/app/learn-how/learnInDepth/learn-in-depth.component.ts index 9796700..20840a6 100644 --- a/src/app/learn-how/learnInDepth/learn-in-depth.component.ts +++ b/src/app/learn-how/learnInDepth/learn-in-depth.component.ts @@ -245,13 +245,13 @@ export class LearnInDepthComponent { } private getPageContents() { - this.helper.getPageHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => { + this.helper.getPageHelpContents(this.properties, 'connect', this._router.url).subscribe(contents => { this.pageContents = contents; }) } private getDivContents() { - this.helper.getDivHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => { + this.helper.getDivHelpContents(this.properties, 'connect', this._router.url).subscribe(contents => { this.divContents = contents; }) } diff --git a/src/app/my-communities/my-communities.component.ts b/src/app/my-communities/my-communities.component.ts index 7aede26..aa54fc8 100644 --- a/src/app/my-communities/my-communities.component.ts +++ b/src/app/my-communities/my-communities.component.ts @@ -88,13 +88,13 @@ export class MyCommunitiesComponent { } private getPageContents() { - this.helper.getPageHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => { + this.helper.getPageHelpContents(this.properties, 'connect', this._router.url).subscribe(contents => { this.pageContents = contents; }) } private getDivContents() { - this.helper.getDivHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => { + this.helper.getDivHelpContents(this.properties, 'connect', this._router.url).subscribe(contents => { this.divContents = contents; }) } diff --git a/src/app/utils/customization/customization.component.ts b/src/app/utils/customization/customization.component.ts index 2fb3c60..3ee5cb2 100644 --- a/src/app/utils/customization/customization.component.ts +++ b/src/app/utils/customization/customization.component.ts @@ -33,7 +33,7 @@ export class CustomizationComponent { this.layout = JSON.parse(StringUtils.URIDecode(params['layout'])); this.buildCss(); }else{ - this._layoutService.getLayout(this.communityId, this.properties.adminToolsAPIURL+"/community/").subscribe( + this._layoutService.getLayout(this.properties, this.communityId).subscribe( layout => { this.layout = layout; if(!layout){ diff --git a/src/app/utils/subscribe/invite/invite.component.ts b/src/app/utils/subscribe/invite/invite.component.ts index cb39918..d6dffe7 100644 --- a/src/app/utils/subscribe/invite/invite.component.ts +++ b/src/app/utils/subscribe/invite/invite.component.ts @@ -160,13 +160,13 @@ export class InviteComponent implements OnInit { } private getPageContents() { - this.helper.getPageHelpContents(this._router.url, this.properties, this.communityId).subscribe(contents => { + this.helper.getPageHelpContents(this.properties, this.communityId, this._router.url).subscribe(contents => { this.pageContents = contents; }) } private getDivContents() { - this.helper.getDivHelpContents(this._router.url, this.properties, this.communityId).subscribe(contents => { + this.helper.getDivHelpContents(this.properties, this.communityId, this._router.url).subscribe(contents => { this.divContents = contents; }) } @@ -182,7 +182,7 @@ export class InviteComponent implements OnInit { if (this.validateEmails()) { this.composeEmail(); - this._emailService.sendEmail(this.properties.adminToolsAPIURL + "/sendMail/", this.email).subscribe( + this._emailService.sendEmail(this.properties, this.email).subscribe( res => { this.status = this.errorCodes.DONE; //console.log("Emails Sent: ",res); diff --git a/src/app/utils/subscribe/subscribe.component.ts b/src/app/utils/subscribe/subscribe.component.ts index cb4b145..54c71f4 100644 --- a/src/app/utils/subscribe/subscribe.component.ts +++ b/src/app/utils/subscribe/subscribe.component.ts @@ -137,7 +137,7 @@ export class SubscribeComponent { } else { this.loading = true; this.showLoginAlert = false; - this._subscribeService.subscribeToCommunity(this.communityId, email, this.properties.adminToolsAPIURL).subscribe( + this._subscribeService.subscribeToCommunity(this.properties, this.communityId, email).subscribe( res => { this.loading = false; if (res.status && res.status != 200) { @@ -156,7 +156,7 @@ export class SubscribeComponent { this.subscribeEvent.emit({ value: "ok" }); - this._emailService.sendEmail(this.properties.adminToolsAPIURL + "/notifyForNewSubscribers/" + this.communityId, Composer.composeEmailToInformManagers(this.community.title, this.communityId, this.community.managers, email)).subscribe( + this._emailService.notifyForNewManagers(this.properties, this.communityId, Composer.composeEmailToInformManagers(this.community.title, this.communityId, this.community.managers, email)).subscribe( res => { //console.log("The email has been sent successfully!") }, @@ -192,7 +192,7 @@ export class SubscribeComponent { } else { this.loading = true; //this.properties.adminToolsAPIURL - this._subscribeService.unSubscribeToCommunity(this.communityId, email, this.properties.adminToolsAPIURL).subscribe( + this._subscribeService.unSubscribeToCommunity(this.properties, this.communityId, email).subscribe( res => { this.loading = false; if (res.status && res.status != 200) {