Revision 57173
Added by Stefania Martziou over 4 years ago
topmenu-dashboard.component.ts | ||
---|---|---|
17 | 17 |
|
18 | 18 |
inBeta: boolean; |
19 | 19 |
|
20 |
showSideBar = true; |
|
21 |
|
|
20 | 22 |
constructor(public authService: AuthenticationService) { } |
21 | 23 |
|
22 | 24 |
ngOnInit() { |
... | ... | |
28 | 30 |
this.inBeta = ( baseUrl.includes('beta') || baseUrl.includes('athenarc') ); |
29 | 31 |
} |
30 | 32 |
|
33 |
toggleSideMenu() { |
|
34 |
const body = document.getElementsByTagName('body')[0]; |
|
35 |
if (this.showSideBar === true) { |
|
36 |
body.classList.remove('sidebar_main_open'); |
|
37 |
} else { |
|
38 |
body.classList.add('sidebar_main_open'); |
|
39 |
} |
|
40 |
this.showSideBar = !this.showSideBar; |
|
41 |
} |
|
42 |
|
|
31 | 43 |
onClick(id: string) { |
32 | 44 |
const el: HTMLElement = document.getElementById(id); |
33 | 45 |
el.classList.remove('uk-open'); |
Also available in: Unified diff
Fixed the sidebar open/close functionality