diff --git a/src/app/about/about.component.html b/src/app/about/about.component.html index b070320401863f9286991dae3756c38460a78966..e3cae7cc6e82ea70356c730fa3dc7e92e5d141ae 100644 --- a/src/app/about/about.component.html +++ b/src/app/about/about.component.html @@ -1,3 +1,8 @@ +<div class="logo"> + <a [routerLink]="['/']"> + <img src="assets/IQB-LogoA.png" matTooltip="Startseite"/> + </a> +</div> <div class="page-body"> <div fxLayout="row" fxLayoutAlign="center start"> <mat-card fxFlex="0 2 500px"> diff --git a/src/app/about/about.component.ts b/src/app/about/about.component.ts index 7fdb646a0ca7e6413e961a9f19f191dc163916a6..cd480ad4c47b2677e719d7b6728d4cccc943968a 100644 --- a/src/app/about/about.component.ts +++ b/src/app/about/about.component.ts @@ -1,19 +1,13 @@ -import { Component, Inject, OnInit } from '@angular/core'; -import { LogindataService } from '../logindata.service'; +import { Component, Inject } from '@angular/core'; @Component({ templateUrl: './about.component.html' }) -export class AboutComponent implements OnInit { +export class AboutComponent { constructor( @Inject('APP_NAME') private appName: string, @Inject('APP_PUBLISHER') private appPublisher: string, - @Inject('APP_VERSION') private appVersion: string, - private lds: LogindataService + @Inject('APP_VERSION') private appVersion: string ) { } - - ngOnInit() { - this.lds.pageTitle$.next(''); - } } diff --git a/src/app/app.component.html b/src/app/app.component.html index 0be6ebdc3b59ac9c7e85651eb3189ce51cb39f72..90c6b64632858139a9e4f4b1c55d0ee1d6e7b740 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -1,9 +1 @@ -<mat-toolbar> - <a [routerLink]="['/']"> - <img class="logo" src="assets/IQB-LogoA.png" matTooltip="Startseite"/> - </a> - <span>{{ title }}</span> - <span class="itp-fill-remaining-space"></span> -</mat-toolbar> - -<router-outlet></router-outlet> +<router-outlet></router-outlet> \ No newline at end of file diff --git a/src/app/app.component.scss b/src/app/app.component.scss index 5a3e16aae3d6859bd581a38bfe11d7fb75593011..0edce9460087f9d42fcc8bedbfd70bf7f1e468c7 100644 --- a/src/app/app.component.scss +++ b/src/app/app.component.scss @@ -20,18 +20,3 @@ mat-toolbar > span { white-space: nowrap; overflow: hidden; } - -.logo { - width: 80px; - margin-right: 20px; - margin-top: 12px; -} - -// button.mat-menu-item { -// margin: 0px; -// } - -// .material-icons { -// font-size: 1.6rem; -// } - diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 445ed92606f1030bdd8920261616dafc1166e74f..88155c5c4bae10bd46d2f88544d8a5994c059587 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -1,10 +1,4 @@ -import { SyscheckDataService } from './sys-check/syscheck-data.service'; -import { TestControllerService } from './test-controller'; import { LogindataService } from './logindata.service'; -import { merge } from 'rxjs'; - -// import { TestdataService } from './test-controller'; -import { Router } from '@angular/router'; import { Component, OnInit } from '@angular/core'; @Component({ @@ -15,27 +9,12 @@ import { Component, OnInit } from '@angular/core'; export class AppComponent implements OnInit { - public title = ''; constructor ( - private lds: LogindataService, - private tcs: TestControllerService, - private ccs: SyscheckDataService, - private router: Router) { } + private lds: LogindataService + ) { } ngOnInit() { - - merge( - this.ccs.pageTitle$, - this.lds.pageTitle$, - this.tcs.pageTitle$).subscribe(t => { - this.title = t; - }); - - this.lds.pageTitle$.subscribe(t => { - this.title = t; - }); - // give a message to the central message broadcast window.addEventListener('message', (event: MessageEvent) => { const msgData = event.data; diff --git a/src/app/logindata.service.ts b/src/app/logindata.service.ts index b4448befcac13effdef3bb556c30099ed1340543..d0872c50ffdae75854ffaab7aa4130dd26ff85e6 100644 --- a/src/app/logindata.service.ts +++ b/src/app/logindata.service.ts @@ -7,10 +7,6 @@ import { Injectable } from '@angular/core'; providedIn: 'root' }) export class LogindataService { - - // observed only by app.components for the page header - public pageTitle$ = new BehaviorSubject<string>('IQB-Testcenter'); - // key for test-controller // only these two are stored in localStorage public bookletDbId$ = new BehaviorSubject<number>(0); diff --git a/src/app/start/start.component.html b/src/app/start/start.component.html index 144a80fb3bce77dd5cacdff48768e9d1797efdb1..76f9c08f8704190cf30b6f31aabbe7d00cfb63f1 100644 --- a/src/app/start/start.component.html +++ b/src/app/start/start.component.html @@ -1,3 +1,8 @@ +<div class="logo"> + <a [routerLink]="['/']"> + <img src="assets/IQB-LogoA.png" matTooltip="Startseite"/> + </a> +</div> <div class="page-body"> <div class="spinner-container" *ngIf="dataLoading"> <mat-spinner></mat-spinner> @@ -125,7 +130,8 @@ </mat-card-content> <mat-card-actions> <button mat-raised-button color="foreground" [routerLink]="['/about']">Impressum/Datenschutz</button> - <button mat-raised-button color="foreground" [routerLink]="['/check']">System-Check</button> + <!-- if you like to activate system-check, the unit will not work anymore (navi-buttons) --> + <!-- <button mat-raised-button color="foreground" [routerLink]="['/check']">System-Check</button> --> </mat-card-actions> </mat-card> </div> diff --git a/src/app/start/start.component.ts b/src/app/start/start.component.ts index 72d4e1c230deb4078f0d50b602d5d1a7e8e91adb..c2fee21422275e2ded48080d06c17867a4f40eca 100644 --- a/src/app/start/start.component.ts +++ b/src/app/start/start.component.ts @@ -48,7 +48,6 @@ export class StartComponent implements OnInit { } ngOnInit() { - this.lds.pageTitle$.next(''); this.lds.loginStatusText$.subscribe(t => this.loginStatusText = t); this.lds.personToken$.subscribe(pt => { diff --git a/src/app/sys-check/run.component.html b/src/app/sys-check/run.component.html index b921d28861ec4abca617ad8000d39f5fee64a04d..a59d4804534b1c607766c6ff1f9a1fe846fb6ee4 100644 --- a/src/app/sys-check/run.component.html +++ b/src/app/sys-check/run.component.html @@ -1,3 +1,9 @@ +<div class="logo"> + <a [routerLink]="['/']"> + <img src="assets/IQB-LogoA.png" matTooltip="Startseite"/> + </a> +</div> +<div class="pagetitle">{{ pagetitle }}</div> <div class="spinner-container" *ngIf="dataLoading"> <mat-spinner></mat-spinner> </div> diff --git a/src/app/sys-check/run.component.ts b/src/app/sys-check/run.component.ts index bf6c976a79687b1d5fcc203a38922a5ed1a90387..b5c85a86f0454d4e6d2d6aad94f235b035368a62 100644 --- a/src/app/sys-check/run.component.ts +++ b/src/app/sys-check/run.component.ts @@ -31,6 +31,7 @@ export class RunComponent implements OnInit { saveEnabled = false; questionsonlymode = false; skipnetwork = false; + pagetitle = 'IQB-Testcenter: System-Check'; constructor( diff --git a/src/app/sys-check/start.component.html b/src/app/sys-check/start.component.html index 0b9e84b6a80a8c8eb7509c5ef246f01b86967b89..b9a21e449cb9c06aaa40b9c179ff05af284593e2 100644 --- a/src/app/sys-check/start.component.html +++ b/src/app/sys-check/start.component.html @@ -1,3 +1,8 @@ +<div class="logo"> + <a [routerLink]="['/']"> + <img src="assets/IQB-LogoA.png" matTooltip="Startseite"/> + </a> +</div> <div class="spinner-container" *ngIf="dataLoading"> <mat-spinner></mat-spinner> </div> diff --git a/src/app/sys-check/syscheck-data.service.ts b/src/app/sys-check/syscheck-data.service.ts index 1107a063cd17640c340b7379fa6ee61341c193b1..d26e6517cae0825384f0be37f9c595af26460629 100644 --- a/src/app/sys-check/syscheck-data.service.ts +++ b/src/app/sys-check/syscheck-data.service.ts @@ -8,8 +8,6 @@ import { Injectable } from '@angular/core'; providedIn: 'root' }) export class SyscheckDataService { - public pageTitle$ = new BehaviorSubject<string>('IQB-Testcenter - System-Check'); - public checkConfig$ = new BehaviorSubject<CheckConfigData>(null); public environmentData$ = new BehaviorSubject<ReportEntry[]>([]); public networkData$ = new BehaviorSubject<ReportEntry[]>([]); @@ -31,8 +29,4 @@ export class SyscheckDataService { this.questionnaireData$.next([]); }); } - - setPageTitle() { - this.pageTitle$.next('IQB-Testcenter - System-Check'); - } } diff --git a/src/app/test-controller/test-controller-routing.module.ts b/src/app/test-controller/test-controller-routing.module.ts index 6cd84d71fcedfacd8231508d888f892a57673528..0ffc1243501212e77d6c01e571b26f165146a723 100644 --- a/src/app/test-controller/test-controller-routing.module.ts +++ b/src/app/test-controller/test-controller-routing.module.ts @@ -9,16 +9,18 @@ import { Routes, RouterModule } from '@angular/router'; const routes: Routes = [ { path: '', - component: TestControllerComponent - }, - { - path: 'u/:u', - component: UnithostComponent, - canActivate: [UnitActivateGuard], - canDeactivate: [UnitDeactivateGuard] - // resolve: { - // unitData: UnitResolver - // } + component: TestControllerComponent, + children: [ + { + path: 'u/:u', + component: UnithostComponent, + canActivate: [UnitActivateGuard], + canDeactivate: [UnitDeactivateGuard] + // resolve: { + // unitData: UnitResolver + // } + } + ] } ]; diff --git a/src/app/test-controller/test-controller.component.css b/src/app/test-controller/test-controller.component.css index 13bb0665fbc3026f1ae3ed5f0fee7028ebe62c2c..6ca5d21bb7a7bd72b576bb5470c6d08f4d6916f6 100644 --- a/src/app/test-controller/test-controller.component.css +++ b/src/app/test-controller/test-controller.component.css @@ -17,3 +17,11 @@ .errorMsg { color: brown; } + +.tc-body { + overflow-x: auto; + position: absolute; + width: 100%; + top: 65px; + bottom: 0; +} diff --git a/src/app/test-controller/test-controller.component.html b/src/app/test-controller/test-controller.component.html index 14446bdd6be649af049cab9ba63c7d9f4b21528d..831568c414a8cceabc2af817ec45b0bd9cff5d4b 100644 --- a/src/app/test-controller/test-controller.component.html +++ b/src/app/test-controller/test-controller.component.html @@ -1,8 +1,11 @@ -<!-- <tc-menu-buttons></tc-menu-buttons> --> -<tc-navi-buttons></tc-navi-buttons> +<div class="logo"> + <a [routerLink]="['/']"> + <img src="assets/IQB-LogoA.png" matTooltip="Startseite"/> + </a> +</div> <div class="spinner-container" *ngIf="dataLoading"> <mat-spinner></mat-spinner> </div> -<div class="page-body"> +<div class="tc-body"> <router-outlet></router-outlet> </div> diff --git a/src/app/test-controller/test-controller.component.ts b/src/app/test-controller/test-controller.component.ts index c25600c2a38b67b4b3a27b62ad554861bdf54581..fb4b4a68e11f7de05bcc38a95876939e49ee9ada 100644 --- a/src/app/test-controller/test-controller.component.ts +++ b/src/app/test-controller/test-controller.component.ts @@ -94,8 +94,6 @@ export class TestControllerComponent implements OnInit { if (cu >= 0) { this.statusMsg = ''; } else { - // this.tcs.pageTitle$.next('IQB-Testcenter'); - if (this.allUnits.length === 0) { this.statusMsg = 'Es stehen keine Informationen über ein gewähltes Testheft zur Verfügung.'; } else { diff --git a/src/app/test-controller/test-controller.service.ts b/src/app/test-controller/test-controller.service.ts index 7cd44377e8488f49498e63438bdaa3484a5d3a2c..2d0286abcb3310a867b69e35d5b34cd31fb32506 100644 --- a/src/app/test-controller/test-controller.service.ts +++ b/src/app/test-controller/test-controller.service.ts @@ -11,9 +11,6 @@ import { UnitDef, BookletDef } from './test-controller.classes'; providedIn: 'root' }) export class TestControllerService { - // observed only by app.components for the page header - public pageTitle$ = new BehaviorSubject<string>('Lade Seite...'); - public booklet$ = new BehaviorSubject<BookletDef>(null); public currentUnitPos$ = new BehaviorSubject<number>(-1); diff --git a/src/app/test-controller/unithost/unithost.component.css b/src/app/test-controller/unithost/unithost.component.css index c0d476d82cc30d63af5e42bf9beef6efe9013c87..ee147b56de31bc73eba1b6a7c241c6f78e312eb1 100644 --- a/src/app/test-controller/unithost/unithost.component.css +++ b/src/app/test-controller/unithost/unithost.component.css @@ -1,12 +1,21 @@ .unit-body { position: absolute; width: 100%; - top: 70px; + top: 40px; bottom: 45px; padding: 0px; background-color: white; } +#unit-title { + width: 100%; + padding: 0px; + height: 40px; + font-size: 1.5em; + background-color: white; + border-bottom: solid 2px black; +} + #pageNav { position: absolute; width: 100%; diff --git a/src/app/test-controller/unithost/unithost.component.html b/src/app/test-controller/unithost/unithost.component.html index 97786f03f5a2032b8fa68e6eabf40eeb7f600822..b6c3055b1ee77a3e6dede56055ed31e6e1d15531 100644 --- a/src/app/test-controller/unithost/unithost.component.html +++ b/src/app/test-controller/unithost/unithost.component.html @@ -1,6 +1,9 @@ <div class="spinner-container" *ngIf="dataLoading"> <mat-spinner></mat-spinner> </div> +<div id="unit-title" fxLayoutAlign="center center"> + {{ unitTitle }} +</div> <div id="iFrameHost" iqbResizeIFrameChild class="unit-body"> </div> diff --git a/src/app/test-controller/unithost/unithost.component.ts b/src/app/test-controller/unithost/unithost.component.ts index f1671c2209e44ee055a14dcac99d4eae7fad3ad1..8b4711ce0954d75f2730195b405e7a09b7dc11a4 100644 --- a/src/app/test-controller/unithost/unithost.component.ts +++ b/src/app/test-controller/unithost/unithost.component.ts @@ -28,6 +28,7 @@ export class UnithostComponent implements OnInit, OnDestroy { private myUnitNumber = -1; private myUnitName = ''; + private unitTitle = ''; // ::::::::::::::::::::: private postMessageSubscription: Subscription = null; @@ -257,7 +258,7 @@ export class UnithostComponent implements OnInit, OnDestroy { const booklet = this.tcs.booklet$.getValue(); if ((currentUnitId >= 0) && (this.myUnitNumber === currentUnitId) && (booklet !== null)) { const currentUnit = booklet.getUnitAt(currentUnitId); - this.tcs.pageTitle$.next(currentUnit.label); // (currentUnitId + 1).toString() + '. ' + this.unitTitle = currentUnit.label; // (currentUnitId + 1).toString() + '. ' this.myUnitName = currentUnit.id; this.iFrameItemplayer = <HTMLIFrameElement>document.createElement('iframe'); diff --git a/src/index.html b/src/index.html index eb294f55d6a26bdb80dfa77a3c7f0d828f12b447..c8289e5edf635ad8737d72d5bad68f2022474333 100644 --- a/src/index.html +++ b/src/index.html @@ -2,7 +2,7 @@ <html lang="en"> <head> <meta charset="utf-8"> - <title>IQBTestcenter</title> + <title>IQB-Testcenter</title> <base href="/"> <meta name="viewport" content="width=device-width, initial-scale=1"> diff --git a/src/styles.css b/src/styles.css index 9aa631cfddc7a227aa8337ca03c12aa8aada37bd..68f0965a9e0d7cd0c3c6306955fe2a09f9a8e026 100644 --- a/src/styles.css +++ b/src/styles.css @@ -15,11 +15,6 @@ width: 100%; top: 70px; bottom: 0; - /* display: flex; - flex-direction: row; - flex-wrap: nowrap; - align-items: flex-start; - justify-content: left; */ } .sheetofpaper { @@ -61,3 +56,21 @@ p.unitMessage { text-align: center; } +.logo { + position: absolute; + left: 5px; + top: 5px; +} + +div.logo img { + width: 100px; +} + +.pagetitle { + position: absolute; + left: 100px; + top: 18px; + font-size: 1.5em; + color: white; +} +