diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 6c6a00c9e93245a180b398fc02145d446b7c56e7..839a91057f3f2b23faa401d5892870000200dc7e 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -1,6 +1,5 @@ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; -import { FooterImprintComponent } from './components/shared/footer-imprint/footer-imprint.component'; import { PageNotFoundComponent } from './components/shared/page-not-found/page-not-found.component'; import { CreatorModule } from './components/creator/creator.module'; import { ParticipantModule } from './components/participant/participant.module'; @@ -24,10 +23,6 @@ const routes: Routes = [ path: 'participant', loadChildren: () => ParticipantModule }, - { - path: 'imprint', - component: FooterImprintComponent - }, { path: '**', component: PageNotFoundComponent diff --git a/src/app/components/creator/content-list/content-list.component.html b/src/app/components/creator/content-list/content-list.component.html index f5e939b8abac85ab96d84b5b29a54552f2d38016..4c06490567b70110ae54d540f84b052b2f4b40d7 100644 --- a/src/app/components/creator/content-list/content-list.component.html +++ b/src/app/components/creator/content-list/content-list.component.html @@ -34,16 +34,17 @@ </mat-grid-list> <mat-divider></mat-divider> <mat-card-content> - <mat-expansion-panel *ngFor="let content of contents"> + <mat-expansion-panel *ngFor="let content of contents; index as i"> <mat-expansion-panel-header> <mat-panel-title> - {{ content.subject }} + {{ labels[i] }} </mat-panel-title> - <button mat-icon-button color="accent" (click)="editContent(content);$event.stopPropagation();"> + <button mat-icon-button color="accent" (click)="editContent(content);$event.stopPropagation();" + class="editButton"> <mat-icon>create</mat-icon> </button> <button mat-icon-button color="warn" (click)="deleteContent(content);$event.stopPropagation();" - class="deleteButton"> + class="deleteButton editButton"> <mat-icon>delete_forever</mat-icon> </button> </mat-expansion-panel-header> diff --git a/src/app/components/creator/content-list/content-list.component.scss b/src/app/components/creator/content-list/content-list.component.scss index f1208e902992f6b59fcfed9e2eae19860249c4cd..38a8e68d9322a53fe62080a8aa0b0b882c1f55c8 100644 --- a/src/app/components/creator/content-list/content-list.component.scss +++ b/src/app/components/creator/content-list/content-list.component.scss @@ -16,10 +16,13 @@ mat-panel-title { flex-basis: 0; align-items: center; font-size: medium; + margin-right: 5px; } mat-expansion-panel-header { background-color: #bbdefb !important; + padding-left: 3%; + padding-right: 3%; } .mat-expansion-panel-header-title { @@ -39,8 +42,13 @@ h2 { } } +.editButton { + width: 15%; + max-width: 60px; +} + .deleteButton { - margin-right: 15px; + margin-right: 4%; } mat-tooltip-component { diff --git a/src/app/components/creator/content-list/content-list.component.ts b/src/app/components/creator/content-list/content-list.component.ts index 5ff4280607b8d3cc01f98c4a376a732e6fa7bbc5..45efdade44854790573e5c2a17e35facc74dafb7 100644 --- a/src/app/components/creator/content-list/content-list.component.ts +++ b/src/app/components/creator/content-list/content-list.component.ts @@ -15,6 +15,7 @@ import { TranslateService } from '@ngx-translate/core'; import { LanguageService } from '../../../services/util/language.service'; import { ContentDeleteComponent } from '../_dialogs/content-delete/content-delete.component'; import { ContentEditComponent } from '../_dialogs/content-edit/content-edit.component'; +import { InnerSubscriber } from 'rxjs/internal/InnerSubscriber'; @Component({ @@ -42,6 +43,10 @@ export class ContentListComponent implements OnInit { collectionName: string; + labelMaxLength: number; + + labels: string[] = []; + constructor(private contentService: ContentService, private roomService: RoomService, private route: ActivatedRoute, @@ -54,6 +59,7 @@ export class ContentListComponent implements OnInit { } ngOnInit() { + this.labelMaxLength = innerWidth / 20; this.roomId = localStorage.getItem(`roomId`); this.roomService.getRoom(this.roomId).subscribe(room => { this.room = room; @@ -62,6 +68,14 @@ export class ContentListComponent implements OnInit { this.contentGroup = JSON.parse(sessionStorage.getItem('contentGroup')); this.contentService.getContentsByIds(this.contentGroup.contentIds).subscribe( contents => { this.contents = contents; + for (let i = 0; i < this.contents.length; i++) { + if (this.contents[i].subject.length > this.labelMaxLength) { + this.labels[i] = this.contents[i].subject.substr(0, this.labelMaxLength) + '..'; + } else { + this.labels[i] = this.contents[i].subject; + } + } + }); this.route.params.subscribe(params => { sessionStorage.setItem('collection', params['contentGroup']); @@ -161,6 +175,7 @@ export class ContentListComponent implements OnInit { break; case 'update': this.contents[index] = this.contentCBackup; + this.contentService.updateContent(this.contents[index]).subscribe(); this.translateService.get('content.content-updated').subscribe(message => { this.notificationService.show(message); }); diff --git a/src/app/components/creator/room-creator-page/room-creator-page.component.scss b/src/app/components/creator/room-creator-page/room-creator-page.component.scss index 5b84d3b6fa7baa33943e7cae94d08e91de903aa5..9a4764ae3219972403b5a0a0d49934c0ef28c035 100644 --- a/src/app/components/creator/room-creator-page/room-creator-page.component.scss +++ b/src/app/components/creator/room-creator-page/room-creator-page.component.scss @@ -17,17 +17,17 @@ button { } } -mat-icon{ - height:90% !important; - width: 90% !important; - font-size:48px !important; - text-align: center; +.mat-icon-button { + width: 75%; + height: 75%; + margin-bottom: 20px; } -.smallerIcon { - height:80% !important; - width:80% !important; - font-size:48px !important; +mat-icon { + font-size: 50px; + height: 50px; + width: 50px; + line-height: 100%!important; } mat-grid-list { @@ -68,6 +68,10 @@ mat-card-subtitle { height: 20%; } +mat-grid-tile { + height: 20px; +} + mat-expansion-panel { background-color: #fff8e1!important; min-width: 200px; diff --git a/src/app/components/creator/room-creator-page/room-creator-page.component.ts b/src/app/components/creator/room-creator-page/room-creator-page.component.ts index adb16bbe06569250cf7d94644a30c6733d6b9187..0d6a23fbb87b0e1846891aed117241960511fc75 100644 --- a/src/app/components/creator/room-creator-page/room-creator-page.component.ts +++ b/src/app/components/creator/room-creator-page/room-creator-page.component.ts @@ -32,6 +32,7 @@ export class RoomCreatorPageComponent extends RoomPageComponent implements OnIni } ngOnInit() { + window.scroll(0, 0); this.translateService.use(localStorage.getItem('currentLang')); this.route.params.subscribe(params => { this.getRoom(params['roomId']); diff --git a/src/app/components/participant/room-participant-page/room-participant-page.component.html b/src/app/components/participant/room-participant-page/room-participant-page.component.html index 3309d1ee2aa7906d972f7206a3e106671e543766..791349770f7c482db4bc3a6f92c7623e3a371cd0 100644 --- a/src/app/components/participant/room-participant-page/room-participant-page.component.html +++ b/src/app/components/participant/room-participant-page/room-participant-page.component.html @@ -31,7 +31,7 @@ <mat-grid-tile> <button mat-icon-button color="primary" matTooltip="{{ 'room-page.give-feedback' | translate}}" routerLink="/participant/room/{{ room.id }}/feedback-barometer"> - <mat-icon class="smallerIcon">thumbs_up_down</mat-icon> + <mat-icon>thumbs_up_down</mat-icon> </button> </mat-grid-tile> <mat-grid-tile> diff --git a/src/app/components/participant/room-participant-page/room-participant-page.component.scss b/src/app/components/participant/room-participant-page/room-participant-page.component.scss index f8e2b2f3c998cfe38c9e4e08a59638dec4435cd7..a3a11c062dd6e0ee95fda1f468f023bf1f507e52 100644 --- a/src/app/components/participant/room-participant-page/room-participant-page.component.scss +++ b/src/app/components/participant/room-participant-page/room-participant-page.component.scss @@ -8,19 +8,19 @@ mat-card { mat-card-content>:first-child { margin-top: 5%; - margin-bottom: 5%; } -mat-icon{ - height:90% !important; - width: 90% !important; - font-size:48px !important; +.mat-icon-button { + width: 75%; + height: 75%; + margin-bottom: 20px; } -.smallerIcon { - height:80% !important; - width:80% !important; - font-size:48px !important; +mat-icon { + font-size: 50px; + height: 50px; + width: 50px; + line-height: 100%!important; } button { @@ -69,6 +69,10 @@ mat-grid-list { margin-bottom: 20px !important; } +mat-grid-tile { + height: 20px; +} + mat-tooltip-component { position: relative; } diff --git a/src/app/components/participant/room-participant-page/room-participant-page.component.ts b/src/app/components/participant/room-participant-page/room-participant-page.component.ts index 52b90efc3b6edeb2bbe6f9fdf45f05c1a5cef0e3..49f308215252343c542b3eb0629952d7f348b3a9 100644 --- a/src/app/components/participant/room-participant-page/room-participant-page.component.ts +++ b/src/app/components/participant/room-participant-page/room-participant-page.component.ts @@ -25,6 +25,7 @@ export class RoomParticipantPageComponent implements OnInit { } ngOnInit() { + window.scroll(0, 0); this.route.params.subscribe(params => { this.getRoom(params['roomId']); }); diff --git a/src/app/components/shared/_dialogs/statistic-help/statistic-help.component.html b/src/app/components/shared/_dialogs/statistic-help/statistic-help.component.html index b0d70ad66bb8f3bd3bfac1113ea7036372b192f6..9d180a3939d4611c060157ab9e99cfc2bdbfeb06 100644 --- a/src/app/components/shared/_dialogs/statistic-help/statistic-help.component.html +++ b/src/app/components/shared/_dialogs/statistic-help/statistic-help.component.html @@ -19,6 +19,12 @@ </mat-chip> <h3> < 50 % </h3> </div> + <div fxLayout="row" fxLayoutAlign="center center" fxLayoutGap="20px"> + <mat-chip class="emptyC"> + No answers + </mat-chip> + <mat-icon>not_interested</mat-icon> + </div> </mat-chip-list> </div> </div> diff --git a/src/app/components/shared/_dialogs/statistic-help/statistic-help.component.scss b/src/app/components/shared/_dialogs/statistic-help/statistic-help.component.scss index d1a486c7a24567dd38bdcec9c5a25ee66d63cf6d..effb292362e0dfc112c82dc4eb387d3ddcce2097 100644 --- a/src/app/components/shared/_dialogs/statistic-help/statistic-help.component.scss +++ b/src/app/components/shared/_dialogs/statistic-help/statistic-help.component.scss @@ -10,8 +10,12 @@ background-color: #FFD54F; } +.emptyC { + background-color: #E0E0E0; +} + mat-chip { - width: 100px!important; + width: 130px!important; display: flex; justify-content: center; } diff --git a/src/app/components/shared/content-groups/content-groups.component.html b/src/app/components/shared/content-groups/content-groups.component.html index 105b7bcaffda409a817eb302be6603fc9626cd64..5e3f715c19ea95d13c8c6f8c22e720e411bcb2e8 100644 --- a/src/app/components/shared/content-groups/content-groups.component.html +++ b/src/app/components/shared/content-groups/content-groups.component.html @@ -1,10 +1,12 @@ <mat-card *ngFor="let contentGroup of contentGroups" (click)="viewContents(contentGroup)"> <mat-card-header> - <mat-card-title> - <h4 *ngIf="!(contentGroup.name === 'Default')">{{contentGroup.name}}</h4> - <h4 *ngIf="contentGroup.name === 'Default'">{{'room-page.default-content-group' | translate}}</h4> + <mat-card-title *ngIf="contentGroup.name === 'Default'"> + {{'room-page.default-content-group' | translate}} </mat-card-title> - <mat-icon color="accent" matBadge="{{contentGroup.contentIds.length}}" + <mat-card-title *ngIf="!(contentGroup.name === 'Default')"> + {{contentGroup.name}} + </mat-card-title> + <mat-icon color="accent" matBadge="{{contentGroup.contentIds.length}}" matBadgePosition="after" matBadgeColor="accent"></mat-icon> </mat-card-header> </mat-card> diff --git a/src/app/components/shared/content-groups/content-groups.component.scss b/src/app/components/shared/content-groups/content-groups.component.scss index ad4034c12d1a50c819deeca576fef6ab75e57181..090b94dc2c9930de5935bcaba2d1e814c3c09eea 100644 --- a/src/app/components/shared/content-groups/content-groups.component.scss +++ b/src/app/components/shared/content-groups/content-groups.component.scss @@ -7,19 +7,25 @@ position: relative; top: 0; text-align: center; - transition: all 0.25s; + transition: all 0.5; margin-top: 10px; - max-height: 80px; - padding: 5px; + max-height: 50px; + padding: 5px; &:hover { cursor: pointer; background-color: mat-color($arsnova-primary, 200); - top: -15px; - box-shadow: 0 12px 16px rgba(0, 0, 0, 0.2); + transform: translateZ(20px); + transform: translateY(-5px); + transform: scaleY(1.2); + box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2); } } mat-icon { margin-top: 20px; } + +mat-card-title { + margin-top: 18px; +} diff --git a/src/app/components/shared/footer-imprint/footer-imprint.component.html b/src/app/components/shared/footer-imprint/footer-imprint.component.html deleted file mode 100644 index 53eaf18269306fe6b7c1b7ecfd73c6c348fd528c..0000000000000000000000000000000000000000 --- a/src/app/components/shared/footer-imprint/footer-imprint.component.html +++ /dev/null @@ -1,117 +0,0 @@ -<mat-accordion> - <mat-expansion-panel [expanded]="step === 0" (opened)="setStep(0)" hideToggle="true"> - <mat-expansion-panel-header> - <mat-panel-title>Impressum</mat-panel-title> - </mat-expansion-panel-header> - <p> - <a>Technische Hochschule Mittelhessen (THM) University of Applied Sciences</a> - <br>Wiesenstraße 14 - <br>35390 Gießen - <br>Germany - <br> - </p> - - <p> - <mat-icon>phone</mat-icon> +49 641 309-0 - <br> - <mat-icon>print</mat-icon> +49 641 309-2901 - <br> - <mat-icon>mail</mat-icon> praesident@thm.de - <br> - </p> - - <mat-divider></mat-divider> - <br> - - <p> - Die Technische Hochschule Mittelhessen ist eine rechtsfähige Körperschaft des öffentlichen Rechts und zugleich staatliche - Einrichtung gemäß § 1 (1) HHG (Hessisches Hochschulgesetz vom 14. Dezember 2009, GVBl. I, S. 666). - </p> - - <p> Sie wird gesetzlich vertreten durch den Präsidenten - <a>Prof. Dr. Matthias Willems</a>. - </p> - - <p>Umsatzsteuer-Identifikationsnummer gemäß § 27 a Umsatzsteuergesetz: - <br> - <a>DE 813885934</a> - </p> - - <p> - <a>Zuständige Aufsichtsbehörde:</a> - <br> Hessisches Ministerium für Wissenschaft und Kunst Rheinstraße 23 - 25 65185 Wiesbaden - </p> - - <p> - <a>Inhaltlich Verantwortlicher gemäß § 55 Abs. 2 RStV:</a> - <br> Das Präsidium hat die allgemeine inhaltliche Verantwortung und entscheidet in Zweifelsfällen über die Zulässigkeit - von Daten. Die Einrichtungen und Organe der Technischen Hochschule Mittelhessen (u.a. Fachbereiche, Bibliothek, AStA, - Personalräte) erstellen ihre Webseiten in eigener Verantwortung. Die inhaltliche Verantwortung dieser Webseiten liegt - bei der/dem Vertretungsberechtigten der jeweils zuständigen Einrichtung bzw. bei der von ihr/ihm autorisierten Person. - Die Kontaktdaten dieser Personen sind dort jeweils im Impressum angegeben. - </p> - - <p> - <a>Das Impressum gilt auch für folgende Social Media Profile:</a> - <br>www.thm.de/facebook - <br>www.thm.de/twitter - <br>www.thm.de/plus.google - <br>www.thm.de/youtube - </p> - - <p> - <a>Technische Ansprechpartner für den Internetauftritt:</a> - <br>Referat Neue Medien - <br>Ostanlage 37 - 41 - <br>35390 Gießen - <br>webredaktion@thm.de - </p> - </mat-expansion-panel> - - <mat-expansion-panel [expanded]="step === 1" (opened)="setStep(1)" hideToggle="true"> - <mat-expansion-panel-header>Haftungsausschluss</mat-expansion-panel-header> - <h4>1. Inhalt der Internetpräsenz</h4> - Die Technische Hochschule Mittelhessen (THM) ist bemüht, die bereitgestellte Internetpräsenz stets informativ, aktuell, klar - strukturiert und übersichtlich zu halten. Trotzdem können Fehler und Unklarheiten nicht vollständig ausgeschlossen werden. - Aus diesem Grunde übernimmt die Technische Hochschule Mittelhessen keine Gewähr für die Vollständigkeit, die Richtigkeit, - die Aktualität und die Qualität der zur Verfügung gestellten Informationen. Für Schäden immaterieller oder materieller - Art, die durch die Nutzung oder die Nichtnutzung der dargebotenen Informationen oder durch die Nutzung fehlerhafter oder - unvollständiger Informationen mittelbar oder unmittelbar entstehen, haftet die Technische Hochschule Mittelhessen nicht, - sofern ihr nicht nachweislich ein grob fahrlässiges oder vorsätzliches Verschulden zur Last gelegt werden kann. Gleiches - gilt für kostenlos zur Verfügung gestellte Software. Die Technische Hochschule Mittelhessen kann ohne vorherige Ankündigung - Teile des Internetangebotes oder auch das gesamte Internetangebot verändern, ergänzen löschen oder endgültig oder zeitweise - sperren. - - <h4>2. Links und Verweise</h4> - Für „fremde Inhalte“, die durch direkte oder indirekte Verknüpfungen (sogenannte Links) von anderen Anbietern zur Verfügung - gestellt werden, übernimmt die Technische Hochschule Mittelhessen keine Haftung. Sie macht sich diese Seiten ausdrücklich - nicht zu Eigen und distanziert sich auch von den Inhalten der gelinkten/verknüpften Seiten. Diese Feststellung betrifft - auch die von der Technischen Hochschule Mittelhessen eingerichteten Diskussionsforen, Gästebücher und Mailinglisten. - Für unvollständige, fehlerhafte oder auch illegale Inhalte und insbesondere für Schäden, die aus der Nutzung dieser Seiten - und der in ihnen dargebotenen Informationen entstehen, haftet allein der Anbieter der entsprechenden Seiten. Die Technische - Hochschule Mittelhessen hat keine Kenntnis über anstößige oder rechtswidrige Inhalte der gelinkten/verknüpften Seiten - der Anbieter. Sollten auf diesen Seiten dennoch rechtswidrige oder anstößige Inhalte enthalten sein, distanziert sich - die Technische Hochschule Mittelhessen ausdrücklich von diesen Inhalten. - - <h4>3. Urheberrecht</h4> - Die Technische Hochschule Mittelhessen ist bestrebt, in ihren Publikationen die Urheberrechte der verwendeten Dokumente, - Texte, Grafiken, Tondokumente und Videosequenzen zu beachten, von ihr selbst erstellte Grafiken, Tondokumente, Videosequenzen - und Texte zu nutzen oder auf lizenzfreie Grafiken, Tondokumente, Videosequenzen und Texte zurückzugreifen. Alle innerhalb - des Internetangebotes genannten und ggf. durch Dritte geschützten Marken- und Warenzeichen unterliegen uneingeschränkt - den Bestimmungen des gültigen Kennzeichenrechts und den Besitzrechten der jeweiligen eingetragenen Eigentümer. Allein - aufgrund der bloßen Nennung ist nicht der Schluss zu ziehen, dass Markenzeichen nicht durch Rechte Dritter geschützt - sind! Das Copyright für von der Technischen Hochschule Mittelhessen veröffentlichte Dokumente bleibt alleine bei der - Technische Hochschule Mittelhessen. Die Vervielfältigung der von der Technischen Hochschule Mittelhessen erstellten Dokumente - und Publikationen ist ohne ausdrückliche Zustimmung der Technischen Hochschule Mittelhessen nicht gestattet. Das Layout - der Homepage und die verwendeten Graphiken sowie sonstige Inhalte sind urheberrechtlich geschützt. - - <h4>4. Datenschutz</h4> - Sofern auf unserer Webseite die Möglichkeit zur Eingabe persönlicher oder geschäftlicher Daten wie Namen, E-Mail-Adressen, - Anschriften usw. besteht, erfolgt die Preisgabe dieser Daten seitens des Nutzers auf freiwilliger Basis. - - <h4>5. Rechtswirksamkeit dieses Haftungsausschlusses</h4> - Dieser Haftungsausschluss ist als Teil des Internetangebots zu betrachten, von dem aus auf diese Seite verwiesen wurde. Sofern - Teile oder einzelne Formulierungen dieses Textes der geltenden Rechtsgrundlage nicht oder nicht vollständig entsprechen, - bleiben die übrigen Teile der Internetpräsentation in ihrem Inhalt und in ihrer Gültigkeit unberührt. - </mat-expansion-panel> -</mat-accordion> \ No newline at end of file diff --git a/src/app/components/shared/footer-imprint/footer-imprint.component.scss b/src/app/components/shared/footer-imprint/footer-imprint.component.scss deleted file mode 100644 index c105e35b241b7c4a3457781d97940f273977eceb..0000000000000000000000000000000000000000 --- a/src/app/components/shared/footer-imprint/footer-imprint.component.scss +++ /dev/null @@ -1,12 +0,0 @@ -mat-icon { - font-size: 20px; - vertical-align: middle; -} - -p { - margin: 2%; -} - -a{ - font-weight:bolder; -} \ No newline at end of file diff --git a/src/app/components/shared/footer-imprint/footer-imprint.component.spec.ts b/src/app/components/shared/footer-imprint/footer-imprint.component.spec.ts deleted file mode 100644 index 28cf091c05b3741ecb12ccf56352b358764048b9..0000000000000000000000000000000000000000 --- a/src/app/components/shared/footer-imprint/footer-imprint.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { FooterImprintComponent } from './footer-imprint.component'; - -describe('FooterImprintComponent', () => { - let component: FooterImprintComponent; - let fixture: ComponentFixture<FooterImprintComponent>; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ FooterImprintComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(FooterImprintComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/components/shared/footer-imprint/footer-imprint.component.ts b/src/app/components/shared/footer-imprint/footer-imprint.component.ts deleted file mode 100644 index a21da8acf9724796e2ffe687ac952807f249f8d0..0000000000000000000000000000000000000000 --- a/src/app/components/shared/footer-imprint/footer-imprint.component.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { Component, OnInit } from '@angular/core'; - -@Component({ - selector: 'app-footer-imprint', - templateUrl: './footer-imprint.component.html', - styleUrls: ['./footer-imprint.component.scss'] -}) -export class FooterImprintComponent implements OnInit { - step = 0; - - constructor() { } - - ngOnInit() { - } - - setStep(index: number) { - this.step = index; - } - - nextStep() { - this.step++; - } - - prevStep() { - this.step--; - } -} \ No newline at end of file diff --git a/src/app/components/shared/footer/footer.component.html b/src/app/components/shared/footer/footer.component.html index ec2a042563e0e9f097552f7d2c56ca85a72eb401..4a9a0908ddfacf470a455af18ca24013016cd08b 100644 --- a/src/app/components/shared/footer/footer.component.html +++ b/src/app/components/shared/footer/footer.component.html @@ -1,9 +1,18 @@ <footer> <mat-toolbar> - <div class="container"> - <a href="imprint" target="_parent"> - <button mat-button>Impressum</button> - </a> - </div> + <button mat-button (click)="navToBlog()"> + <mat-icon>notes</mat-icon> + Blog + </button> + <span class="fill-remaining-space"></span> + <button mat-button (click)="navToDSGVO()"> + <mat-icon>security</mat-icon> + DSGVO + </button> + <span class="fill-remaining-space"></span> + <button mat-button (click)="navToImprint()"> + <mat-icon>info</mat-icon> + Impressum + </button> </mat-toolbar> -</footer> \ No newline at end of file +</footer> diff --git a/src/app/components/shared/footer/footer.component.scss b/src/app/components/shared/footer/footer.component.scss index 97bba6929502cb49b703697086809bbd5a0d9634..d3f2b1f8f7451107895b9c9204abadd9d8b23356 100644 --- a/src/app/components/shared/footer/footer.component.scss +++ b/src/app/components/shared/footer/footer.component.scss @@ -1,38 +1,24 @@ footer { - overflow-y: auto; -} - -mat-expansion-panel { - background-color: rgb(235, 235, 235); - color: rgb(60, 60, 60); - height: auto; + overflow-y: auto; } mat-toolbar { background-color: rgb(240, 240, 240); - color: rgb(140, 140, 140); height: auto; + &:first-child { + padding-left: 0px; + } + &:last-child { + padding-right: 0px; + } } button { min-height: 28px; font-size: 12px; - color: rgb(140, 140, 140); + color: #80cbc4; } -.container { - display: flex; - justify-content: space-around; +mat-icon { + margin-right: 2%; } - -/* Small screens */ -@media all and (max-width: 300px) { - .container { - flex-direction: column; - margin: auto; - } - - mat-toolbar { - height: auto; - } -} \ No newline at end of file diff --git a/src/app/components/shared/footer/footer.component.ts b/src/app/components/shared/footer/footer.component.ts index c2f0e8fe166251a6ef103330f9f6678fc9da1b06..b13f6cc82f8bf8228ee1f7e5acc4e4404006651a 100644 --- a/src/app/components/shared/footer/footer.component.ts +++ b/src/app/components/shared/footer/footer.component.ts @@ -1,5 +1,4 @@ import { Component, OnInit } from '@angular/core'; -import { AuthenticationService } from '../../../services/http/authentication.service'; import { NotificationService } from '../../../services/util/notification.service'; import { Router } from '@angular/router'; import { MatDialog } from '@angular/material'; @@ -11,8 +10,10 @@ import { MatDialog } from '@angular/material'; }) export class FooterComponent implements OnInit { + blogUrl = 'https://arsnova.thm.de/blog/'; + dsgvoUrl = 'https://arsnova.thm.de/blog/datenschutzerklaerung/'; + imprUrl = 'https://arsnova.thm.de/blog/impressum/'; constructor( - public authenticationService: AuthenticationService, public notificationService: NotificationService, public router: Router, public dialog: MatDialog @@ -20,4 +21,36 @@ export class FooterComponent implements OnInit { ngOnInit() { } + + navToBlog() { + this.notificationService.show('Der Blog wird in einem neuen Fenster geöffnet..', 'Öffnen' , { + duration: 4000 + }); + this.notificationService.snackRef.afterDismissed().subscribe(info => { + if (info.dismissedByAction === true) { + window.open(this.blogUrl, '_blank'); + } + }); + } + navToDSGVO() { + this.notificationService.show('Die Datenschutzverordnung wird in einem neuen Fenster geöffnet..', 'Öffnen' , { + duration: 5000 + }); + this.notificationService.snackRef.afterDismissed().subscribe(info => { + if (info.dismissedByAction === true) { + window.open(this.dsgvoUrl, '_blank'); + } + }); + } + navToImprint() { + this.notificationService.show('Das Impressum wird in einem neuen Fenster geöffnet..', 'Öffnen' , { + duration: 5000 + }); + this.notificationService.snackRef.afterDismissed().subscribe(info => { + if (info.dismissedByAction === true) { + window.open(this.imprUrl, '_blank'); + } + }); + } + } diff --git a/src/app/components/shared/room-join/room-join.component.html b/src/app/components/shared/room-join/room-join.component.html index 77eefa0677066cb78e6ec0ddca1bd4ac9185f4e6..1578de81fef519444a1b2e4e82a5dd2afcacd149 100644 --- a/src/app/components/shared/room-join/room-join.component.html +++ b/src/app/components/shared/room-join/room-join.component.html @@ -2,8 +2,8 @@ <form (ngSubmit)="joinRoom(roomId.value)"> <div fxLayout="row" fxLayoutAlign="center" fxLayoutGap="10px"> <mat-form-field class="number"> - <input matInput #roomId placeholder="Session-Id" [formControl]="roomFormControl" - [errorStateMatcher]="matcher" maxlength="8"/> + <input matInput inputmode="numeric" type="number" pattern="[0-9]*" #roomId placeholder="Session-Id" [formControl]="roomFormControl" + [errorStateMatcher]="matcher" max="8"/> <mat-hint align="end">{{roomId.value.length}} / 8</mat-hint> <mat-error *ngIf="roomFormControl.hasError('required')">{{ 'home-page.please-enter' | translate}}</mat-error> <mat-error *ngIf="roomFormControl.hasError('minlength')">{{ 'home-page.exactly-8' | translate}}</mat-error> @@ -13,5 +13,5 @@ </button> </div> </form> -<button mat-button class="demo" color="primary" (click)="joinDemo()">Demo Session<mat-icon color="accent">lightbulb_outline</mat-icon></button> +<button mat-button class="demo" color="primary" (click)="joinDemo()">Demo Session</button> </div> diff --git a/src/app/components/shared/room-join/room-join.component.ts b/src/app/components/shared/room-join/room-join.component.ts index 1a556ec7661b132707121ecef3e6f9fd20239d00..a7a0fb4cfb4b31555be09ff691ea1f0d07b7b406 100644 --- a/src/app/components/shared/room-join/room-join.component.ts +++ b/src/app/components/shared/room-join/room-join.component.ts @@ -10,7 +10,7 @@ import { TranslateService } from '@ngx-translate/core'; import { AuthenticationService } from '../../../services/http/authentication.service'; import { UserRole } from '../../../models/user-roles.enum'; import { User } from '../../../models/user'; -import {log} from "util"; +import { log } from 'util'; export class JoinErrorStateMatcher implements ErrorStateMatcher { isErrorState(control: FormControl | null, form: FormGroupDirective | NgForm | null): boolean { @@ -30,7 +30,7 @@ export class RoomJoinComponent implements OnInit { demoId = '95680586'; user: User; - roomFormControl = new FormControl('', [Validators.required, Validators.minLength(8)]); + roomFormControl = new FormControl('', [Validators.required, Validators.minLength(8), Validators.maxLength(8)]); matcher = new RegisterErrorStateMatcher(); diff --git a/src/app/components/shared/shared.module.ts b/src/app/components/shared/shared.module.ts index 8c6b346aaa2453d90096ed872084ac3b5e970427..e10dbff2d52e6f3bbfcc9f0b2d12db1bfd8e9351 100644 --- a/src/app/components/shared/shared.module.ts +++ b/src/app/components/shared/shared.module.ts @@ -4,7 +4,6 @@ import { CommentListComponent } from './comment-list/comment-list.component'; import { ContentGroupsComponent } from './content-groups/content-groups.component'; import { FeedbackBarometerPageComponent } from './feedback-barometer-page/feedback-barometer-page.component'; import { FooterComponent } from './footer/footer.component'; -import { FooterImprintComponent } from './footer-imprint/footer-imprint.component'; import { HeaderComponent } from './header/header.component'; import { PageNotFoundComponent } from './page-not-found/page-not-found.component'; import { RoomListComponent } from './room-list/room-list.component'; @@ -41,7 +40,6 @@ import { StatisticHelpComponent } from './_dialogs/statistic-help/statistic-help ContentDeleteComponent, FeedbackBarometerPageComponent, FooterComponent, - FooterImprintComponent, FeedbackBarometerPageComponent, CommentCreatePageComponent, CommentListComponent, @@ -63,7 +61,6 @@ import { StatisticHelpComponent } from './_dialogs/statistic-help/statistic-help ContentDeleteComponent, FeedbackBarometerPageComponent, FooterComponent, - FooterImprintComponent, FeedbackBarometerPageComponent, CommentCreatePageComponent, CommentListComponent, diff --git a/src/app/components/shared/statistic/statistic.component.ts b/src/app/components/shared/statistic/statistic.component.ts index a41f01f6f4ff54ac335be9afd330cec4eebdc1cd..fe946387e9eee575acdcd8f2d84b58693ac21a93 100644 --- a/src/app/components/shared/statistic/statistic.component.ts +++ b/src/app/components/shared/statistic/statistic.component.ts @@ -46,6 +46,7 @@ export class StatisticComponent implements OnInit { } ngOnInit() { + window.scroll(0, 0); // Maybe not so bad without header.. this.translateService.use(localStorage.getItem('currentLang')); this.maxLength = innerWidth / 12; this.answers = new Array<string>(); @@ -133,14 +134,16 @@ export class StatisticComponent implements OnInit { this.ccolors[i] = 'rgba(76,175,80, 0.8)'; } } - this.ccolors.push('rgba(189,189,189, 0.8)'); - this.colors.push('rgba(189,189,189, 0.8)'); - this.translateService.get('statistic.abstentions').subscribe(label => { - this.labels.push(label); - }); this.contentService.getAnswer(content.id).subscribe(answer => { this.data = answer.roundStatistics[0].independentCounts; this.data.push(answer.roundStatistics[0].abstentionCount); + if (this.data[this.data.length - 1] > 0) { + this.ccolors.push('rgba(189,189,189, 0.8)'); + this.colors.push('rgba(189,189,189, 0.8)'); + this.translateService.get('statistic.abstentions').subscribe(label => { + this.labels.push(label); + }); + } this.createChart(this.colors); }); } diff --git a/src/app/components/shared/statistics-page/statistics-page.component.ts b/src/app/components/shared/statistics-page/statistics-page.component.ts index 2da2391fe1aba241b2d30926b1b1b503956f9d08..c5180511562878f74df929b0b6ebec16044082aa 100644 --- a/src/app/components/shared/statistics-page/statistics-page.component.ts +++ b/src/app/components/shared/statistics-page/statistics-page.component.ts @@ -7,6 +7,7 @@ import { TranslateService } from '@ngx-translate/core'; import { LanguageService } from '../../../services/util/language.service'; import { MatTabGroup, MatDialog } from '@angular/material'; import { StatisticHelpComponent } from '../_dialogs/statistic-help/statistic-help.component'; +import { NotificationService } from '../../../services/util/notification.service'; @Component({ selector: 'app-statistics', @@ -27,7 +28,8 @@ export class StatisticsPageComponent implements OnInit { private roomService: RoomService, private translateService: TranslateService, protected langService: LanguageService, - public dialog: MatDialog) { + public dialog: MatDialog, + private notificationService: NotificationService) { langService.langEmitter.subscribe(lang => translateService.use(lang)); } @@ -41,12 +43,16 @@ export class StatisticsPageComponent implements OnInit { this.translateService.use(localStorage.getItem('currentLang')); this.roomService.getRoom(id).subscribe(room => { this.contentGroups = room.contentGroups; - this.isLoading = false; - for (let i = 0; i < this.contentGroups.length; i++) { - if (this.currentCG.includes(this.contentGroups[i].name)) { - this.tabGroup.selectedIndex = i; + if (this.contentGroups) { + for (let i = 0; i < this.contentGroups.length; i++) { + if (this.currentCG.includes(this.contentGroups[i].name)) { + this.tabGroup.selectedIndex = i; + } } + } else { + this.notificationService.show('No questions have been created yet!'); } + this.isLoading = false; }); } diff --git a/src/app/services/util/notification.service.ts b/src/app/services/util/notification.service.ts index ed66238e05c75a7bb9d8dba94addfa3737d294c8..81978198950edb0d650f8720f3ed918379af3183 100644 --- a/src/app/services/util/notification.service.ts +++ b/src/app/services/util/notification.service.ts @@ -6,12 +6,13 @@ export class NotificationService { private defaultConfig = { duration: 2000 }; + public snackRef: any; - constructor(private snackBar: MatSnackBar) { + constructor(public snackBar: MatSnackBar) { } - show(message: string, config?: MatSnackBarConfig) { + show(message: string, action?: string, config?: MatSnackBarConfig) { // Delegate the message and merge the (optionally) passed config with the default config - this.snackBar.open(message, '', Object.assign({}, this.defaultConfig, config)); + this.snackRef = this.snackBar.open(message, action, Object.assign({}, this.defaultConfig, config)); } }