diff --git a/src/app/app.component.ts b/src/app/app.component.ts index d0dceda..a611199 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -169,7 +169,7 @@ export class AppComponent { this.configurationService.initCommunityInformation(this.properties, (communityId) ? communityId : this.properties.adminToolsPortalType); } initLayout(communityId){ - if(!this.layout) { + if(!this.layout && location.pathname.indexOf("/preview") == -1) { this._layoutService.getLayout(this.properties, communityId).subscribe( layout => { if (layout) { diff --git a/src/app/utils/customization/customization.component.ts b/src/app/utils/customization/customization.component.ts index 690db1c..fc1e472 100644 --- a/src/app/utils/customization/customization.component.ts +++ b/src/app/utils/customization/customization.component.ts @@ -62,15 +62,19 @@ export class CustomizationComponent { :root { --portal-main-color: ` + this.layout.identity.mainColor+`; --portal-dark-color: ` + this.layout.identity.secondaryColor+`; + --background-light-color:` + this.layout.backgrounds.light.color+`; } `; - //Search SVG - let search = `Asset 3`;; - let svg = 'data:image/svg+xml,' + encodeURIComponent(search.replace('{{color}}', this.layout.backgrounds.form.color)); - this.customizationCss = this.customizationCss.concat('.generalSearchForm,.publicationsSearchForm,.projectsSearchForm, .projectsTableSearchForm,.organizationsSearchForm,.datasourcesSearchForm {'); - this.customizationCss = this.customizationCss.concat(' background: ' + "url('" + svg + "') transparent no-repeat center bottom; "); - this.customizationCss = this.customizationCss.concat(" background-size: cover !important; "); - this.customizationCss = this.customizationCss.concat(" height: inherit; }"); + console.log(" create form css " , this.layout.backgrounds.form) + //Search SVG + let search = `Asset 3`; + ; + let svg = 'data:image/svg+xml,' + encodeURIComponent(search.replace('{{color}}', this.layout.backgrounds.form.color)); + this.customizationCss = this.customizationCss.concat('.generalSearchForm,.publicationsSearchForm,.projectsSearchForm, .projectsTableSearchForm,.organizationsSearchForm,.datasourcesSearchForm {'); + this.customizationCss = this.customizationCss.concat(' background: ' + + "url('" + (this.layout.backgrounds.form.imageFile?(this.properties.utilsService + '/download/' +this.layout.backgrounds.form.imageFile): svg) + "') transparent no-repeat "+this.layout.backgrounds.form.position+" ;"); + this.customizationCss = this.customizationCss.concat(" background-size: cover !important; "); + this.customizationCss = this.customizationCss.concat(" height: inherit; }"); //Button link SVG let arrow = ``;; diff --git a/src/app/utils/piwikHelper.ts b/src/app/utils/piwikHelper.ts index 9eafe6c..f6ba27d 100644 --- a/src/app/utils/piwikHelper.ts +++ b/src/app/utils/piwikHelper.ts @@ -24,7 +24,8 @@ export class PiwikHelper{ "gotriple":490, "neanias-underwater":474, "inspired-ris":530, - "citizen-science":538 + "citizen-science":538, + "eut":558 }; public static getSiteId(communityId:string, environment:string){ return this.siteIDs[communityId];