Compare commits
No commits in common. "94e831c548eb4ac4a4a4694cfe54d19b7b15f43f" and "e463080109aa00935370c61dce668174aa4800c4" have entirely different histories.
94e831c548
...
e463080109
|
@ -166,7 +166,7 @@ export class ClassContentFormComponent implements OnInit {
|
|||
this._router.navigate(['../'], {queryParams: {"pageId": this.pageId}, relativeTo: this.route});
|
||||
NotificationHandler.rise('Page content has been <b>successfully updated</b>');
|
||||
this.showLoading = false;
|
||||
this._clearCacheService.purgeBrowserCache("Class help text saved or updated",this.portal);
|
||||
this._clearCacheService.clearCacheInRoute("Class help text saved or updated",this.portal, this.page.route);
|
||||
},
|
||||
err => this.handleUpdateError('System error saving page content', err)
|
||||
));
|
||||
|
|
|
@ -155,7 +155,7 @@ export class ClassHelpContentsComponent implements OnInit {
|
|||
this.deletePageHelpContentsFromArray(this.selectedPageContents);
|
||||
NotificationHandler.rise('Page content(s) has been <b>successfully deleted</b>');
|
||||
this.showLoading = false;
|
||||
this._clearCacheService.purgeBrowserCache("Class text texts deleted",this.portal);
|
||||
this._clearCacheService.clearCacheInRoute("Class text texts deleted",this.portal, this.page.route);
|
||||
},
|
||||
error => this.handleUpdateError('System error deleting the selected page content(s)', error)
|
||||
));
|
||||
|
@ -198,7 +198,7 @@ export class ClassHelpContentsComponent implements OnInit {
|
|||
this.countClassHelpContents();
|
||||
this.applyCheck(false);
|
||||
NotificationHandler.rise('Page content(s) has been <b>successfully updated</b>');
|
||||
this._clearCacheService.purgeBrowserCache("class help text's status changed",this.portal);
|
||||
this._clearCacheService.clearCacheInRoute("class help text's status changed",this.portal, this.page.route);
|
||||
},
|
||||
error => this.handleUpdateError('System error changing the status of the selected page content(s)', error)
|
||||
));
|
||||
|
|
|
@ -345,7 +345,7 @@ export class EntitiesComponent implements OnInit {
|
|||
this.checkboxes[i].entity.isEnabled = this.toggleStatus;
|
||||
}
|
||||
this.applyCheck(false);
|
||||
this._clearCacheService.purgeBrowserCache("entity's status changed", this.portal);
|
||||
this._clearCacheService.clearCacheInRoute("entity's status changed", this.portal, "/");
|
||||
this._clearCacheService.purgeBrowserCache("entity's status changed", this.portal);
|
||||
},
|
||||
error => this.handleUpdateError('System error changing the status of the selected entity(-ies)', error)
|
||||
|
|
|
@ -199,7 +199,7 @@ export class PageContentFormComponent implements OnInit {
|
|||
NotificationHandler.rise('Page content has been <b>successfully ' + (this.pageContentId ? 'updated' : 'created') + '</b>');
|
||||
this._router.navigate(['../'], {queryParams: {"pageId": this.pageId}, relativeTo: this.route});
|
||||
this.showLoading = false;
|
||||
this._clearCacheService.purgeBrowserCache("page help content saved",this.portal);
|
||||
this._clearCacheService.clearCacheInRoute("page help content saved",this.portal, this.page.route);
|
||||
},
|
||||
err => this.handleUpdateError('System error saving page content', err)
|
||||
));
|
||||
|
|
|
@ -165,7 +165,7 @@ export class PageHelpContentsComponent implements OnInit {
|
|||
this.deletePageHelpContentsFromArray(this.selectedPageContents);
|
||||
NotificationHandler.rise('Page content(s) has been <b>successfully deleted</b>');
|
||||
this.showLoading = false;
|
||||
this._clearCacheService.purgeBrowserCache("Help texts deleted",this.portal);
|
||||
this._clearCacheService.clearCacheInRoute("Help texts deleted",this.portal, this.page.route);
|
||||
},
|
||||
error => this.handleUpdateError('System error deleting the selected page content(s)', error)
|
||||
));
|
||||
|
@ -210,7 +210,7 @@ export class PageHelpContentsComponent implements OnInit {
|
|||
NotificationHandler.rise('Page content(s) has been <b>successfully updated</b>');
|
||||
this.countPageHelpContents();
|
||||
this.applyCheck(false);
|
||||
this._clearCacheService.purgeBrowserCache("Help text's status changed",this.portal);
|
||||
this._clearCacheService.clearCacheInRoute("Help text's status changed",this.portal, this.page.route);
|
||||
},
|
||||
error => this.handleUpdateError('System error changing the status of the selected page content(s)', error)
|
||||
));
|
||||
|
|
|
@ -7,13 +7,8 @@
|
|||
<div class="uk-flex uk-flex-center uk-flex-wrap uk-flex-middle uk-grid" uk-grid
|
||||
[class]="isPortalAdministrator ? 'uk-flex-between@m':'uk-flex-right@m'">
|
||||
<div>
|
||||
<!--<div input inputClass="border-bottom" type="select" [options]="menuTypes" [(value)]="selectedMenuType" (valueChange)="valueChange()"
|
||||
*ngIf="isPortalAdministrator"></div>-->
|
||||
<ul *ngIf="isPortalAdministrator" class="uk-subnav uk-subnav-pill uk-margin-medium-top">
|
||||
<li *ngFor="let type of menuTypes; let i=index"
|
||||
[class.uk-active]="selectedMenuType === type.value"><a
|
||||
(click)="selectedMenuType = type.value"><span>{{type.label}}</span></a></li>
|
||||
</ul>
|
||||
<div input inputClass="border-bottom" type="select" [options]="menuTypes" [(value)]="selectedMenuType" (valueChange)="valueChange()"
|
||||
*ngIf="isPortalAdministrator"></div>
|
||||
</div>
|
||||
<div>
|
||||
<button class="uk-button uk-button-default uk-flex uk-flex-middle"
|
||||
|
@ -168,9 +163,9 @@
|
|||
<span class="uk-margin-small-left">Hidden</span>
|
||||
</label>
|
||||
</div>
|
||||
<ng-container *ngIf="selectedMenuType == 'customMenu'">
|
||||
|
||||
<h6 class="uk-margin-medium-top">Menu alignment</h6>
|
||||
<div >
|
||||
<div *ngIf="selectedMenuType == 'customMenu'">
|
||||
<div>
|
||||
<label (click)="alignMenu('LEFT')">
|
||||
<input class="uk-radio" type="radio" name="menuAlign" [checked]="(featuredAlignment == 'LEFT')">
|
||||
|
@ -190,7 +185,6 @@
|
|||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</ng-container>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="displayMenuItems && displayMenuItems.length == 0"
|
||||
|
|
|
@ -46,9 +46,8 @@ export class MenuComponent implements OnInit {
|
|||
public menuItemForm: FormGroup;
|
||||
public pageForm: FormGroup;
|
||||
public menuTypes = [
|
||||
{label: 'Custom', value: 'customMenu'},
|
||||
{label: 'Main', value: 'normalMenu'}
|
||||
|
||||
{label: 'Normal Menu', value: 'normalMenu'},
|
||||
{label: 'Custom Menu', value: 'customMenu'}
|
||||
];
|
||||
public selectedMenuType = this.menuTypes[0].value;
|
||||
public normalMenuItems: MenuItemExtended[] = [];
|
||||
|
@ -127,8 +126,8 @@ export class MenuComponent implements OnInit {
|
|||
} else {
|
||||
this.title.setTitle('Administrator Dashboard | Menu');
|
||||
}
|
||||
this.isPortalAdministrator = false;//Session.isPortalAdministrator(user);
|
||||
this.selectedMenuType = this.menuTypes[0].value
|
||||
this.isPortalAdministrator = Session.isPortalAdministrator(user);
|
||||
this.selectedMenuType = this.isPortalAdministrator ? this.menuTypes[0].value : this.menuTypes[1].value;
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -272,7 +271,7 @@ export class MenuComponent implements OnInit {
|
|||
this.deleteMenuItemFromArray(this.selectedMenuItem, this.isChild);
|
||||
NotificationHandler.rise("Menu item have been <b>successfully deleted</b>");
|
||||
this.showLoading = false;
|
||||
this._clearCacheService.purgeBrowserCache("Menu item deleted",this.portal);
|
||||
this._clearCacheService.clearCacheInRoute("Menu item deleted",this.portal, "/");
|
||||
|
||||
},
|
||||
error => this.handleError("Server error deleting menu item", error)
|
||||
|
@ -314,7 +313,7 @@ export class MenuComponent implements OnInit {
|
|||
menuItem => {
|
||||
this.menuItemSavedSuccessfully(menuItem, true);
|
||||
NotificationHandler.rise('Menu item <b>' + menuItem.title + '</b> has been <b>successfully created</b>');
|
||||
this._clearCacheService.purgeBrowserCache("Menu item saved",this.portal);
|
||||
this._clearCacheService.clearCacheInRoute("Menu item saved",this.portal, "/");
|
||||
},
|
||||
error => this.handleError("System error creating menu item", error)
|
||||
)
|
||||
|
@ -325,7 +324,7 @@ export class MenuComponent implements OnInit {
|
|||
menuItem => {
|
||||
this.menuItemSavedSuccessfully(menuItem, false);
|
||||
NotificationHandler.rise('Menu item <b>' + menuItem.title + '</b> has been <b>successfully updated</b>');
|
||||
this._clearCacheService.purgeBrowserCache("Menu item updated",this.portal);
|
||||
this._clearCacheService.clearCacheInRoute("Menu item updated",this.portal, "/");
|
||||
},
|
||||
error => this.handleError("System error updating menu item", error)
|
||||
)
|
||||
|
@ -391,7 +390,7 @@ export class MenuComponent implements OnInit {
|
|||
HelperFunctions.swap(temp, index, newIndex);
|
||||
this._helpContentService.reorderMenuItems(temp, this.portal).subscribe(() => {
|
||||
HelperFunctions.swap(this.featuredMenuItems, index, newIndex);
|
||||
this._clearCacheService.purgeBrowserCache("Menu items reordered",this.portal);
|
||||
this._clearCacheService.clearCacheInRoute("Menu items reordered",this.portal, "/");
|
||||
}, error => {
|
||||
this.handleError("System error reordering menu items", error);
|
||||
});
|
||||
|
@ -403,7 +402,7 @@ export class MenuComponent implements OnInit {
|
|||
HelperFunctions.swap(temp, index, newIndex);
|
||||
this._helpContentService.reorderMenuItems(temp, this.portal).subscribe(() => {
|
||||
HelperFunctions.swap(children && children.length ? children : this.normalMenuItems, index, newIndex);
|
||||
this._clearCacheService.purgeBrowserCache("Menu items reordered",this.portal);
|
||||
this._clearCacheService.clearCacheInRoute("Menu items reordered",this.portal, "/");
|
||||
}, error => {
|
||||
this.handleError("System error reordering menu items", error);
|
||||
});
|
||||
|
@ -418,7 +417,7 @@ export class MenuComponent implements OnInit {
|
|||
} else {
|
||||
this.showNormalMenu = status;
|
||||
}
|
||||
this._clearCacheService.purgeBrowserCache("Menu toggled",this.portal);
|
||||
this._clearCacheService.clearCacheInRoute("Menu toggled",this.portal, "/");
|
||||
NotificationHandler.rise("Menu has been <b>successfully toggled to be "+(status?"visible":"hidden")+"</b>");
|
||||
}, error => {
|
||||
this.handleError("System error toggling menu", error);
|
||||
|
@ -430,7 +429,7 @@ export class MenuComponent implements OnInit {
|
|||
this.subscriptions.push(
|
||||
this._helpContentService.alignMenu(MenuAlignment[alignment], this.portal).subscribe(() => {
|
||||
this.featuredAlignment = alignment;
|
||||
this._clearCacheService.purgeBrowserCache("Menu aligned",this.portal);
|
||||
this._clearCacheService.clearCacheInRoute("Menu aligned",this.portal, "/");
|
||||
NotificationHandler.rise("Menu has been <b>successfully "+alignment.toLowerCase()+" aligned</b>");
|
||||
}, error => {
|
||||
this.handleError("System error aligning menu to the "+alignment.toLowerCase(), error);
|
||||
|
|
|
@ -415,6 +415,7 @@ export class PagesComponent implements OnInit {
|
|||
this.checkboxes[i].page.isEnabled = status;
|
||||
}
|
||||
this.applyCheck(false);
|
||||
this._clearCacheService.clearCacheInRoute("Page's status changed",this.portal, "/");
|
||||
this._clearCacheService.purgeBrowserCache("Page's status changed", this.portal);
|
||||
},
|
||||
error => this.handleUpdateError('System error changing the status of the selected page(s)', error)
|
||||
|
|
|
@ -231,7 +231,8 @@ export class RoleUsersComponent implements OnInit, OnDestroy, OnChanges {
|
|||
}
|
||||
this.filterActiveBySearch(this.filterForm.value.active);
|
||||
this.userManagementService.updateUserInfo();
|
||||
this.clearCacheService.purgeBrowserCache(this.role + 's of ' + this.id + ' have been updated',this.id);
|
||||
this.clearCacheService.clearCacheInRoute(this.role + 's of ' + this.id + ' have been updated',this.id, "/");
|
||||
this.clearCacheService.clearCacheInRoute(this.role + 's of ' + this.id + ' have been updated',this.id, "/curators");
|
||||
NotificationHandler.rise(this.selectedUser + ' <b>is no longer</b> ' + this.role + ' of ' + this.name + ' Dashboard');
|
||||
this.loadActive = false;
|
||||
}, error => {
|
||||
|
|
Loading…
Reference in New Issue