Project

General

Profile

« Previous | Next » 

Revision 59371

[use-UoaAdminToolsLibrary | Admin]:
1. community-form.component.html: [Bug fix] Replace "portal.ts" with "community" which was changed by mistake when refactoring a file name.
2. environment.ts & environment.prod.ts & environment.beta.ts: Property "deleteCacheUrl" added.
3. communities.component.ts: Import ClearCacheService and call method "clearCache()" after successfully deleting, saving or updating communities.
4. pages.component.ts: Import ClearCacheService and call method "clearCache()" after successfully deleting, saving, updating or toggling pages.
5. page-help-contents.component.ts: Import ClearCacheService and call method "clearCache()" after successfully deleting or toggling page help contents.
6. new-page-help-content.component.ts: Import ClearCacheService and call method "clearCache()" after successfully saving page help contents.
7. edit-page-help-content.component.ts: Import ClearCacheService and call method "clearCache()" after successfully updating page help contents.
8. entities.component.ts: Import ClearCacheService and call method "clearCache()" after successfully deleting, saving, updating or toggling entities.
9. new-div-help-content.component.ts:
a. Import ClearCacheService and call method "clearCache()" after successfully saving class help contents.
b. Call method "saveDivHelpContent()" instead of "insertOrUpdateDivHelpContent()" from helpContentService.
10. edit-div-help-content.component.ts:
a. Import ClearCacheService and call method "clearCache()" after successfully updating class help contents.
b. Call method "updateDivHelpContent()" instead of "insertOrUpdateDivHelpContent()" from helpContentService.
11. div-help-contents.component.ts: Import ClearCacheService and call method "clearCache()" after successfully deleting or toggling class help contents.
12. divIds.component.ts: Import ClearCacheService and call method "clearCache()" after successfully deleting, saving or updating classes.
13. divId-form.component.ts:
a. Rename field "allPages" to "allPagesFiltered" (all pages of selected portal) and add field "allPages: Page[] = []" (all pages, irrelevant to portal).
b. In ngOnInit subscribe to valueChanges of "portalType" form field and remove from pages in form, pages with different portalType.
c. Added "Validators.required" for "pages" in form.
d. [Bug fix] In setPages() method: Clear pages formArray, then add formControls (do not rebuild formArray - validators would be lost).
14. divId-form.component.html:
a. Move selection of portal above selection of pages.
b. Disable toggling of pages, until a portal is selected and add a note "If portal changes, selected pages will be lost".
15. affiliations.component.ts: Add "urlPrefix()" method (calls StringUtils.urlPrefix()).
16. affiliations.component.html: When showing website url add urlPrefix (links which do not start with "http://" will now be shown properly - we add "//").
17. help-content.service.ts: [Bug fix] Replace method "insertOrUpdateDivHelpContent()" with "saveDivHelpContent()" (/save) and "updateDivHelpContent()" (/update)
( update sends real communityId, while save sends pid as communityId ).

View differences:

help-content.service.ts
180 180
        .pipe(catchError(this.handleError));
181 181
  }
182 182

  
183
  // unused
183 184
  insertOrUpdateDivHelpContent(divHelpContent: DivHelpContent, helpContentUrl:string, pid: string) {
184 185
      HelpContentService.removeNulls(divHelpContent);
185 186

  
......
189 190
          .pipe(catchError(this.handleError));
190 191
  }
191 192

  
193
  saveDivHelpContent(divHelpContent: DivHelpContent, helpContentUrl:string, pid: string) {
194
    HelpContentService.removeNulls(divHelpContent);
195

  
196
    return this.http.post<DivHelpContent>(helpContentUrl + properties.adminToolsPortalType + '/' + pid + '/divhelpcontent/save',
197
                                            JSON.stringify(divHelpContent), CustomOptions.getAuthOptionsWithBody())
198
      .pipe(catchError(this.handleError));
199
  }
200

  
201
  updateDivHelpContent(divHelpContent: DivHelpContent, helpContentUrl:string, pid: string) {
202
    HelpContentService.removeNulls(divHelpContent);
203

  
204
    return this.http.post<DivHelpContent>(helpContentUrl + properties.adminToolsPortalType + '/' + pid +'/divhelpcontent/update',
205
                                            JSON.stringify(divHelpContent), CustomOptions.getAuthOptionsWithBody())
206
      .pipe(catchError(this.handleError));
207
  }
208

  
192 209
  deleteDivHelpContents(ids : string[], helpContentUrl:string, pid: string) {
193 210
       return this.http.post(helpContentUrl + properties.adminToolsPortalType + "/" + pid + '/divhelpcontent/delete',
194 211
                                JSON.stringify(ids), CustomOptions.getAuthOptionsWithBody())

Also available in: Unified diff