Skip to content
Snippets Groups Projects
Commit c50b8014 authored by François Agneray's avatar François Agneray
Browse files

#Fixed bug: instance general background-color

parent 89cc9993
No related branches found
No related tags found
1 merge request!73Develop
...@@ -42,6 +42,7 @@ import { InstanceStyleService } from './instance-style.service'; ...@@ -42,6 +42,7 @@ import { InstanceStyleService } from './instance-style.service';
}) })
export class InstanceComponent implements OnInit, OnDestroy { export class InstanceComponent implements OnInit, OnDestroy {
public favIcon: HTMLLinkElement = document.querySelector('#favicon'); public favIcon: HTMLLinkElement = document.querySelector('#favicon');
public body: HTMLBodyElement = document.querySelector('body');
public instance: Observable<Instance>; public instance: Observable<Instance>;
public isAuthenticated: Observable<boolean>; public isAuthenticated: Observable<boolean>;
public userProfile: Observable<UserProfile>; public userProfile: Observable<UserProfile>;
...@@ -91,6 +92,7 @@ export class InstanceComponent implements OnInit, OnDestroy { ...@@ -91,6 +92,7 @@ export class InstanceComponent implements OnInit, OnDestroy {
this.setFaviconHref(instance); this.setFaviconHref(instance);
} }
if(document.styleSheets.length > 0) { if(document.styleSheets.length > 0) {
this.body.style.backgroundColor = instance.design_background_color;
this.style.applyInstanceStyle(instance); this.style.applyInstanceStyle(instance);
} }
} }
......
...@@ -34,6 +34,7 @@ import { StyleService } from 'src/app/shared/services/style.service'; ...@@ -34,6 +34,7 @@ import { StyleService } from 'src/app/shared/services/style.service';
}) })
export class PortalHomeComponent implements OnInit { export class PortalHomeComponent implements OnInit {
public favIcon: HTMLLinkElement = document.querySelector('#favicon'); public favIcon: HTMLLinkElement = document.querySelector('#favicon');
public body: HTMLBodyElement = document.querySelector('body');
public isAuthenticated: Observable<boolean>; public isAuthenticated: Observable<boolean>;
public userProfile: Observable<UserProfile>; public userProfile: Observable<UserProfile>;
public userRoles: Observable<string[]>; public userRoles: Observable<string[]>;
...@@ -51,6 +52,7 @@ export class PortalHomeComponent implements OnInit { ...@@ -51,6 +52,7 @@ export class PortalHomeComponent implements OnInit {
ngOnInit() { ngOnInit() {
this.favIcon.href = 'favicon.ico'; this.favIcon.href = 'favicon.ico';
this.body.style.backgroundColor = 'white';
this.style.setStyles('.footer', { this.style.setStyles('.footer', {
'background-color': '#F8F9FA', 'background-color': '#F8F9FA',
'border-top': 'none', 'border-top': 'none',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment