Merge branch 'master' into 065-simplify-localization

This commit is contained in:
Gesina Schwalbe 2021-01-26 20:51:45 +01:00
commit f7575da47a
10 changed files with 67 additions and 38 deletions

View file

@ -147,9 +147,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",

View file

@ -147,9 +147,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",

View file

@ -103,3 +103,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();
});
});
});

View file

@ -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>

View file

@ -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}}

View file

@ -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.i18n.characterProfile profile-data-key}}
@ -11,5 +11,11 @@
</div>
{{/if}}
{{/each}}
<div>
<label for="data.profile.specialCharacteristics">
{{lookup config.i18n.characterProfile 'specialCharacteristics'}}
</label>
<textarea name="data.profile.specialCharacteristics" data-dtype="String" rows="4">{{data.profile.specialCharacteristics}}</textarea>
</div>
</div>
</div>

View file

@ -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>

View file

@ -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}}&thinsp;{{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>

View file

@ -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}}

View file

@ -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>