added storageLocation property to items

Additions:
- added storageLocation property to classes
- added storageLocation field to template
- added localization

Changes:
- changed default values for item string properties to "-"

Fixes:
- fixed CSS side-property flex properties
  such that new text field is properly shown
- fixed for="..." setting for item's data.price label
This commit is contained in:
Gesina Schwalbe 2020-12-28 17:54:33 +01:00
parent f9270a3997
commit 7986e91ab7
4 changed files with 12 additions and 7 deletions

View file

@ -12,6 +12,7 @@
"DS4.AttackTypeMeleeRanged": "Melee / Ranged",
"DS4.Quantity": "Quantity",
"DS4.PriceGold": "Price (Gold)",
"DS4.StorageLocation": "Stored at",
"DS4.ItemAvailability": "Availability",
"DS4.ItemAvailabilityHamlet": "Hamlet",
"DS4.ItemAvailabilityVilage": "Village",

View file

@ -1,5 +1,5 @@
.side-properties {
flex: 0 0 150px;
flex: 0 0 50%;
margin: 5px 5px 5px 0;
padding-right: 5px;
border-right: 2px groove $c-border-groove;
@ -10,15 +10,15 @@
flex-direction: row;
label {
flex: 2;
flex: 1;
line-height: 26px;
font-weight: bold;
}
input,
select {
text-align: right;
flex: 1;
text-align: left;
flex: 1.5 1.5 0px;
width: calc(100% - 2px);
}
}

View file

@ -46,7 +46,8 @@
"physical": {
"quantity": 1,
"price": 0,
"availability": "none"
"availability": "-",
"storageLocation": "-"
},
"equipable": {
"equipped": false

View file

@ -4,12 +4,16 @@
<label for="data.quantity">{{localize "DS4.Quantity"}}</label>
<input type="number" data-dtype="Number" name="data.quantity" value="{{data.quantity}}" />
</div>
<div class="side-property">
<label for="data.storageLocation">{{localize "DS4.StorageLocation"}}</label>
<input type="text" data-dtype="String" name="data.storageLocation" value="{{data.storageLocation}}" />
</div>
<div class="side-property">
<label for="data.price">{{localize "DS4.PriceGold"}}</label>
<input type="number" data-dtype="Number" name="data.price" value="{{data.price}}" />
</div>
<div class="side-property">
<label for="data.price">{{localize "DS4.ItemAvailability"}}</label>
<label for="data.availability">{{localize "DS4.ItemAvailability"}}</label>
<select name="data.availability" data-type="String">
{{#select data.availability}}
{{#each config.itemAvailabilities as |value key|}}
@ -18,7 +22,6 @@
{{/select}}
</select>
</div>
</div>
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
</div>