Project

General

Profile

« Previous | Next » 

Revision 58421

[Trunk | Connect]:
1. communities.component.ts & contentPage.component.ts & shareInZenodo.component.ts & helper-test.component.ts & organizationsPage.component.ts &
learn-how.component.ts & learn-in-depth.component.ts & my-communities.component.ts:
"properties" as first parameter in methods of helper.service.ts.
2. contact.component.ts & curators.component.ts & invite.component.ts:
a. "properties" as first parameter in methods of helper.service.ts
b. create request path in service (email.service.ts, curator.service.ts).
3. htmlPage.component.ts & htmlPage.service.ts: "properties" as first parameter in methods of htmlPage.service.ts.
4. customization.component.ts: create request path in service (layout.service.ts).
5. subscribe.component.ts: create request path in service (subscribe.service.ts).

View differences:

modules/uoa-connect-portal/trunk/src/app/my-communities/my-communities.component.ts
88 88
  }
89 89

  
90 90
  private getPageContents() {
91
    this.helper.getPageHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => {
91
    this.helper.getPageHelpContents(this.properties, 'connect', this._router.url).subscribe(contents => {
92 92
      this.pageContents = contents;
93 93
    })
94 94
  }
95 95

  
96 96
  private getDivContents() {
97
    this.helper.getDivHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => {
97
    this.helper.getDivHelpContents(this.properties, 'connect', this._router.url).subscribe(contents => {
98 98
      this.divContents = contents;
99 99
    })
100 100
  }
modules/uoa-connect-portal/trunk/src/app/htmlPages/htmlPage.service.ts
10 10
export class HtmlPageService {
11 11
    constructor(private http: HttpClient) {}
12 12

  
13
    getHtmlContent (router: string, properties:EnvProperties, communityId:string ):any {
13
    getHtmlContent (properties:EnvProperties, communityId:string, page_route: string):any {
14 14
        //console.info("get router html content for : "+router);
15 15

  
16
        let url = properties.adminToolsAPIURL + '/htmlpagecontent?community='+communityId+'&page='+router;
16
        let url = properties.adminToolsAPIURL + '/htmlpagecontent?community='+communityId+'&page='+page_route;
17 17

  
18 18
        return this.http.get<Array<any>>((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url);
19 19
                    //.map(res => <Array<any>> res.json());
modules/uoa-connect-portal/trunk/src/app/htmlPages/htmlPage.component.ts
34 34
                    this.communityId = this.properties.adminToolsCommunity;
35 35
                  }
36 36
                  if(location){
37
                    this.sub = this._service.getHtmlContent(location.pathname, this.properties, this.communityId).subscribe(
37
                    this.sub = this._service.getHtmlContent(this.properties, this.communityId, location.pathname).subscribe(
38 38
                      data => {
39 39
                        if(data.length > 0) {
40 40
                          this.content = data[0].content;
modules/uoa-connect-portal/trunk/src/app/htmlPages/organizations/organizationsPage.component.ts
57 57
  }
58 58

  
59 59
  private getPageContents() {
60
    this.helper.getPageHelpContents(this._router.url, this.properties, this.communityId).subscribe(contents => {
60
    this.helper.getPageHelpContents(this.properties, this.communityId, this._router.url).subscribe(contents => {
61 61
      this.pageContents = contents;
62 62
    })
63 63
  }
64 64

  
65 65
  private getDivContents() {
66
    this.helper.getDivHelpContents(this._router.url, this.properties, this.communityId).subscribe(contents => {
66
    this.helper.getDivHelpContents(this.properties, this.communityId, this._router.url).subscribe(contents => {
67 67
      this.divContents = contents;
68 68
    })
69 69
  }
modules/uoa-connect-portal/trunk/src/app/contact/contact.component.ts
65 65
    }
66 66

  
67 67
    private getPageContents() {
68
        this.helper.getPageHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => {
68
        this.helper.getPageHelpContents(this.properties, 'connect', this._router.url).subscribe(contents => {
69 69
            this.pageContents = contents;
70 70
        })
71 71
    }
72 72

  
73 73
    private getDivContents() {
74
        this.helper.getDivHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => {
74
        this.helper.getDivHelpContents(this.properties, 'connect', this._router.url).subscribe(contents => {
75 75
            this.divContents = contents;
76 76
        })
77 77
    }
......
100 100

  
101 101
    private sendMail(admins: any) {
102 102
        this.showLoading = true;
103
        this._emailService.contact(this.properties.adminToolsAPIURL + '/contact',
103
        this._emailService.contact(this.properties,
104 104
            Composer.composeEmailForNewCommunity(this.contactForm.value, admins),
105 105
            this.contactForm.value.recaptcha).subscribe(
106 106
            res => {
modules/uoa-connect-portal/trunk/src/app/helper-test/helper-test.component.ts
29 29
  }
30 30

  
31 31
  private getPageContents() {
32
    this.helper.getPageHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => {
32
    this.helper.getPageHelpContents(this.properties, "connect", this._router.url).subscribe(contents => {
33 33
      this.pageContents = contents;
34 34
    })
35 35
  }
modules/uoa-connect-portal/trunk/src/app/communities/communities.component.ts
80 80
  }
81 81

  
82 82
  private getPageContents() {
83
    this.helper.getPageHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => {
83
    this.helper.getPageHelpContents(this.properties, 'connect', this._router.url).subscribe(contents => {
84 84
      this.pageContents = contents;
85 85
    })
86 86
  }
87 87

  
88 88
  private getDivContents() {
89
    this.helper.getDivHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => {
89
    this.helper.getDivHelpContents(this.properties, 'connect', this._router.url).subscribe(contents => {
90 90
      this.divContents = contents;
91 91
    })
92 92
  }
modules/uoa-connect-portal/trunk/src/app/learn-how/learn-how.component.ts
161 161
  }
162 162

  
163 163
  private getPageContents() {
164
    this.helper.getPageHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => {
164
    this.helper.getPageHelpContents(this.properties, 'connect', this._router.url).subscribe(contents => {
165 165
      this.pageContents = contents;
166 166
    })
167 167
  }
168 168

  
169 169
  private getDivContents() {
170
    this.helper.getDivHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => {
170
    this.helper.getDivHelpContents(this.properties, 'connect', this._router.url).subscribe(contents => {
171 171
      this.divContents = contents;
172 172
    })
173 173
  }
modules/uoa-connect-portal/trunk/src/app/learn-how/learnInDepth/learn-in-depth.component.ts
245 245
  }
246 246

  
247 247
  private getPageContents() {
248
    this.helper.getPageHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => {
248
    this.helper.getPageHelpContents(this.properties, 'connect', this._router.url).subscribe(contents => {
249 249
      this.pageContents = contents;
250 250
    })
251 251
  }
252 252

  
253 253
  private getDivContents() {
254
    this.helper.getDivHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => {
254
    this.helper.getDivHelpContents(this.properties, 'connect', this._router.url).subscribe(contents => {
255 255
      this.divContents = contents;
256 256
    })
257 257
  }
modules/uoa-connect-portal/trunk/src/app/utils/subscribe/subscribe.component.ts
137 137
    } else {
138 138
      this.loading = true;
139 139
      this.showLoginAlert = false;
140
      this._subscribeService.subscribeToCommunity(this.communityId, email, this.properties.adminToolsAPIURL).subscribe(
140
      this._subscribeService.subscribeToCommunity(this.properties, this.communityId, email).subscribe(
141 141
        res => {
142 142
          this.loading = false;
143 143
          if (res.status && res.status != 200) {
......
156 156
              this.subscribeEvent.emit({
157 157
                value: "ok"
158 158
              });
159
              this._emailService.sendEmail(this.properties.adminToolsAPIURL + "/notifyForNewSubscribers/" + this.communityId, Composer.composeEmailToInformManagers(this.community.title, this.communityId, this.community.managers, email)).subscribe(
159
              this._emailService.notifyForNewManagers(this.properties, this.communityId, Composer.composeEmailToInformManagers(this.community.title, this.communityId, this.community.managers, email)).subscribe(
160 160
                res => {
161 161
                  //console.log("The email has been sent successfully!")
162 162
                },
......
192 192
    } else {
193 193
      this.loading = true;
194 194
      //this.properties.adminToolsAPIURL
195
      this._subscribeService.unSubscribeToCommunity(this.communityId, email, this.properties.adminToolsAPIURL).subscribe(
195
      this._subscribeService.unSubscribeToCommunity(this.properties, this.communityId, email).subscribe(
196 196
        res => {
197 197
          this.loading = false;
198 198
          if (res.status && res.status != 200) {
modules/uoa-connect-portal/trunk/src/app/utils/subscribe/invite/invite.component.ts
160 160
  }
161 161

  
162 162
  private getPageContents() {
163
    this.helper.getPageHelpContents(this._router.url, this.properties, this.communityId).subscribe(contents => {
163
    this.helper.getPageHelpContents(this.properties, this.communityId, this._router.url).subscribe(contents => {
164 164
      this.pageContents = contents;
165 165
    })
166 166
  }
167 167

  
168 168
  private getDivContents() {
169
    this.helper.getDivHelpContents(this._router.url, this.properties, this.communityId).subscribe(contents => {
169
    this.helper.getDivHelpContents(this.properties, this.communityId, this._router.url).subscribe(contents => {
170 170
      this.divContents = contents;
171 171
    })
172 172
  }
......
182 182
      if (this.validateEmails()) {
183 183
        this.composeEmail();
184 184

  
185
        this._emailService.sendEmail(this.properties.adminToolsAPIURL + "/sendMail/", this.email).subscribe(
185
        this._emailService.sendEmail(this.properties, this.email).subscribe(
186 186
          res => {
187 187
            this.status = this.errorCodes.DONE;
188 188
            //console.log("Emails Sent: ",res);
modules/uoa-connect-portal/trunk/src/app/utils/customization/customization.component.ts
33 33
            this.layout = JSON.parse(StringUtils.URIDecode(params['layout']));
34 34
            this.buildCss();
35 35
          }else{
36
            this._layoutService.getLayout(this.communityId, this.properties.adminToolsAPIURL+"/community/").subscribe(
36
            this._layoutService.getLayout(this.properties, this.communityId).subscribe(
37 37
              layout => {
38 38
                this.layout = layout;
39 39
                if(!layout){
modules/uoa-connect-portal/trunk/src/app/curators/curators.component.ts
65 65
      this.downloadUrl = this.properties.utilsService + '/download/';
66 66
      if(!this.longView) {
67 67
        let emails = this.managers.join();
68
        this.curatorsService.getCurators(this.properties,
69
          this.properties.adminToolsAPIURL + '/curator?emails=' + emails).subscribe(curators => {
68
        this.curatorsService.getCurators(this.properties, emails).subscribe(curators => {
70 69
          this.curators = curators;
71 70
          for(let i = 0; i < this.curators.length; i++) {
72 71
            this.showMore[i]= false;
......
86 85
            this.properties.communityAPI + this.communityId).subscribe(community => {
87 86
              this.managers = community[0].managers;
88 87
              let emails = this.managers.join();
89
              this.curatorsService.getCurators(this.properties,
90
                this.properties.adminToolsAPIURL + '/curator?emails=' + emails).subscribe(curators => {
88
              this.curatorsService.getCurators(this.properties, emails).subscribe(curators => {
91 89
                this.curators = curators;
92 90
                for(let i = 0; i < this.curators.length; i++) {
93 91
                  this.showMore[i]= false;
......
108 106
  }
109 107

  
110 108
  private getPageContents() {
111
    this.helper.getPageHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => {
109
    this.helper.getPageHelpContents(this.properties, 'connect', this._router.url).subscribe(contents => {
112 110
      this.pageContents = contents;
113 111
    })
114 112
  }
115 113

  
116 114
  private getDivContents() {
117
    this.helper.getDivHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => {
115
    this.helper.getDivHelpContents(this.properties, 'connect', this._router.url).subscribe(contents => {
118 116
      this.divContents = contents;
119 117
    })
120 118
  }
modules/uoa-connect-portal/trunk/src/app/deposit/zenodo/shareInZenodo.component.ts
162 162
  }
163 163

  
164 164
  private getPageContents() {
165
    this.helper.getPageHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => {
165
    this.helper.getPageHelpContents(this.properties, 'connect', this._router.url).subscribe(contents => {
166 166
      this.pageContents = contents;
167 167
    })
168 168
  }
169 169

  
170 170
  private getDivContents() {
171
    this.helper.getDivHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => {
171
    this.helper.getDivHelpContents(this.properties, 'connect', this._router.url).subscribe(contents => {
172 172
      this.divContents = contents;
173 173
    })
174 174
  }
modules/uoa-connect-portal/trunk/src/app/content/contentPage.component.ts
68 68
  }
69 69

  
70 70
  private getPageContents() {
71
    this.helper.getPageHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => {
71
    this.helper.getPageHelpContents(this.properties, 'connect', this._router.url).subscribe(contents => {
72 72
      this.pageContents = contents;
73 73
    })
74 74
  }
75 75

  
76 76
  private getDivContents() {
77
    this.helper.getDivHelpContents(this._router.url, this.properties, 'connect').subscribe(contents => {
77
    this.helper.getDivHelpContents(this.properties, 'connect', this._router.url).subscribe(contents => {
78 78
      this.divContents = contents;
79 79
    })
80 80
  }

Also available in: Unified diff