Connect Admin Customization: create button that updates layout timestamp and create new css files
This commit is contained in:
parent
26d849693b
commit
dbbb832bff
|
@ -14,6 +14,7 @@ import { properties } from 'src/environments/environment';
|
||||||
<li [class.uk-active]="tab === 'entity'"><a routerLink="../entities">Entities</a></li>
|
<li [class.uk-active]="tab === 'entity'"><a routerLink="../entities">Entities</a></li>
|
||||||
<li *ngIf="portal && type === 'community'" [class.uk-active]="tab === 'menu'"><a routerLink="../menu">Menu</a></li>
|
<li *ngIf="portal && type === 'community'" [class.uk-active]="tab === 'menu'"><a routerLink="../menu">Menu</a></li>
|
||||||
<li *ngIf="isPortalAdmin && !portal" [class.uk-active]="tab === 'class'"><a routerLink="../classes">Classes</a></li>
|
<li *ngIf="isPortalAdmin && !portal" [class.uk-active]="tab === 'class'"><a routerLink="../classes">Classes</a></li>
|
||||||
|
<li *ngIf="isPortalAdmin && portal=='connect'" [class.uk-active]="tab === 'customization'"><a routerLink="../customization">Customization</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
`
|
`
|
||||||
})
|
})
|
||||||
|
@ -25,7 +26,7 @@ export class AdminTabsComponent implements OnInit {
|
||||||
@Input()
|
@Input()
|
||||||
public user: User;
|
public user: User;
|
||||||
@Input()
|
@Input()
|
||||||
public tab: "portal" | "page" | "entity" | "menu" | "class" = 'page';
|
public tab: "portal" | "page" | "entity" | "menu" | "class" | "customization"= 'page';
|
||||||
private subscriptions: any[] = [];
|
private subscriptions: any[] = [];
|
||||||
|
|
||||||
constructor(private route: ActivatedRoute, private userManagementService: UserManagementService) {
|
constructor(private route: ActivatedRoute, private userManagementService: UserManagementService) {
|
||||||
|
|
|
@ -24,9 +24,9 @@ export class LayoutService {
|
||||||
return this.http.post(connectPortalUrl + "/build-css/" + (layout?"preview/":"") + pid + (suffix?("/"+ suffix):""), layout );
|
return this.http.post(connectPortalUrl + "/build-css/" + (layout?"preview/":"") + pid + (suffix?("/"+ suffix):""), layout );
|
||||||
}
|
}
|
||||||
|
|
||||||
saveLayout(properties: EnvProperties, pid: string, layout: Layout): Observable<Layout> {
|
saveLayout(properties: EnvProperties, pid: string, layout: Layout, portalType = null): Observable<Layout> {
|
||||||
LayoutService.removeNulls(layout);
|
LayoutService.removeNulls(layout);
|
||||||
return this.http.post<Layout>(properties.adminToolsAPIURL + '/' + properties.adminToolsPortalType + '/'
|
return this.http.post<Layout>(properties.adminToolsAPIURL + '/' + (portalType?portalType: properties.adminToolsPortalType) + '/'
|
||||||
+ pid + '/layout', layout, CustomOptions.getAuthOptionsWithBody());
|
+ pid + '/layout', layout, CustomOptions.getAuthOptionsWithBody());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,7 +34,9 @@ export class LayoutService {
|
||||||
return this.http.get<Layout>(properties.adminToolsAPIURL+"/" + properties.adminToolsPortalType + '/'
|
return this.http.get<Layout>(properties.adminToolsAPIURL+"/" + properties.adminToolsPortalType + '/'
|
||||||
+ pid + '/layout');
|
+ pid + '/layout');
|
||||||
}
|
}
|
||||||
|
getLayouts(properties: EnvProperties): Observable<Layout[]> {
|
||||||
|
return this.http.get<Layout[]>(properties.adminToolsAPIURL+'/community/layouts');
|
||||||
|
}
|
||||||
mockLayout(): any {
|
mockLayout(): any {
|
||||||
return this.http.get('./assets/customizationOptions.json') ;
|
return this.http.get('./assets/customizationOptions.json') ;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue