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 *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=='connect'" [class.uk-active]="tab === 'customization'"><a routerLink="../customization">Customization</a></li>
|
||||
</ul>
|
||||
`
|
||||
})
|
||||
|
@ -25,7 +26,7 @@ export class AdminTabsComponent implements OnInit {
|
|||
@Input()
|
||||
public user: User;
|
||||
@Input()
|
||||
public tab: "portal" | "page" | "entity" | "menu" | "class" = 'page';
|
||||
public tab: "portal" | "page" | "entity" | "menu" | "class" | "customization"= 'page';
|
||||
private subscriptions: any[] = [];
|
||||
|
||||
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 );
|
||||
}
|
||||
|
||||
saveLayout(properties: EnvProperties, pid: string, layout: Layout): Observable<Layout> {
|
||||
saveLayout(properties: EnvProperties, pid: string, layout: Layout, portalType = null): Observable<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());
|
||||
}
|
||||
|
||||
|
@ -34,7 +34,9 @@ export class LayoutService {
|
|||
return this.http.get<Layout>(properties.adminToolsAPIURL+"/" + properties.adminToolsPortalType + '/'
|
||||
+ pid + '/layout');
|
||||
}
|
||||
|
||||
getLayouts(properties: EnvProperties): Observable<Layout[]> {
|
||||
return this.http.get<Layout[]>(properties.adminToolsAPIURL+'/community/layouts');
|
||||
}
|
||||
mockLayout(): any {
|
||||
return this.http.get('./assets/customizationOptions.json') ;
|
||||
|
||||
|
|
Loading…
Reference in New Issue