plugins-functionality #43

Merged
argiro.kokogiannaki merged 86 commits from plugins-functionality into develop 2024-06-13 09:14:22 +02:00
3 changed files with 5 additions and 5 deletions
Showing only changes of commit 01554f58f5 - Show all commits

View File

@ -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) {

View File

@ -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();

View File

@ -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);
} }