From cdc417b60c46df5d29b82238078dc7f958124a5f Mon Sep 17 00:00:00 2001 From: Konstantinos Triantafyllou Date: Thu, 26 Nov 2020 16:23:21 +0000 Subject: [PATCH] [Monitor Dashaboard | Trunk]: 1. Add window resize method. 2. Some changes on stakeholder's page. 3. Make width of sidebar smaller. git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-monitor-portal/trunk/monitor_dashboard@59976 d315682c-612b-4755-9ff5-7f18f6832af3 --- src/app/app.component.html | 1 - src/app/app.component.ts | 12 +- src/app/monitor/monitor.component.html | 31 ++-- src/app/monitor/monitor.component.ts | 220 ++++++++++++++--------- src/app/topic/topic.component.html | 2 +- src/assets/dashboard-theme/structure.css | 6 +- src/assets/new.css | 23 ++- 7 files changed, 173 insertions(+), 122 deletions(-) diff --git a/src/app/app.component.html b/src/app/app.component.html index 94a30ff..b6745f2 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -1,4 +1,3 @@ -
diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 1ff3d19..a9449cf 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -1,4 +1,4 @@ -import {ChangeDetectorRef, Component, OnDestroy, OnInit} from '@angular/core'; +import {ChangeDetectorRef, Component, HostListener, OnDestroy, OnInit} from '@angular/core'; import {ActivatedRoute, NavigationEnd, Params, Router} from '@angular/router'; import {EnvProperties} from './openaireLibrary/utils/properties/env-properties'; import {EnvironmentSpecificService} from './openaireLibrary/utils/properties/environment-specific.service'; @@ -72,6 +72,16 @@ export class AppComponent implements OnInit, OnDestroy { })); } + @HostListener('window:resize', ['$event']) + onResize(event) { + if(this.layoutService.isSmallScreen && event.target.innerWidth > 1219) { + this.layoutService.setSmallScreen(false); + } else if(!this.layoutService.isSmallScreen && event.target.innerWidth < 1219) { + this.layoutService.setSmallScreen(true); + this.layoutService.setOpen(false); + } + } + ngOnInit() { if (typeof document !== 'undefined' && window) { this.innerWidth = window.innerWidth; diff --git a/src/app/monitor/monitor.component.html b/src/app/monitor/monitor.component.html index df80751..3b59555 100644 --- a/src/app/monitor/monitor.component.html +++ b/src/app/monitor/monitor.component.html @@ -41,7 +41,7 @@
-
+