plugins-functionality #43
|
@ -52,11 +52,11 @@ export class PluginsService {
|
||||||
}
|
}
|
||||||
getPluginsByPageRoute(api:string, pid:string, route:string){
|
getPluginsByPageRoute(api:string, pid:string, route:string){
|
||||||
let url = api + 'community/' +pid+'/plugins/page/route?route=' + route;
|
let url = api + 'community/' +pid+'/plugins/page/route?route=' + route;
|
||||||
return this.http.get<Array<Plugin>>((properties.useLongCache) ? (properties.cacheUrl + encodeURIComponent(url) + (properties.forceCacheReload?'&forceReload=true':'')) : url);
|
return this.http.get<Array<Plugin>>(/*(properties.useLongCache) ? (properties.cacheUrl + encodeURIComponent(url) + (properties.forceCacheReload?'&forceReload=true':'')) : */url);
|
||||||
}
|
}
|
||||||
getPluginTemplatesByPageRoute(api:string, pid:string, route:string){
|
getPluginTemplatesByPageRoute(api:string, pid:string, route:string){
|
||||||
let url = api + 'community/' + pid + '/pluginTemplates/page/route?route=' + route;
|
let url = api + 'community/' + pid + '/pluginTemplates/page/route?route=' + route;
|
||||||
return this.http.get<Array<PluginTemplate>>((properties.useLongCache) ? (properties.cacheUrl + encodeURIComponent(url) + (properties.forceCacheReload?'&forceReload=true':'')) : url);
|
return this.http.get<Array<PluginTemplate>>(/*(properties.useLongCache) ? (properties.cacheUrl + encodeURIComponent(url) + (properties.forceCacheReload?'&forceReload=true':'')) :*/ url);
|
||||||
}
|
}
|
||||||
|
|
||||||
togglePlugin(id: string, status: boolean, api: string, community) {
|
togglePlugin(id: string, status: boolean, api: string, community) {
|
||||||
|
|
|
@ -37,7 +37,7 @@ export class ConfigurationService {
|
||||||
if (pid == null || this.portal?.getValue()?.static) return;
|
if (pid == null || this.portal?.getValue()?.static) return;
|
||||||
let url = properties.adminToolsAPIURL + "/" + properties.adminToolsPortalType + "/" + pid + "/full";
|
let url = properties.adminToolsAPIURL + "/" + properties.adminToolsPortalType + "/" + pid + "/full";
|
||||||
this.promise = new Promise<void>(resolve => {
|
this.promise = new Promise<void>(resolve => {
|
||||||
this.sub = this.http.get<Portal>((properties.useLongCache) ? (properties.cacheUrl + encodeURIComponent(url) + (properties.forceCacheReload?'&forceReload=true':'')) : url).subscribe(
|
this.sub = this.http.get<Portal>(/*(properties.useLongCache) ? (properties.cacheUrl + encodeURIComponent(url) + (properties.forceCacheReload?'&forceReload=true':'')) :*/ url).subscribe(
|
||||||
(portal: Portal) => {
|
(portal: Portal) => {
|
||||||
this.portal.next(portal);
|
this.portal.next(portal);
|
||||||
resolve();
|
resolve();
|
||||||
|
|
|
@ -26,7 +26,7 @@ export class HelperService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.http.get((properties.useLongCache)? (properties.cacheUrl+encodeURIComponent(url)+ (properties.forceCacheReload?'&forceReload=true':'')): url);
|
return this.http.get(/*(properties.useLongCache)? (properties.cacheUrl+encodeURIComponent(url)+ (properties.forceCacheReload?'&forceReload=true':'')):*/ url);
|
||||||
//.map(res => <any> res.json());
|
//.map(res => <any> res.json());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,7 @@ export class HelperService {
|
||||||
let url = properties.adminToolsAPIURL;
|
let url = properties.adminToolsAPIURL;
|
||||||
url += '/' + portalType + '/' + portal + '/pagehelpcontent/grouped?active=true&page=' +
|
url += '/' + portalType + '/' + portal + '/pagehelpcontent/grouped?active=true&page=' +
|
||||||
((page_route.indexOf("/"+portal+"/")!=-1 ) ? ("/" + page_route.split("/"+portal+"/")[1]) : page_route);
|
((page_route.indexOf("/"+portal+"/")!=-1 ) ? ("/" + page_route.split("/"+portal+"/")[1]) : page_route);
|
||||||
return this.http.get((properties.useLongCache) ? (properties.cacheUrl + encodeURIComponent(url)+ (properties.forceCacheReload?'&forceReload=true':'')) : url);
|
return this.http.get(/*(properties.useLongCache) ? (properties.cacheUrl + encodeURIComponent(url)+ (properties.forceCacheReload?'&forceReload=true':'')) :*/ url);
|
||||||
}else {
|
}else {
|
||||||
return of(null);
|
return of(null);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue