tweaks on number inputs

This commit is contained in:
Vlyan
2020-12-20 16:05:59 +01:00
parent d087ec5080
commit e1105b6293
20 changed files with 170 additions and 73 deletions

View File

@@ -6,7 +6,7 @@
</label>
<label class="attribute-label">
<strong>{{ localize 'l5r5e.attributes.fatigue' }}</strong>
<input class="centered-input" type="text" name="data.fatigue" value="{{data.fatigue}}" data-dtype="Number"/>
<input class="centered-input select-on-focus" type="number" name="data.fatigue" value="{{data.fatigue}}" data-dtype="Number" min="0" placeholder="0"/>
</label>
<p class="quick-rules"> {{ localize 'l5r5e.attributes.endurancetip' }}</p>
</li>
@@ -17,7 +17,7 @@
</label>
<label class="attribute-label">
<strong>{{ localize 'l5r5e.attributes.strife' }}</strong>
<input class="centered-input" type="text" name="data.strife" value="{{data.strife}}" data-dtype="Number"/>
<input class="centered-input select-on-focus" type="number" name="data.strife" value="{{data.strife}}" data-dtype="Number" min="0" placeholder="0"/>
</label>
<p class="quick-rules"> {{ localize 'l5r5e.attributes.composuretip' }}</p>
</li>
@@ -38,7 +38,7 @@
<li class="void-content">
<label class="attribute-label">
<strong>{{ localize 'l5r5e.attributes.voidpoints' }}</strong>
<input class="centered-input" type="text" name="data.void_points.current" value="{{data.void_points.current}}" data-dtype="Number"/>
<input class="centered-input select-on-focus" type="number" name="data.void_points.current" value="{{data.void_points.current}}" data-dtype="Number" placeholder="0" min="0" max="{{data.void_points.max}}"/>
<input class="centered-input" type="text" name="data.void_points.max" value="{{data.void_points.max}}" data-dtype="Number" disabled/>
</label>
</li>

View File

@@ -12,11 +12,11 @@
{{!-- Martial --}}
<li>
<i class="i_bushi"></i>
<input type="text" name="data.conflict_rank.martial" value="{{data.conflict_rank.martial}}" data-dtype="Number" placeholder="0"/>
<input class="centered-input select-on-focus" type="number" name="data.conflict_rank.martial" value="{{data.conflict_rank.martial}}" data-dtype="Number" min="0" placeholder="0"/>
</li>
{{!-- Social --}}
<li>
<i class="i_courtier"></i>
<input type="text" name="data.conflict_rank.social" value="{{data.conflict_rank.social}}" data-dtype="Number" placeholder="0"/>
<input class="centered-input select-on-focus" type="number" name="data.conflict_rank.social" value="{{data.conflict_rank.social}}" data-dtype="Number" min="0" placeholder="0"/>
</li>
</ul>

View File

