Merge branch 'quality-of-life-improvements' into 'master'
Quality of life improvements Closes #62 See merge request dungeonslayers/ds4!66
This commit is contained in:
commit
452ef2add6
10 changed files with 67 additions and 38 deletions
|
@ -144,9 +144,9 @@
|
|||
"DS4.CharacterProfileBirthday": "Geburtstag",
|
||||
"DS4.CharacterProfileBirthplace": "Geburtsort",
|
||||
"DS4.CharacterProfileAge": "Alter",
|
||||
"DS4.CharacterProfileHeight": "Größe",
|
||||
"DS4.CharacterProfileHeight": "Größe [cm]",
|
||||
"DS4.CharacterProfileHairColor": "Haarfarbe",
|
||||
"DS4.CharacterProfileWeight": "Gewicht",
|
||||
"DS4.CharacterProfileWeight": "Gewicht [kg]",
|
||||
"DS4.CharacterProfileEyeColor": "Augenfarbe",
|
||||
"DS4.CharacterProfileSpecialCharacteristics": "Besondere Eigenschaften",
|
||||
"DS4.CharacterCurrencyGold": "Gold",
|
||||
|
|
|
@ -144,9 +144,9 @@
|
|||
"DS4.CharacterProfileBirthday": "Birthday",
|
||||
"DS4.CharacterProfileBirthplace": "Birthplace",
|
||||
"DS4.CharacterProfileAge": "Age",
|
||||
"DS4.CharacterProfileHeight": "Height",
|
||||
"DS4.CharacterProfileHeight": "Height [m]",
|
||||
"DS4.CharacterProfileHairColor": "Hair Color",
|
||||
"DS4.CharacterProfileWeight": "Weight",
|
||||
"DS4.CharacterProfileWeight": "Weight [kg]",
|
||||
"DS4.CharacterProfileEyeColor": "Eye Color",
|
||||
"DS4.CharacterProfileSpecialCharacteristics": "Special Characteristics",
|
||||
"DS4.CharacterCurrencyGold": "Gold",
|
||||
|
|
|
@ -133,3 +133,21 @@ Hooks.once("setup", function () {
|
|||
Hooks.once("ready", function () {
|
||||
migration.migrate();
|
||||
});
|
||||
|
||||
/**
|
||||
* Select the text of input elements in given sheets via onfocus listener.
|
||||
* The hook names are of the form "render"+sheet_superclassname and are called within
|
||||
* the render() method of the foundry Application class.
|
||||
* Note: The render hooks of all classes in the class hierarchy are called,
|
||||
* so e.g. for a Dialog, both "renderDialog" and "renderApplication" are called
|
||||
* (in this order).
|
||||
*/
|
||||
["renderApplication", "renderActorSheet", "renderItemSheet"].forEach((hookName: string) => {
|
||||
Hooks.on(hookName, (app: Dialog, html: JQueryStatic, data: any) => {
|
||||
$(html)
|
||||
.find("input")
|
||||
.on("focus", (ev: JQuery.FocusEvent<HTMLInputElement>) => {
|
||||
ev.currentTarget.select();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -84,24 +84,28 @@
|
|||
<a class="item" data-tab="biography">{{localize 'DS4.HeadingBiography'}}</a>
|
||||
</nav>
|
||||
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
{{!-- Items Tab --}}
|
||||
{{> systems/ds4/templates/actor/partials/character-inventory.hbs}}
|
||||
<!-- beautify ignore:start -->
|
||||
<!-- prettier-ignore-start -->
|
||||
{{!-- Sheet Body (remove indentation to avoid annoying Handlebars auto-indent) --}}
|
||||
<section class="sheet-body">
|
||||
{{!-- Items Tab --}}
|
||||
{{> systems/ds4/templates/actor/partials/character-inventory.hbs}}
|
||||
|
||||
{{!-- Spells Tab --}}
|
||||
{{> systems/ds4/templates/actor/partials/spells-overview.hbs}}
|
||||
{{!-- Spells Tab --}}
|
||||
{{> systems/ds4/templates/actor/partials/spells-overview.hbs}}
|
||||
|
||||
{{!-- Talents Tab --}}
|
||||
{{> systems/ds4/templates/actor/partials/talents-abilities-overview.hbs}}
|
||||
{{!-- Talents Tab --}}
|
||||
{{> systems/ds4/templates/actor/partials/talents-abilities-overview.hbs}}
|
||||
|
||||
{{! Profile Tab --}}
|
||||
{{> systems/ds4/templates/actor/partials/profile.hbs}}
|
||||
{{! Profile Tab --}}
|
||||
{{> systems/ds4/templates/actor/partials/profile.hbs}}
|
||||
|
||||
{{!-- Biography Tab --}}
|
||||
<div class="tab biography" data-group="primary" data-tab="biography">
|
||||
{{editor content=data.profile.biography target="data.profile.biography" button=true owner=owner
|
||||
editable=editable}}
|
||||
</div>
|
||||
</section>
|
||||
{{!-- Biography Tab --}}
|
||||
<div class="tab biography" data-group="primary" data-tab="biography">
|
||||
{{editor content=data.profile.biography target="data.profile.biography" button=true owner=owner
|
||||
editable=editable}}
|
||||
</div>
|
||||
</section>
|
||||
<!-- prettier-ignore-end -->
|
||||
<!-- beautify ignore:end -->
|
||||
</form>
|
||||
|
|
|
@ -15,9 +15,8 @@
|
|||
{{#*inline "ifHasItemOfType"}}
|
||||
{{#if (and (ne itemsArray undefined) (gt itemsArray.length 0))}}
|
||||
{{> @partial-block}}
|
||||
{{else}}
|
||||
{{> systems/ds4/templates/actor/partials/overview-add-button.hbs dataType=dataType }}
|
||||
{{/if}}
|
||||
{{> systems/ds4/templates/actor/partials/overview-add-button.hbs dataType=dataType }}
|
||||
{{/inline}}
|
||||
|
||||
|
||||
|
@ -48,8 +47,8 @@
|
|||
{{> @partial-block }}
|
||||
{{!-- description --}}
|
||||
<div class="flex4">{{localize 'DS4.Description'}}</div>
|
||||
{{!-- add button --}}
|
||||
{{> systems/ds4/templates/actor/partials/overview-add-button.hbs dataType=dataType }}
|
||||
{{!-- control buttons placeholder --}}
|
||||
<div></div>
|
||||
</li>
|
||||
{{/inline}}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<div class="tab profile" data-group="primary" data-tab="profile">
|
||||
<div class="grid grid-2col">
|
||||
{{#each data.profile as |profile-data-value profile-data-key|}}
|
||||
{{#if (ne profile-data-key 'biography')}}
|
||||
{{#if (and (ne profile-data-key 'biography') (ne profile-data-key 'specialCharacteristics'))}}
|
||||
<div class="profile-entry">
|
||||
<label for="data.profile.{{profile-data-key}}">
|
||||
{{lookup ../config.characterProfile profile-data-key}}
|
||||
|
@ -11,5 +11,11 @@
|
|||
</div>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
<div>
|
||||
<label for="data.profile.specialCharacteristics">
|
||||
{{lookup config.characterProfile 'specialCharacteristics'}}
|
||||
</label>
|
||||
<textarea name="data.profile.specialCharacteristics" data-dtype="String" rows="4">{{data.profile.specialCharacteristics}}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -42,8 +42,8 @@
|
|||
<div class="flex1 item-name">{{localize 'DS4.ItemName'}}</div>
|
||||
{{!-- description --}}
|
||||
<div class="flex3">{{localize 'DS4.Description'}}</div>
|
||||
{{!-- add button --}}
|
||||
{{> systems/ds4/templates/actor/partials/overview-add-button.hbs dataType=dataType }}
|
||||
{{!-- control buttons placeholder --}}
|
||||
<div></div>
|
||||
</li>
|
||||
{{/inline}}
|
||||
|
||||
|
@ -58,4 +58,5 @@
|
|||
{{> baseItemListEntry item=item}}
|
||||
{{/each}}
|
||||
</ol>
|
||||
{{> systems/ds4/templates/actor/partials/overview-add-button.hbs dataType='specialCreatureAbility' }}
|
||||
</div>
|
|
@ -13,7 +13,7 @@
|
|||
<div class="unit-data-pair item-num-val"
|
||||
title="{{localize localizationString}} [{{lookup unitNames unitDatum.unit}}]" >
|
||||
{{#if unitDatum.value }}
|
||||
{{unitDatum.value}}{{lookup unitAbbrs unitDatum.unit}}
|
||||
{{unitDatum.value}} {{lookup unitAbbrs unitDatum.unit}}
|
||||
{{else}}-{{/if}}
|
||||
</div>
|
||||
{{/inline}}
|
||||
|
@ -55,8 +55,8 @@
|
|||
<div class="item-num-val" title="{{localize 'DS4.SpellCooldownDuration'}}"><i class="fas fa-hourglass-half"></i></div>
|
||||
{{!-- description --}}
|
||||
{{!-- <div class="flex3">{{localize 'DS4.Description'}}</div> --}}
|
||||
{{!-- add button --}}
|
||||
{{> systems/ds4/templates/actor/partials/overview-add-button.hbs dataType='spell' }}
|
||||
{{!-- control buttons placeholder --}}
|
||||
<div></div>
|
||||
</li>
|
||||
{{#each itemsByType.spell as |item id|}}
|
||||
<li class="item flexrow" data-item-id="{{item._id}}">
|
||||
|
@ -90,4 +90,6 @@
|
|||
</li>
|
||||
{{/each}}
|
||||
</ol>
|
||||
{{!-- add button --}}
|
||||
{{> systems/ds4/templates/actor/partials/overview-add-button.hbs dataType='spell' }}
|
||||
</div>
|
|
@ -15,9 +15,8 @@
|
|||
{{#*inline "ifHasItemOfType"}}
|
||||
{{#if (and (ne itemsArray undefined) (gt itemsArray.length 0))}}
|
||||
{{> @partial-block}}
|
||||
{{else}}
|
||||
{{> systems/ds4/templates/actor/partials/overview-add-button.hbs dataType=dataType }}
|
||||
{{/if}}
|
||||
{{> systems/ds4/templates/actor/partials/overview-add-button.hbs dataType=dataType }}
|
||||
{{/inline}}
|
||||
|
||||
|
||||
|
@ -98,7 +97,7 @@
|
|||
{{/inline}}
|
||||
|
||||
{{!--
|
||||
!-- Render a list header for a base item list entries from a given item.
|
||||
!-- Render a list header for a base item list entry from a given item.
|
||||
!-- The partial assumes a variable dataType to be given in the context.
|
||||
!--
|
||||
!-- @param dataType: the string item type for the list
|
||||
|
@ -111,8 +110,8 @@
|
|||
<div class="flex1 item-name">{{localize 'DS4.ItemName'}}</div>
|
||||
{{!-- description --}}
|
||||
<div class="flex3">{{localize 'DS4.Description'}}</div>
|
||||
{{!-- add button --}}
|
||||
{{> systems/ds4/templates/actor/partials/overview-add-button.hbs dataType=dataType }}
|
||||
{{!-- control buttons placeholder --}}
|
||||
<div></div>
|
||||
</li>
|
||||
{{/inline}}
|
||||
|
||||
|
@ -133,8 +132,8 @@
|
|||
<div class="flex3">{{localize 'DS4.TalentRank'}}</div>
|
||||
{{!-- description --}}
|
||||
<div class="flex4">{{localize 'DS4.Description'}}</div>
|
||||
{{!-- add button --}}
|
||||
{{> systems/ds4/templates/actor/partials/overview-add-button.hbs dataType='talent' }}
|
||||
{{!-- control buttons placeholder --}}
|
||||
<div></div>
|
||||
</li>
|
||||
{{#each itemsByType.talent as |item id|}}
|
||||
{{> talentListEntry item=item}}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<label for="ctv">{{localize "DS4.RollDialogTargetLabel"}}</label>
|
||||
<input id="ctv" data-type="Number" type="number" name="ctv" value="{{checkTargetValue}}" />
|
||||
<label for="gmmod">{{localize "DS4.RollDialogModifierLabel"}}</label>
|
||||
<input id="gmmod" data-type="Number" type="number" name="gmmod" value="0" />
|
||||
<input id="gmmod" data-type="Number" type="number" name="gmmod" value="0" autofocus />
|
||||
<label for="maxcoup">{{localize "DS4.RollDialogCoupLabel"}}</label>
|
||||
<input id="maxcoup" data-type="Number" type="number" name="maxcoup" value="{{maxCritSuccess}}" />
|
||||
<label for="minfumble">{{localize "DS4.RollDialogFumbleLabel"}}</label>
|
||||
|
|
Loading…
Reference in a new issue