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:

entities.component.ts
11 11
import {HelperFunctions} from "../../openaireLibrary/utils/HelperFunctions.class";
12 12
import {UserManagementService} from '../../openaireLibrary/services/user-management.service';
13 13
import {Title} from '@angular/platform-browser';
14
import {ClearCacheService} from "../../openaireLibrary/services/clear-cache.service";
14 15

  
15 16
@Component({
16 17
    selector: 'entities',
......
60 61
  constructor(private element: ElementRef, private route: ActivatedRoute,
61 62
              private _router: Router, private title: Title,
62 63
              private _helpContentService: HelpContentService,
63
              private userManagementService: UserManagementService) {}
64
              private userManagementService: UserManagementService,
65
              private _clearCacheService: ClearCacheService) {}
64 66

  
65 67
    ngOnInit() {
66 68
      this.formGroup = this.formComponent.form;
......
178 180
            _ => {
179 181
              this.deleteEntitiesFromArray(this.selectedEntities);
180 182
              this.showLoading = false;
183
              this._clearCacheService.clearCache("entities deleted");
181 184
            },
182 185
            error => this.handleUpdateError('System error deleting the selected entities', error)
183 186
        );
......
224 227
          this._helpContentService.saveEntity(<Entity> this.formGroup.value, this.properties.adminToolsAPIURL).subscribe(
225 228
              entity => {
226 229
                this.entitySavedSuccessfully(entity);
230
                this._clearCacheService.clearCache("entity saved");
227 231
              },
228 232
              error => this.handleUpdateError('System error creating entity', error)
229 233
          );
......
244 248
              <Entity> this.formGroup.value, this.properties.adminToolsAPIURL).subscribe(
245 249
              entity => {
246 250
                this.entityUpdatedSuccessfully(entity);
251
                this._clearCacheService.clearCache("entity updated");
247 252
              },
248 253
              error => this.handleUpdateError('System error updating entity', error)
249 254
          );
......
335 340
                this.checkboxes[i].entity.isEnabled = this.toggleStatus;
336 341
              }
337 342
              this.applyCheck(false);
343
              this._clearCacheService.clearCache("entities toggled (status: "+this.toggleStatus+")");
338 344
            },
339 345
            error => this.handleUpdateError('System error changing the status of the selected entity(-ies)', error)
340 346
        );

Also available in: Unified diff