Make items editable again int items-list
This commit is contained in:
parent
aac4b014b0
commit
1676a7b8c4
3 changed files with 20 additions and 20 deletions
|
@ -65,17 +65,17 @@
|
|||
<li class="ds4-item-list__row item" data-item-id="{{item._id}}">
|
||||
{{!-- equipped --}}
|
||||
{{#if (ne item.type 'loot')}}
|
||||
<input class="ds4-item-list__editable ds4-item-list__editable--checkbox" type="checkbox" {{checked
|
||||
<input class="ds4-item-list__editable ds4-item-list__editable--checkbox item-change" type="checkbox" {{checked
|
||||
item.data.equipped}} data-dtype="Boolean" data-property="data.equipped" title="{{localize 'DS4.ItemEquipped'}}">
|
||||
{{/if}}
|
||||
{{!-- image --}}
|
||||
<div class="ds4-item-list__image" style="background-image: url('{{item.img}}')" title="{{item.name}}"></div>
|
||||
{{!-- amount --}}
|
||||
<input class="ds4-item-list__editable" type="number" min="0" step="1" value="{{item.data.quantity}}"
|
||||
<input class="ds4-item-list__editable item-change" type="number" min="0" step="1" value="{{item.data.quantity}}"
|
||||
data-dtype="Number" data-property="data.quantity" title="{{localize 'DS4.Quantity'}}" />
|
||||
{{!-- name --}}
|
||||
<input class="ds4-item-list__editable" type="text" value="{{item.name}}" data-dtype="String" data-property="name"
|
||||
title="{{htmlToPlainText item.data.description}}" />
|
||||
<input class="ds4-item-list__editable item-change" type="text" value="{{item.name}}" data-dtype="String"
|
||||
data-property="name" title="{{htmlToPlainText item.data.description}}" />
|
||||
{{!-- item type specifics --}}
|
||||
{{> @partial-block}}
|
||||
{{!-- description --}}
|
||||
|
@ -168,8 +168,8 @@
|
|||
{{/itemListHeader}}
|
||||
{{#each itemsByType.equipment as |item id|}}
|
||||
{{#> itemListEntry item=item }}
|
||||
<input class="ds4-item-list__editable" type="text" value="{{item.data.storageLocation}}" data-dtype="String"
|
||||
data-property="data.storageLocation" title="{{localize 'DS4.StorageLocation'}}">
|
||||
<input class="ds4-item-list__editable item-change" type="text" value="{{item.data.storageLocation}}"
|
||||
data-dtype="String" data-property="data.storageLocation" title="{{localize 'DS4.StorageLocation'}}">
|
||||
{{/itemListEntry}}
|
||||
{{/each}}
|
||||
</ol>
|
||||
|
@ -184,8 +184,8 @@
|
|||
{{/itemListHeader}}
|
||||
{{#each itemsByType.loot as |item id|}}
|
||||
{{#> itemListEntry item=item }}
|
||||
<input class="ds4-item-list__editable" type="text" value="{{item.data.storageLocation}}" data-dtype="String"
|
||||
data-property="data.storageLocation" title="{{localize 'DS4.StorageLocation'}}">
|
||||
<input class="ds4-item-list__editable item-change" type="text" value="{{item.data.storageLocation}}"
|
||||
data-dtype="String" data-property="data.storageLocation" title="{{localize 'DS4.StorageLocation'}}">
|
||||
{{/itemListEntry}}
|
||||
{{/each}}
|
||||
</ol>
|
||||
|
|
|
@ -59,13 +59,13 @@ localizationString=localizationString}}
|
|||
</li>
|
||||
{{#each itemsByType.spell as |item id|}}
|
||||
<li class="ds4-item-list__row item" data-item-id="{{item._id}}">
|
||||
<input class="ds4-item-list__editable ds4-item-list__editable--checkbox" type="checkbox" {{checked
|
||||
<input class="ds4-item-list__editable ds4-item-list__editable--checkbox item-change" type="checkbox" {{checked
|
||||
item.data.data.equipped}} data-dtype="Boolean" data-property="data.equipped"
|
||||
title="{{localize 'DS4.ItemEquipped'}}">
|
||||
{{!-- image --}}
|
||||
<div class="ds4-item-list__image" style="background-image: url('{{item.img}}')" title="{{item.name}}"></div>
|
||||
{{!-- name --}}
|
||||
<input class="ds4-item-list__editable" type="text" value="{{item.name}}" data-dtype="String"
|
||||
<input class="ds4-item-list__editable item-change" type="text" value="{{item.name}}" data-dtype="String"
|
||||
data-property="name" title="{{htmlToPlainText item.data.data.description}}" />
|
||||
{{!-- spell type --}}
|
||||
<div class="ds4-item-list__image"
|
||||
|
@ -73,7 +73,7 @@ localizationString=localizationString}}
|
|||
title="{{lookup ../config.i18n.spellTypes item.data.data.spellType}}">
|
||||
</div>
|
||||
{{!-- spell bonus --}}
|
||||
<input class="ds4-item-list__editable" type="text" data-dtype="String" data-property="data.bonus"
|
||||
<input class="ds4-item-list__editable item-change" type="text" data-dtype="String" data-property="data.bonus"
|
||||
value="{{item.data.data.bonus}}" title="{{localize 'DS4.SpellBonus'}}" />
|
||||
{{!-- max. distance --}}
|
||||
{{> distanceUnit localizationString='DS4.SpellMaxDistance' unitDatum=item.data.data.maxDistance
|
||||
|
|
|
@ -24,14 +24,14 @@
|
|||
!-- Render an input element for a rank value property of an item.
|
||||
!--
|
||||
!-- @param item: the item
|
||||
!-- @param property: the key of the property in item.data.data (if 'base', the max value is set automatically)
|
||||
!-- @param property: the key of the property in item.data (if 'base', the max value is set automatically)
|
||||
!-- @param disabled: if given, is placed plainly into the input as HTML property;
|
||||
!-- meant to be set to "disabled" to disable the input element
|
||||
--}}
|
||||
{{#*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.rank.max}}" {{/if}} {{disabled}} data-property="data.rank.{{property}}"
|
||||
value="{{lookup item.data.data.rank property}}" title="{{localize localizeString}}" />
|
||||
}}max="{{item.data.rank.max}}" {{/if}} {{disabled}} data-property="data.rank.{{property}}"
|
||||
value="{{lookup item.data.rank property}}" title="{{localize localizeString}}" />
|
||||
{{/inline}}
|
||||
|
||||
|
||||
|
@ -50,7 +50,7 @@
|
|||
</div>
|
||||
{{!-- name --}}
|
||||
<input class="flex2 item-name item-change" type="text" value="{{item.name}}" data-dtype="String"
|
||||
data-property="name" title="{{htmlToPlainText item.data.data.description}}">
|
||||
data-property="name" title="{{htmlToPlainText item.data.description}}">
|
||||
<div class="flex3 flexrow talent-ranks-equation">
|
||||
{{!-- acquired rank --}}
|
||||
{{> talentRankValue item=item property='base' localizeString='DS4.TalentRankBase'}}
|
||||
|
@ -65,8 +65,8 @@
|
|||
{{> talentRankValue item=item property='total' localizeString='DS4.TalentRankTotal' disabled='disabled'}}
|
||||
</div>
|
||||
{{!-- description --}}
|
||||
<div class="flex4 item-description" title="{{htmlToPlainText item.data.data.description}}">
|
||||
{{{item.data.data.description}}}</div>
|
||||
<div class="flex4 item-description" title="{{htmlToPlainText item.data.description}}">
|
||||
{{{item.data.description}}}</div>
|
||||
{{!-- control buttons --}}
|
||||
{{> systems/ds4/templates/actor/partials/overview-control-buttons.hbs }}
|
||||
</li>
|
||||
|
@ -89,10 +89,10 @@
|
|||
</div>
|
||||
{{!-- name --}}
|
||||
<input class="flex1 item-name item-change" type="text" value="{{item.name}}" data-dtype="String"
|
||||
data-property="name" title="{{htmlToPlainText item.data.data.description}}"">
|
||||
data-property="name" title="{{htmlToPlainText item.data.description}}"">
|
||||
{{!-- description --}}
|
||||
<div class=" flex3 item-description" title="{{htmlToPlainText item.data.data.description}}">
|
||||
{{{item.data.data.description}}}</div>
|
||||
<div class=" flex3 item-description" title="{{htmlToPlainText item.data.description}}">
|
||||
{{{item.data.description}}}</div>
|
||||
{{!-- control buttons --}}
|
||||
{{> systems/ds4/templates/actor/partials/overview-control-buttons.hbs }}
|
||||
</li>
|
||||
|
|
Loading…
Reference in a new issue