added invalidity hints to item side-properties

- added :invalid definition to side-properties CSS
-  defined common color for invalidity
- now using disabled input for automatically calculated properties
This commit is contained in:
Gesina Schwalbe 2021-01-06 11:39:39 +01:00
parent 150a0ea487
commit 637b70c5d2
6 changed files with 22 additions and 7 deletions

View file

@ -29,6 +29,7 @@
{{#*inline "talentRankValue"}}
<input class="item-num-val item-change" data-dtype="Number" type="number" min="0" step="1"
{{#if (eq property 'base') }}max="{{item.data.data.talentRank.max}}"{{/if}}
{{disabled}}
data-property="data.talentRank.{{property}}" value="{{lookup item.data.data.talentRank property}}"
title="{{localize localizeString}}" />
{{/inline}}
@ -61,7 +62,7 @@
{{> talentRankValue item=item property='mod' localizeString='DS4.TalentRankMod'}}
<span> = </span>
{{!-- derived total rank --}}
<span>{{item.data.data.talentRank.total}}</span>
{{> talentRankValue item=item property='total' localizeString='DS4.TalentRankTotal' disabled='disabled'}}
</div>
{{!-- description --}}
<div class="flex4 item-description">{{{item.data.data.description}}}</div>

View file

@ -20,10 +20,10 @@
<input type="text" data-dtype="String" name="data.storageLocation" value="{{data.storageLocation}}" />
</div>
{{else}}
{{localize "DS4.NotOwned"}}
<span>{{localize "DS4.NotOwned"}}</span>
{{/if}}
</div>
<div class="description">
<div class="description" title="{{localize 'DS4.Description'}}">
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
</div>
</div>

View file

@ -1,3 +1,7 @@
{{!-- ======================================================================== --}}
{{!-- INLINE PARTIAL DEFINITIONS --}}
{{!-- ======================================================================== --}}
{{#*inline "talentRankSideProperty" }}
<div class="side-property">
@ -9,6 +13,9 @@
{{/inline}}
{{!-- ======================================================================== --}}
<form class="{{cssClass}}" autocomplete="off">
<header class="sheet-header">
<img class="profile-img" src="{{item.img}}" data-edit="img" title="{{item.name}}" />