diff --git a/client/src/app/shared/components/icon-container/icon-container.component.html b/client/src/app/shared/components/icon-container/icon-container.component.html index bf66148ca..bca5c410c 100644 --- a/client/src/app/shared/components/icon-container/icon-container.component.html +++ b/client/src/app/shared/components/icon-container/icon-container.component.html @@ -3,6 +3,7 @@ [matTooltip]="iconTooltip" [class]="iconAction ? 'pointer' : ''" (click)="iconClick()" + [color]="color" >{{ icon }} @@ -13,5 +14,6 @@ [matTooltip]="iconTooltip" [class]="iconAction ? 'pointer' : ''" (click)="iconClick()" + [color]="color" >{{ icon }} diff --git a/client/src/app/shared/components/icon-container/icon-container.component.ts b/client/src/app/shared/components/icon-container/icon-container.component.ts index 555d17265..506c86180 100644 --- a/client/src/app/shared/components/icon-container/icon-container.component.ts +++ b/client/src/app/shared/components/icon-container/icon-container.component.ts @@ -51,6 +51,9 @@ export class IconContainerComponent { @Input() public noWrap = false; + @Input() + public color: string; + /** * Optional action for clicking on the icon. */ diff --git a/client/src/app/site/assignments/modules/assignment-poll/components/assignment-poll-dialog/assignment-poll-dialog.component.scss b/client/src/app/site/assignments/modules/assignment-poll/components/assignment-poll-dialog/assignment-poll-dialog.component.scss index 4d89a4034..0b037101c 100644 --- a/client/src/app/site/assignments/modules/assignment-poll/components/assignment-poll-dialog/assignment-poll-dialog.component.scss +++ b/client/src/app/site/assignments/modules/assignment-poll/components/assignment-poll-dialog/assignment-poll-dialog.component.scss @@ -1,24 +1,3 @@ -.submit-buttons { - display: flex; - justify-content: flex-end; -} - -.meta-text { - font-style: italic; - margin-left: 10px; - margin-right: 10px; - mat-chip { - margin-left: 5px; - margin-right: 2px; - } -} - -.candidate-name { - word-wrap: break-word; - width: 100%; - border-bottom: 1px solid grey; -} - .votes-grid { display: grid; grid-gap: 5px; @@ -29,12 +8,3 @@ width: 100%; } } - -.sum-value { - display: flex; - justify-content: flex-end; -} - -.width-600 { - max-width: 600px; -} diff --git a/client/src/app/site/assignments/modules/assignment-poll/components/assignment-poll/assignment-poll.component.html b/client/src/app/site/assignments/modules/assignment-poll/components/assignment-poll/assignment-poll.component.html index 648ce6edd..3d23b5ce2 100644 --- a/client/src/app/site/assignments/modules/assignment-poll/components/assignment-poll/assignment-poll.component.html +++ b/client/src/app/site/assignments/modules/assignment-poll/components/assignment-poll/assignment-poll.component.html @@ -9,13 +9,22 @@ -
- - +
+ + + {{ poll.typeVerbose | translate }} + +   + ·  - {{ poll.typeVerbose | translate }} · {{ poll.stateVerbose | translate }} diff --git a/client/src/app/site/assignments/modules/assignment-poll/components/assignment-poll/assignment-poll.component.scss b/client/src/app/site/assignments/modules/assignment-poll/components/assignment-poll/assignment-poll.component.scss index 6e86c8e38..baeb86810 100644 --- a/client/src/app/site/assignments/modules/assignment-poll/components/assignment-poll/assignment-poll.component.scss +++ b/client/src/app/site/assignments/modules/assignment-poll/components/assignment-poll/assignment-poll.component.scss @@ -19,4 +19,14 @@ display: flex; margin: auto 0; } + + .type-and-state { + display: flex; + span { + display: flex; + } + .poll-type { + width: fit-content; + } + } } diff --git a/client/src/app/site/motions/modules/motion-poll/motion-poll/motion-poll.component.html b/client/src/app/site/motions/modules/motion-poll/motion-poll/motion-poll.component.html index 303bddda0..c3261817f 100644 --- a/client/src/app/site/motions/modules/motion-poll/motion-poll/motion-poll.component.html +++ b/client/src/app/site/motions/modules/motion-poll/motion-poll/motion-poll.component.html @@ -21,21 +21,28 @@
- - - + +
+ + + {{ poll.typeVerbose | translate }} + +   + ·  + - - - {{ poll.typeVerbose | translate }} · - - - - - {{ poll.stateVerbose | translate }} - + + + {{ poll.stateVerbose | translate }} + +
diff --git a/client/src/app/site/motions/modules/motion-poll/motion-poll/motion-poll.component.scss b/client/src/app/site/motions/modules/motion-poll/motion-poll/motion-poll.component.scss index 77539c2f7..a54cae158 100644 --- a/client/src/app/site/motions/modules/motion-poll/motion-poll/motion-poll.component.scss +++ b/client/src/app/site/motions/modules/motion-poll/motion-poll/motion-poll.component.scss @@ -28,6 +28,16 @@ } } + .type-and-state { + display: flex; + span { + display: flex; + } + .poll-type { + width: fit-content; + } + } + .poll-chart-wrapper { cursor: pointer; display: grid; diff --git a/client/src/app/site/polls/components/poll-form/poll-form.component.html b/client/src/app/site/polls/components/poll-form/poll-form.component.html index a7a76e588..f2c4b248f 100644 --- a/client/src/app/site/polls/components/poll-form/poll-form.component.html +++ b/client/src/app/site/polls/components/poll-form/poll-form.component.html @@ -10,21 +10,26 @@
- - - - - {{ option.value | translate }} - - - {{ 'This field is required.' | translate }} - - {{ 'Not suitable for formal secret voting!' | translate }} - +
+ + + + + {{ option.value | translate }} + + + + info + + {{ 'This field is required.' | translate }} + - -
+
- - - - - {{ option.value | translate }} - - - {{ 'This field is required.' | translate }} - - +
+ + + + + {{ option.value | translate }} + + + {{ 'This field is required.' | translate }} + - -
- - - -
+ + + + +
+ + +
{{ PollPropertyVerbose.global_yes | translate }} @@ -73,7 +80,7 @@ {{ PollPropertyVerbose.global_abstain | translate }}
-
+ diff --git a/client/src/app/site/polls/components/poll-form/poll-form.component.scss b/client/src/app/site/polls/components/poll-form/poll-form.component.scss index d1b0a636e..9e6810953 100644 --- a/client/src/app/site/polls/components/poll-form/poll-form.component.scss +++ b/client/src/app/site/polls/components/poll-form/poll-form.component.scss @@ -2,16 +2,11 @@ margin: 0; } -.pollType { - .mat-hint { - color: red; - cursor: pointer; - } -} - .poll-preview-meta-info-form { - .suboption { - margin-left: 1.5em; + .info-grid { + display: grid; + column-gap: 1em; + grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); } .mat-checkbox { diff --git a/client/src/app/site/polls/components/poll-form/poll-form.component.ts b/client/src/app/site/polls/components/poll-form/poll-form.component.ts index dab08dbc9..61591f350 100644 --- a/client/src/app/site/polls/components/poll-form/poll-form.component.ts +++ b/client/src/app/site/polls/components/poll-form/poll-form.component.ts @@ -1,4 +1,4 @@ -import { Component, Input, OnInit } from '@angular/core'; +import { Component, Input, OnInit, ViewEncapsulation } from '@angular/core'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { MatDialog } from '@angular/material/dialog'; import { MatSnackBar } from '@angular/material/snack-bar'; @@ -29,7 +29,8 @@ import { PollService } from '../../services/poll.service'; @Component({ selector: 'os-poll-form', templateUrl: './poll-form.component.html', - styleUrls: ['./poll-form.component.scss'] + styleUrls: ['./poll-form.component.scss'], + encapsulation: ViewEncapsulation.None }) export class PollFormComponent extends BaseViewComponentDirective @@ -160,14 +161,16 @@ export class PollFormComponent this.contentForm.get('pollmethod').valueChanges.subscribe(method => { if (method) { this.updatePercentBases(method); - this.setVotesAmountCtrl(); + this.setWarning(); } }), // poll type changes this.contentForm.get('type').valueChanges.subscribe(() => { - this.setVotesAmountCtrl(); + this.setWarning(); }) ); + + this.setWarning(); } private disablePollType(): void { @@ -232,7 +235,7 @@ export class PollFormComponent * Disable votes_amount form control if the poll type is anonymous * and the poll method is votes. */ - private setVotesAmountCtrl(): void { + private setWarning(): void { if (this.contentForm.get('type').value === PollType.Pseudoanonymous) { this.showNonNominalWarning = true; } else { @@ -297,7 +300,8 @@ export class PollFormComponent }); } - public openVotingWarning(): void { + public openVotingWarning(event: MouseEvent): void { + event.stopPropagation(); this.dialog.open(VotingPrivacyWarningComponent, infoDialogSettings); }