diff --git a/app/styles/app.scss b/app/styles/app.scss index 8ddcad9..6371321 100644 --- a/app/styles/app.scss +++ b/app/styles/app.scss @@ -16,6 +16,7 @@ // Optional - Everything else @import "ember-bootstrap/utilities/display"; +@import "ember-bootstrap/utilities/float"; @import "ember-bootstrap/utilities/screenreaders"; @import "ember-bootstrap/type"; @import "ember-bootstrap/tables"; diff --git a/app/templates/components/create-options-datetime.hbs b/app/templates/components/create-options-datetime.hbs index 2d44551..2c1b7f2 100644 --- a/app/templates/components/create-options-datetime.hbs +++ b/app/templates/components/create-options-datetime.hbs @@ -1,17 +1,17 @@
{{#if errorMessage}} - {{#bs-alert type="warning"}} + {{t errorMessage}} - {{/bs-alert}} + {{/if}} - {{#bs-form - onSubmit=(action "submit") - formLayout="horizontal" - model=this - novalidate=true - as |form| - }} +
{{#each dates as |date index|}} {{! @@ -25,67 +25,68 @@ }} data-test-day={{date.day}} > - {{! - show label only if it differ from label before - Nested-helpers are called first and object-at requires a positive integer - but returns undefined if an element with the passed in index does not exist. - Therefore we pass in array length if index is null. Cause index starting - by zero there can't be any element with an index === array.length. - }} - {{#form.element - classNames="option" - label=date.dayFormatted - invisibleLabel=(eq date.dayFormatted (get (object-at (if index (sub index 1) dates.length) dates) "dayFormatted")) - model=date - property="time" - as |el| - }} +
- {{el.control - autofocus=(unless index true false) - id=el.id - placeholder="00:00" - type="time" - value=el.value - onChange=(action (mut el.value)) - }} +
- {{! disable delete button if there is only one option }} - {{#bs-button - onClick=(action "deleteOption" date) - type="link" + {{t "create.options.button.delete.label"}} - {{/bs-button}} +
- {{#bs-button - onClick=(action "addOption" date) - type="link" - size="sm" - class="add cr-option-menu__button cr-option-menu__add-button" - }} + + {{t "create.options.button.add.label"}} - {{/bs-button}} - {{/form.element}} + +
{{/each}}
{{#if (gt groupedDates.length 1)}} - {{#form.element}} - {{#bs-button - onClick=(action "adoptTimesOfFirstDay") + + {{t "create.options-datetime.copy-first-line"}} - {{/bs-button}} - {{/form.element}} + + {{/if}}
@@ -96,5 +97,5 @@
- {{/bs-form}} + diff --git a/app/templates/components/create-options-text.hbs b/app/templates/components/create-options-text.hbs index 150dafc..b32d9b2 100644 --- a/app/templates/components/create-options-text.hbs +++ b/app/templates/components/create-options-text.hbs @@ -1,40 +1,43 @@ -{{#each options as |option index|}} - {{! show label only on first item }} - {{#form.element - classNames="option" - label=(unless index (t "create.options.options.label")) - model=option - property="title" - as |el| - }} -
- {{el.control - autofocus=(unless index true false) - id=el.id - value=el.value - onChange=(action (mut el.value)) - }} -
- {{! disable delete button if there is only one option }} - {{#bs-button - onClick=(action "deleteOption" option) - type="link" - class="delete" - disabled=(lte options.length 1) - }} - - {{t "create.options.button.delete.label"}} - {{/bs-button}} +{{#let @form as |form|}} + {{#each options as |option index|}} + +
+ +
+ + + {{t "create.options.button.delete.label"}} + +
-
- {{#bs-button - onClick=(action "addOption" option) - type="link" - size="sm" - class="add" - }} - - {{t "create.options.button.add.label"}} - {{/bs-button}} - {{/form.element}} -{{/each}} + + + + {{t "create.options.button.add.label"}} + + + {{/each}} +{{/let}} \ No newline at end of file diff --git a/config/bundlesize.js b/config/bundlesize.js index a4a2d37..e27acd3 100644 --- a/config/bundlesize.js +++ b/config/bundlesize.js @@ -9,7 +9,7 @@ module.exports = { }, css: { pattern: 'assets/*.css', - limit: '15KB', + limit: '15.3KB', compression: 'gzip' } }