@@ -1,9 +1,9 @@
<fieldset class="narrative-content">
<legend class="text-block-header">{{ localize 'l5r5e.social.advantages' }}</legend>
<ul class="item-list">
{{#each actor.item as |item id|}}
{{#ifCond item.type '==' 'advantage'}}
{{> 'systems/l5r5e/templates/items/item/item-entry.html' item=item id=id }}
{{#each actor.items as |item id|}}
{{#ifCond '["distinction","passion"]' 'includes' item.data.peculiarity_type}}
{{> 'systems/l5r5e/templates/items/peculiarity/peculiarity-entry.html' peculiarity=item id=id }}
{{/ifCond}}
{{/each}}
</ul>
@@ -11,9 +11,9 @@
<fieldset class="narrative-content">
<legend class="text-block-header">{{ localize 'l5r5e.social.disadvantages' }}</legend>
<ul class="item-list">
{{#each actor.item as |item id|}}
{{#ifCond item.type '==' 'disadvantage'}}
{{> 'systems/l5r5e/templates/items/item/item-entry.html' item=item id=id }}
{{#each actor.items as |item id|}}
{{#ifCond '["adversity","anxiety"]' 'includes' item.data.peculiarity_type}}
{{> 'systems/l5r5e/templates/items/peculiarity/peculiarity-entry.html' peculiarity=item id=id }}
{{/ifCond}}
{{/each}}
</ul>

View File

@@ -3,35 +3,35 @@
<label class="attribute-label earth centered-input">
<i class="i_earth"></i>
<strong>{{ localizeRing 'earth' }}</strong>
<input class="centered-input" type="text" name="data.rings.earth" value="{{data.rings.earth}}" data-dtype="Number" placeholder="0"/>
<input class="centered-input select-on-focus" type="number" name="data.rings.earth" value="{{data.rings.earth}}" data-dtype="Number" min="1" max="9" placeholder="0"/>
</label>
</li>
<li id="air">
<label class="attribute-label air centered-input">
<i class="i_air"></i>
<strong>{{ localizeRing 'air' }}</strong>
<input class="centered-input" type="text" name="data.rings.air" value="{{data.rings.air}}" data-dtype="Number" placeholder="0"/>
<input class="centered-input select-on-focus" type="number" name="data.rings.air" value="{{data.rings.air}}" data-dtype="Number" min="1" max="9" placeholder="0"/>
</label>
</li>
<li id="water">
<label class="attribute-label water centered-input">
<i class="i_water"></i>
<strong>{{ localizeRing 'water' }}</strong>
<input class="centered-input" type="text" name="data.rings.water" value="{{data.rings.water}}" data-dtype="Number" placeholder="0"/>
<input class="centered-input select-on-focus" type="number" name="data.rings.water" value="{{data.rings.water}}" data-dtype="Number" min="1" max="9" placeholder="0"/>
</label>
</li>
<li id="fire">
<label class="attribute-label fire centered-input">
<i class="i_fire"></i>
<strong>{{ localizeRing 'fire' }}</strong>
<input class="centered-input" type="text" name="data.rings.fire" value="{{data.rings.fire}}" data-dtype="Number" placeholder="0"/>
<input class="centered-input select-on-focus" type="number" name="data.rings.fire" value="{{data.rings.fire}}" data-dtype="Number" min="1" max="9" placeholder="0"/>
</label>
</li>
<li id="void">
<label class="attribute-label void centered-input">
<i class="i_void"></i>
<strong>{{ localizeRing 'void' }}</strong>
<input class="centered-input" type="text" name="data.rings.void" value="{{data.rings.void}}" data-dtype="Number" placeholder="0"/>
<input class="centered-input select-on-focus" type="number" name="data.rings.void" value="{{data.rings.void}}" data-dtype="Number" min="1" max="9" placeholder="0"/>
</label>
</li>
</ul>

View File

@@ -1,10 +1,10 @@
<ul class="npc-skill">{{!-- Skills --}}
{{#each data.skills as |skillValue skillCatId|}}
<li class="skill skill-wrapper" data-skillcat="{{skillCatId}}">
<label for="skill_{{skillCatId}}" class="skill-name">
<label class="skill-name">
{{localizeSkill skillCatId "title"}}
</label>
<input id="skill_{{skillCatId}}" type="text" name="data.skills.{{skillCatId}}" value="{{skillValue}}" data-dtype="Number" placeholder="0"/>
<input class="centered-input select-on-focus" id="skill_{{skillCatId}}" type="number" name="data.skills.{{skillCatId}}" value="{{skillValue}}" data-dtype="Number" min="0" max="9" placeholder="0"/>
</li>
{{/each}}
</ul>

View File

@@ -2,19 +2,19 @@
<li>
<label class="attribute-label centered-input">
<strong>{{ localize 'l5r5e.social.honor' }}</strong>
<input class="centered-input" type="text" name="data.social.honor" value="{{data.social.honor}}" placeholder="0"/>
<input class="centered-input select-on-focus" type="number" name="data.social.honor" value="{{data.social.honor}}" data-dtype="Number" placeholder="0"/>
</label>
</li>
<li>
<label class="attribute-label centered-input">
<strong>{{ localize 'l5r5e.social.glory' }}</strong>
<input class="centered-input" type="text" name="data.social.glory" value="{{data.social.glory}}" placeholder="0"/>
<input class="centered-input select-on-focus" type="number" name="data.social.glory" value="{{data.social.glory}}" data-dtype="Number" placeholder="0"/>
</label>
</li>
<li>
<label class="attribute-label centered-input">
<strong>{{ localize 'l5r5e.social.status' }}</strong>
<input class="centered-input" type="text" name="data.social.status" value="{{data.social.status}}" placeholder="0"/>
<input class="centered-input select-on-focus" type="number" name="data.social.status" value="{{data.social.status}}" data-dtype="Number" placeholder="0"/>
</label>
</li>
<li class="affinities">
@@ -26,7 +26,7 @@
{{/each}}
{{/select}}
</select>
<input type="text" name="data.rings_affinities.strength.value" value="{{data.rings_affinities.strength.value}}" data-dtype="Number" placeholder="0"/>
<input class="centered-input select-on-focus" type="number" name="data.rings_affinities.strength.value" value="{{data.rings_affinities.strength.value}}" data-dtype="Number" min="1" max="9" placeholder="0"/>
{{!-- Weakness --}}
<select class="attribute-dtype" name="data.rings_affinities.weakness.ring">
{{#select data.rings_affinities.weakness.ring}}
@@ -35,7 +35,7 @@
{{/each}}
{{/select}}
</select>
<input type="text" name="data.rings_affinities.weakness.value" value="{{data.rings_affinities.weakness.value}}" data-dtype="Number" placeholder="0"/>
<input class="centered-input select-on-focus" type="number" name="data.rings_affinities.weakness.value" value="{{data.rings_affinities.weakness.value}}" data-dtype="Number" min="-9" max="-1" placeholder="0"/>
{{!-- Attitude --}}
<label class="attitude">
<input type="text" name="data.attitude" value="{{data.attitude}}" data-dtype="String" placeholder=""/>