Clean up actor sheet
This commit is contained in:
parent
1f629f3468
commit
48620636df
12 changed files with 189 additions and 166 deletions
|
@ -12,8 +12,8 @@ SPDX-License-Identifier: MIT
|
|||
!-- @param type: An optional property to use as data-type attribute
|
||||
}}
|
||||
<div>
|
||||
<a class="control-{{documentType}} {{documentType}}-create" title="{{localize title}}" data-action="create" {{#if
|
||||
type}}data-type="{{type}}" {{/if}}>
|
||||
<a class="control-{{documentType}}" title="{{localize title}}" data-action="create" {{#if type}}data-type="{{type}}"
|
||||
{{/if}}>
|
||||
<i class="fas fa-plus"></i>
|
||||
{{localize "DS4.UserInteractionAdd"}}
|
||||
</a>
|
||||
|
|
|
@ -7,14 +7,14 @@ SPDX-License-Identifier: MIT
|
|||
|
||||
{{!--
|
||||
!-- Render a group of an "edit" and a "delete" button.
|
||||
!-- The current item is defined by the data-item-id HTML property of the parent li element.
|
||||
!-- The current item is defined by the data-id attribute of the parent li element.
|
||||
!-- @param documentType: The type of document that is controlled by this button group, item or effect
|
||||
!-- @param editTitle: The title to use for the edit link element (will be localized)
|
||||
!-- @param deleteTitle: The title to use for the delete link element (will be localized)
|
||||
--}}
|
||||
<div class="ds4-control-button-group">
|
||||
<a class="ds4-control-button-group__button control-{{documentType}} {{documentType}}-edit" data-action="edit"
|
||||
<a class="ds4-control-button-group__button control-{{documentType}}" data-action="edit"
|
||||
title="{{localize editTitle}}"><i class="fas fa-edit"></i></a>
|
||||
<a class="ds4-control-button-group__button control-{{documentType}} {{documentType}}-delete" data-action="delete"
|
||||
<a class="ds4-control-button-group__button control-{{documentType}}" data-action="delete"
|
||||
title="{{localize deleteTitle}}"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
|
|
|
@ -10,7 +10,7 @@ SPDX-License-Identifier: MIT
|
|||
<div class="ds4-currency">
|
||||
{{#each data.data.currency as |value key|}}
|
||||
<label for="data.currency.{{key}}" class="flex05">{{lookup ../config.i18n.characterCurrency key}}</label>
|
||||
<input class="ds4-currency__value ds4-currency__value--{{key}} item-change" type="number" min="0" step="1"
|
||||
<input class="ds4-currency__value ds4-currency__value--{{key}} change-item" type="number" min="0" step="1"
|
||||
name="data.currency.{{key}}" id="data.currency.{{key}}" value="{{value}}" data-dtype="Number" />
|
||||
{{/each}}
|
||||
</div>
|
||||
|
|
|
@ -9,7 +9,7 @@ SPDX-License-Identifier: MIT
|
|||
!-- Render an effect list entry row.
|
||||
!-- @param effectData: The data of the item.
|
||||
--}}
|
||||
<li class="ds4-effect-list__row effect" data-effect-id="{{effectData._id}}">
|
||||
<li class="ds4-effect-list__row effect" data-id="{{effectData._id}}">
|
||||
{{!-- enabled --}}
|
||||
<input class="ds4-effect-list__editable ds4-effect-list__editable--checkbox change-effect" type="checkbox" {{checked
|
||||
(ne effectData.disabled true)}} data-dtype="Boolean" data-property="disabled" data-inverted="true"
|
||||
|
|
|
@ -8,7 +8,7 @@ SPDX-License-Identifier: MIT
|
|||
{{!--
|
||||
!-- Render an effect list header row.
|
||||
--}}
|
||||
<li class="ds4-effect-list__row ds4-effect-list__row--header" data-effect-id="{{effectData._id}}">
|
||||
<li class="ds4-effect-list__row ds4-effect-list__row--header">
|
||||
{{!-- enabled --}}
|
||||
<div title="{{localize 'DS4.EffectEnabled'}}">{{localize 'DS4.EffectEnabledAbbr'}}</div>
|
||||
|
||||
|
|
|
@ -15,10 +15,10 @@ SPDX-License-Identifier: MIT
|
|||
!-- @param hideDescription: A flag to disable the description column.
|
||||
!-- @param @partial-block: Custom column headers can be passed using the partial block.
|
||||
--}}
|
||||
<li class="ds4-item-list__row item" data-item-id="{{itemData._id}}">
|
||||
<li class="ds4-item-list__row item" data-id="{{itemData._id}}">
|
||||
{{!-- equipped --}}
|
||||
{{#if isEquipable}}
|
||||
<input class="ds4-item-list__editable ds4-item-list__editable--checkbox item-change" type="checkbox" {{checked
|
||||
<input class="ds4-item-list__editable ds4-item-list__editable--checkbox change-item" type="checkbox" {{checked
|
||||
itemData.data.equipped}} data-dtype="Boolean" data-property="data.equipped"
|
||||
title="{{localize 'DS4.ItemEquipped'}}">
|
||||
{{/if}}
|
||||
|
@ -30,12 +30,12 @@ SPDX-License-Identifier: MIT
|
|||
|
||||
{{!-- amount --}}
|
||||
{{#if hasQuantity}}
|
||||
<input class="ds4-item-list__editable item-change" type="number" min="0" step="1" value="{{itemData.data.quantity}}"
|
||||
<input class="ds4-item-list__editable change-item" type="number" min="0" step="1" value="{{itemData.data.quantity}}"
|
||||
data-dtype="Number" data-property="data.quantity" title="{{localize 'DS4.Quantity'}}" />
|
||||
{{/if}}
|
||||
|
||||
{{!-- name --}}
|
||||
<input class="ds4-item-list__editable item-change" type="text" value="{{itemData.name}}" data-dtype="String"
|
||||
<input class="ds4-item-list__editable change-item" type="text" value="{{itemData.name}}" data-dtype="String"
|
||||
data-property="name" title="{{htmlToPlainText itemData.data.description}}" />
|
||||
|
||||
{{!-- item type specifics --}}
|
||||
|
|
|
@ -117,7 +117,7 @@ documentType='item' type='shield'}}
|
|||
{{#> systems/ds4/templates/sheets/actor/components/item-list-entry.hbs itemData=itemData isEquipable=true
|
||||
hasQuantity=true}}
|
||||
{{!-- storage location --}}
|
||||
<input class="ds4-item-list__editable item-change" type="text" value="{{itemData.data.storageLocation}}"
|
||||
<input class="ds4-item-list__editable change-item" type="text" value="{{itemData.data.storageLocation}}"
|
||||
data-dtype="String" data-property="data.storageLocation" title="{{localize 'DS4.StorageLocation'}}">
|
||||
{{/systems/ds4/templates/sheets/actor/components/item-list-entry.hbs}}
|
||||
{{/each}}
|
||||
|
@ -137,7 +137,7 @@ documentType='item' type='equipment'}}
|
|||
{{#each itemsByType.loot as |itemData id|}}
|
||||
{{#> systems/ds4/templates/sheets/actor/components/item-list-entry.hbs itemData=itemData hasQuantity=true}}
|
||||
{{!-- storage location --}}
|
||||
<input class="ds4-item-list__editable item-change" type="text" value="{{itemData.data.storageLocation}}"
|
||||
<input class="ds4-item-list__editable change-item" type="text" value="{{itemData.data.storageLocation}}"
|
||||
data-dtype="String" data-property="data.storageLocation" title="{{localize 'DS4.StorageLocation'}}">
|
||||
{{/systems/ds4/templates/sheets/actor/components/item-list-entry.hbs}}
|
||||
{{/each}}
|
||||
|
|
|
@ -18,7 +18,7 @@ disable the input element
|
|||
!-- @param localizeString: The string to use as key for the localized tooltip
|
||||
--}}
|
||||
{{#*inline "talentRankValue"}}
|
||||
<input class="ds4-talent-rank-equation__value item-change" data-dtype="Number" type="number" min="0" step="1" {{#if (eq
|
||||
<input class="ds4-talent-rank-equation__value change-item" data-dtype="Number" type="number" min="0" step="1" {{#if (eq
|
||||
property 'base' ) }}max="{{talentRank.max}}" {{/if}} {{disabled}} data-property="data.rank.{{property}}"
|
||||
value="{{lookup talentRank property}}" title="{{localize localizeString}}" />
|
||||
{{/inline}}
|
||||
|
|
|
@ -76,7 +76,7 @@ titleKey=titleKey}}
|
|||
title="{{lookup ../../config.i18n.spellTypes itemData.data.spellType}}" />
|
||||
|
||||
{{!-- spell bonus --}}
|
||||
<input class="ds4-item-list__editable item-change" type="text" data-dtype="String" data-property="data.bonus"
|
||||
<input class="ds4-item-list__editable change-item" type="text" data-dtype="String" data-property="data.bonus"
|
||||
value="{{itemData.data.bonus}}" title="{{localize 'DS4.SpellBonus'}}" />
|
||||
|
||||
{{!-- max. distance --}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue