[Library | Trunk]: Delete hasMiniMenu from LayoutService.
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60241 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
36effb0106
commit
b8ec43f7af
|
@ -26,10 +26,6 @@ export class LayoutService {
|
||||||
* Add hasAdminMenu: true on data of route config, if global sidebar should be used.
|
* Add hasAdminMenu: true on data of route config, if global sidebar should be used.
|
||||||
*/
|
*/
|
||||||
private hasAdminMenuSubject: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);
|
private hasAdminMenuSubject: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);
|
||||||
/**
|
|
||||||
* Add hasMiniMenu: true on data of route config, if sidebar should be closed to mini should be used.
|
|
||||||
*/
|
|
||||||
private hasMiniMenuSubject: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);
|
|
||||||
/**
|
/**
|
||||||
* Add isFrontPage: true on data of route config, if current route is for front page.
|
* Add isFrontPage: true on data of route config, if current route is for front page.
|
||||||
*/
|
*/
|
||||||
|
@ -78,12 +74,6 @@ export class LayoutService {
|
||||||
} else {
|
} else {
|
||||||
this.setHasAdminMenu(false);
|
this.setHasAdminMenu(false);
|
||||||
}
|
}
|
||||||
if (data['hasMiniMenu'] !== undefined &&
|
|
||||||
data['hasMiniMenu'] === true) {
|
|
||||||
this.setHasMiniMenu(true);
|
|
||||||
} else {
|
|
||||||
this.setHasMiniMenu(false);
|
|
||||||
}
|
|
||||||
if (data['isFrontPage'] !== undefined &&
|
if (data['isFrontPage'] !== undefined &&
|
||||||
data['isFrontPage'] === true) {
|
data['isFrontPage'] === true) {
|
||||||
this.setFrontPage(true);
|
this.setFrontPage(true);
|
||||||
|
@ -139,14 +129,6 @@ export class LayoutService {
|
||||||
this.hasAdminMenuSubject.next(value);
|
this.hasAdminMenuSubject.next(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
get hasMiniMenu(): Observable<boolean> {
|
|
||||||
return this.hasMiniMenuSubject.asObservable();
|
|
||||||
}
|
|
||||||
|
|
||||||
setHasMiniMenu(value: boolean) {
|
|
||||||
this.hasMiniMenuSubject.next(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
get isFrontPage(): Observable<boolean> {
|
get isFrontPage(): Observable<boolean> {
|
||||||
return this.isFrontPageSubject.asObservable();
|
return this.isFrontPageSubject.asObservable();
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,9 +24,11 @@ export class StakeholderService {
|
||||||
private stakeholderSubject: BehaviorSubject<Stakeholder> = null;
|
private stakeholderSubject: BehaviorSubject<Stakeholder> = null;
|
||||||
private promise: Promise<any>;
|
private promise: Promise<any>;
|
||||||
private sub;
|
private sub;
|
||||||
|
|
||||||
constructor(private http: HttpClient, private route: ActivatedRoute) {
|
constructor(private http: HttpClient, private route: ActivatedRoute) {
|
||||||
this.stakeholderSubject = new BehaviorSubject<Stakeholder>(null);
|
this.stakeholderSubject = new BehaviorSubject<Stakeholder>(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnDestroy() {
|
ngOnDestroy() {
|
||||||
this.clearSubscriptions();
|
this.clearSubscriptions();
|
||||||
}
|
}
|
||||||
|
@ -36,6 +38,7 @@ export class StakeholderService {
|
||||||
this.sub.unsubscribe();
|
this.sub.unsubscribe();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
getStakeholder(alias: string): Observable<Stakeholder> {
|
getStakeholder(alias: string): Observable<Stakeholder> {
|
||||||
if (!this.stakeholderSubject.value || this.stakeholderSubject.value.alias !== alias) {
|
if (!this.stakeholderSubject.value || this.stakeholderSubject.value.alias !== alias) {
|
||||||
this.promise = new Promise<any>((resolve, reject) => {
|
this.promise = new Promise<any>((resolve, reject) => {
|
||||||
|
@ -129,10 +132,6 @@ export class StakeholderService {
|
||||||
return this.stakeholderSubject.asObservable();
|
return this.stakeholderSubject.asObservable();
|
||||||
}
|
}
|
||||||
|
|
||||||
get stakeholder(): Stakeholder {
|
|
||||||
return this.stakeholderSubject.getValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
setStakeholder(stakeholder: Stakeholder) {
|
setStakeholder(stakeholder: Stakeholder) {
|
||||||
this.stakeholderSubject.next(stakeholder);
|
this.stakeholderSubject.next(stakeholder);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue