diff --git a/client/src/app/core/ui-services/choice.service.ts b/client/src/app/core/ui-services/choice.service.ts index b00db214d..f522061e3 100644 --- a/client/src/app/core/ui-services/choice.service.ts +++ b/client/src/app/core/ui-services/choice.service.ts @@ -42,7 +42,7 @@ export class ChoiceService { clearChoice?: string ): Promise { const dialogRef = this.dialog.open(ChoiceDialogComponent, { - minWidth: '250px', + maxWidth: '90vw', maxHeight: '90vh', disableClose: true, data: { diff --git a/client/src/app/shared/components/choice-dialog/choice-dialog.component.html b/client/src/app/shared/components/choice-dialog/choice-dialog.component.html index 1593cd1a5..863ffd07d 100644 --- a/client/src/app/shared/components/choice-dialog/choice-dialog.component.html +++ b/client/src/app/shared/components/choice-dialog/choice-dialog.component.html @@ -1,53 +1,56 @@ -
-

{{ data.title | translate }}

-
- - + +

{{ data.title | translate }}

+ + + + + + {{ getChoiceTitle(choice) | translate }} + + + + + + {{ data.clearChoice | translate }} + + + + + + {{ getChoiceTitle(choice) | translate }} -
+ + + + - - - - {{ data.clearChoice | translate }} - -
- - - - - {{ getChoiceTitle(choice) | translate }} - - - + + +
+
- -
- -
-
- -
- -
-
+
+ +
+ + diff --git a/client/src/app/shared/components/choice-dialog/choice-dialog.component.scss b/client/src/app/shared/components/choice-dialog/choice-dialog.component.scss index 108bd7294..2086c06d5 100644 --- a/client/src/app/shared/components/choice-dialog/choice-dialog.component.scss +++ b/client/src/app/shared/components/choice-dialog/choice-dialog.component.scss @@ -1,21 +1,17 @@ -mat-radio-group { +.mat-dialog-content { + display: block; +} + +.mat-radio-group { display: inline-flex; flex-direction: column; - mat-radio-button { + .mat-radio-button { margin: 5px; } } -.scrollmenu { - padding: 5px; - display: block; -} - -.scrollmenu-outer { - max-height: inherit; -} -mat-divider { +.mat-divider { margin-top: 10px; margin-bottom: 10px; } diff --git a/client/src/app/shared/components/choice-dialog/choice-dialog.component.ts b/client/src/app/shared/components/choice-dialog/choice-dialog.component.ts index 08dd53def..123a73256 100644 --- a/client/src/app/shared/components/choice-dialog/choice-dialog.component.ts +++ b/client/src/app/shared/components/choice-dialog/choice-dialog.component.ts @@ -1,4 +1,4 @@ -import { Component, Inject } from '@angular/core'; +import { Component, Inject, ViewEncapsulation } from '@angular/core'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material'; import { Displayable } from 'app/site/base/displayable'; @@ -61,11 +61,13 @@ export type ChoiceAnswer = undefined | { action?: string; items: number | number @Component({ selector: 'os-choice-dialog', templateUrl: './choice-dialog.component.html', - styleUrls: ['./choice-dialog.component.scss'] + styleUrls: ['./choice-dialog.component.scss'], + encapsulation: ViewEncapsulation.None }) export class ChoiceDialogComponent { /** * One number selected, if this is a single select choice + * User over template */ public selectedChoice: number; @@ -78,6 +80,8 @@ export class ChoiceDialogComponent { public get isSelectionEmpty(): boolean { if (this.data.multiSelect) { return this.selectedMultiChoices.length === 0; + } else if (!this.data.choices) { + return false; } else { return this.selectedChoice === undefined; }