From 6e1a3c57f45648e58b179d115656fc489c56053a Mon Sep 17 00:00:00 2001 From: Tykayn Date: Mon, 14 Mar 2022 16:18:48 +0100 Subject: [PATCH] text choice place of buttons, and modal unification --- src/app/core/services/poll.service.ts | 2 +- .../option-link/option-link.component.html | 98 ++++++++++++------- .../option-link/option-link.component.scss | 10 +- .../form/option-link/option-link.component.ts | 2 + .../consultation/edit/edit.component.ts | 4 + .../add-answer/add-answer.component.html | 2 +- src/styles/dev-utilities/_helpers.scss | 5 +- src/styles/partials/_buttons.scss | 3 +- 8 files changed, 81 insertions(+), 45 deletions(-) diff --git a/src/app/core/services/poll.service.ts b/src/app/core/services/poll.service.ts index c55ecb9a..128a03ec 100644 --- a/src/app/core/services/poll.service.ts +++ b/src/app/core/services/poll.service.ts @@ -183,7 +183,7 @@ export class PollService implements Resolve { choices: new FormArray([]), whoModifiesAnswers: ['self', [Validators.required]], whoCanChangeAnswers: ['self', [Validators.required]], - isAboutDate: [true, [Validators.required]], + isAboutDate: [false, [Validators.required]], expiresDaysDelay: [environment.expiresDaysDelay, []], expiracy_date: [this.DateUtilitiesService.addDaysToDate(environment.expiresDaysDelay, new Date()), []], isZeroKnoledge: [false, [Validators.required]], diff --git a/src/app/features/administration/form/option-link/option-link.component.html b/src/app/features/administration/form/option-link/option-link.component.html index 7af1eed3..691f7fe7 100644 --- a/src/app/features/administration/form/option-link/option-link.component.html +++ b/src/app/features/administration/form/option-link/option-link.component.html @@ -2,33 +2,51 @@

{{ 'choices.title' | translate }}

+
+
image
{{ choice.url_href }}
- - + + + + + + +
+ + + + + +
+
+ +
- @@ -42,28 +60,40 @@ [showHeader]="false" [resizable]="true" > -

- {{ 'choices.modal.title' | translate }} -

-

- {{ 'choices.modal.description' | translate }} -

- - - - -
- - -
+ +

+ {{ 'choices.modal.title' | translate }} +

+

+ {{ 'choices.modal.description' | translate }} +

+ + + + + + +
+ + +
+
diff --git a/src/app/features/administration/form/option-link/option-link.component.scss b/src/app/features/administration/form/option-link/option-link.component.scss index 89ff22ea..d1251662 100644 --- a/src/app/features/administration/form/option-link/option-link.component.scss +++ b/src/app/features/administration/form/option-link/option-link.component.scss @@ -1,10 +1,6 @@ .options { - button { - border: 0; - background: transparent; - padding-left: 0.75rem; - img { - margin-right: 1em; - } + .down-line-button-container, + .link-land { + margin-left: -1rem; } } diff --git a/src/app/features/administration/form/option-link/option-link.component.ts b/src/app/features/administration/form/option-link/option-link.component.ts index bf0c80ff..b755b016 100644 --- a/src/app/features/administration/form/option-link/option-link.component.ts +++ b/src/app/features/administration/form/option-link/option-link.component.ts @@ -37,4 +37,6 @@ export class OptionLinkComponent implements OnInit { closeModal() { this.display_option_dialog = false; } + + closeModalAndFocusOnOpenModalButton() {} } diff --git a/src/app/features/consultation/edit/edit.component.ts b/src/app/features/consultation/edit/edit.component.ts index ec9e7326..4ab0f389 100644 --- a/src/app/features/consultation/edit/edit.component.ts +++ b/src/app/features/consultation/edit/edit.component.ts @@ -93,4 +93,8 @@ export class EditComponent implements OnInit { elem.focus(); } } + + applyTimeSlicesToDateChoices() {} + + closeModalAndFocusOnOpenModalButton() {} } diff --git a/src/app/features/participation/add-answer/add-answer.component.html b/src/app/features/participation/add-answer/add-answer.component.html index 196f47a5..f1ac767e 100644 --- a/src/app/features/participation/add-answer/add-answer.component.html +++ b/src/app/features/participation/add-answer/add-answer.component.html @@ -1,4 +1,4 @@ -
+
diff --git a/src/styles/dev-utilities/_helpers.scss b/src/styles/dev-utilities/_helpers.scss index c6fc056c..c3ff654f 100644 --- a/src/styles/dev-utilities/_helpers.scss +++ b/src/styles/dev-utilities/_helpers.scss @@ -76,7 +76,7 @@ } .has-no-background { - background: none; + background-color: transparent; } .has-no-outline, .has-no-border { @@ -125,6 +125,9 @@ background: url('/assets/icons/x.svg') no-repeat 28px center; } +.has-background-link-icon { + background: url('/assets/icons/link.svg') no-repeat 16px center; +} .has-background-plus { background: url('/assets/icons/plus-circle.svg') no-repeat 16px center; } diff --git a/src/styles/partials/_buttons.scss b/src/styles/partials/_buttons.scss index 54997795..0108e858 100644 --- a/src/styles/partials/_buttons.scss +++ b/src/styles/partials/_buttons.scss @@ -168,7 +168,8 @@ a { @extend .is-danger; } -.delete-date { +.delete-date, +.down-line-button-container { border: 0; border-radius: 0.25rem; border-top-left-radius: 0;