From 61beda7734cd637d784e5cced3e8a5b4deb8205c Mon Sep 17 00:00:00 2001 From: Gesina Schwalbe Date: Sun, 3 Jan 2021 23:27:51 +0100 Subject: [PATCH] added number conversion in HTML value retrieval Changes: - number input fields now return numbers - range elements removed since they are untested Additions: - added min and step specifiers to input fields associated to item number properties - added a color hint for invalidity of item number input fields in actor sheet --- src/module/actor/actor-sheet.ts | 14 ++++++++++---- src/scss/components/_items.scss | 5 +++++ src/templates/actor/partials/items-overview.hbs | 2 +- src/templates/item/partials/description.hbs | 2 +- src/templates/item/partials/details.hbs | 2 +- 5 files changed, 18 insertions(+), 7 deletions(-) diff --git a/src/module/actor/actor-sheet.ts b/src/module/actor/actor-sheet.ts index 4b2c69d8..51eb9e65 100644 --- a/src/module/actor/actor-sheet.ts +++ b/src/module/actor/actor-sheet.ts @@ -131,7 +131,7 @@ export class DS4ActorSheet extends ActorSheet r["checked"]); diff --git a/src/scss/components/_items.scss b/src/scss/components/_items.scss index 01358b75..4dd97f78 100644 --- a/src/scss/components/_items.scss +++ b/src/scss/components/_items.scss @@ -1,3 +1,5 @@ +@use "sass:color"; + .items-list { list-style: none; margin: 7px 0; @@ -52,6 +54,9 @@ width: 2.5em; padding: 0; } + .item-num-val:invalid { + background-color: color.mix(lightcoral, $c-light-grey, 25%); + } .item-description { font-size: 75%; diff --git a/src/templates/actor/partials/items-overview.hbs b/src/templates/actor/partials/items-overview.hbs index dac99439..0cc57faf 100644 --- a/src/templates/actor/partials/items-overview.hbs +++ b/src/templates/actor/partials/items-overview.hbs @@ -84,7 +84,7 @@ {{!-- amount --}} - {{!-- name --}}
- +
diff --git a/src/templates/item/partials/details.hbs b/src/templates/item/partials/details.hbs index 0e57a780..d4cfb918 100644 --- a/src/templates/item/partials/details.hbs +++ b/src/templates/item/partials/details.hbs @@ -4,7 +4,7 @@
- +