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:

divIds.component.ts
12 12
import {LoginErrorCodes} from '../../openaireLibrary/login/utils/guardHelper.class';
13 13
import {HelperFunctions} from "../../openaireLibrary/utils/HelperFunctions.class";
14 14
import {Title} from '@angular/platform-browser';
15
import {ClearCacheService} from "../../openaireLibrary/services/clear-cache.service";
15 16

  
16 17
@Component({
17 18
    selector: 'divIds',
......
71 72

  
72 73
    constructor(private element: ElementRef, private route: ActivatedRoute,
73 74
                private _router: Router, private title: Title,
74
                private _helpContentService: HelpContentService) {}
75
                private _helpContentService: HelpContentService,
76
                private _clearCacheService: ClearCacheService) {}
75 77

  
76 78
    getDivIds() {
77 79
      if(!Session.isLoggedIn()){
......
158 160
           _ => {
159 161
             this.deleteDivIdsFromArray(this.selectedDivIds);
160 162
             this.showLoading = false;
163
             this._clearCacheService.clearCache("classes deleted");
161 164
           },
162 165
           error => this.handleUpdateError('System error deleting the selected classes', error)
163 166
        );
......
214 217
          this._helpContentService.saveDivId(<DivId> this.formGroup.value, this.properties.adminToolsAPIURL).subscribe(
215 218
              divId => {
216 219
                this.divIdSavedSuccessfully(divId);
220
                this._clearCacheService.clearCache("class saved");
217 221
              },
218 222
              error => this.handleUpdateError("System error creating class", error)
219 223
          );
......
233 237
          this._helpContentService.updateDivId(<DivId> this.formGroup.value, this.properties.adminToolsAPIURL).subscribe(
234 238
              divId => {
235 239
                this.divIdUpdatedSuccessfully(divId);
240
                this._clearCacheService.clearCache("class updated");
236 241
              },
237 242
              error => this.handleUpdateError("System error updating class", error)
238 243
          );

Also available in: Unified diff