Fix roll dialog CSS + JS: template <div> wrapper, moon-section, selectors
- Remplace <form class='roll-dialog celestopol'> par <div class='roll-dialog-content'>
pour éviter les formulaires HTML imbriqués invalides (DialogV2 a son propre <form>)
- Corrige le sélecteur CSS de .roll-dialog.celestopol vers .application.roll-dialog .roll-dialog-content
- Remplace .form-group.form-moon par .moon-section (classe custom) pour éviter
les conflits avec le CSS grid de FoundryVTT standard-form (label 130px de hauteur)
- Met à jour le script JS inline pour utiliser document.querySelector('.roll-dialog-content')
- Ajoute white-space: nowrap sur le label Destin pour éviter le wrapping sur 3 lignes
- Supprime .application.roll-dialog .window-content padding override (remplacé par dialog-content)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<div class="tab competences {{tab.cssClass}}" data-group="sheet" data-tab="competences">
|
||||
{{!-- Grille des 4 stats × 4 compétences --}}
|
||||
{{!-- Grille des 4 stats × 4 domaines --}}
|
||||
<div class="stats-grid">
|
||||
{{#each stats as |stat statId|}}
|
||||
<div class="stat-block">
|
||||
@@ -8,26 +8,50 @@
|
||||
<div class="stat-res">
|
||||
<label>{{localize "CELESTOPOL.Stat.res"}}</label>
|
||||
{{#if ../isEditMode}}
|
||||
<input type="number" name="system.stats.{{statId}}.res" value="{{lookup ../system.stats statId 'res'}}" min="0" max="8" class="stat-res-input">
|
||||
<input type="number" name="system.stats.{{statId}}.res" value="{{lookup (lookup ../system.stats statId) 'res'}}" min="0" max="8" class="stat-res-input">
|
||||
{{else}}
|
||||
<span class="stat-res-value">{{lookup ../system.stats statId 'res'}}</span>
|
||||
<span class="stat-res-value">{{lookup (lookup ../system.stats statId) 'res'}}</span>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="skills-list">
|
||||
{{#each (lookup ../skills statId) as |skill skillId|}}
|
||||
<div class="skill-row {{#unless ../isEditMode}}rollable{{/unless}}"
|
||||
data-stat-id="{{statId}}" data-skill-id="{{skillId}}"
|
||||
title="{{#unless ../isEditMode}}{{localize 'CELESTOPOL.Roll.clickToRoll'}}{{/unless}}">
|
||||
{{#if @root.isEditMode}}
|
||||
<div class="skill-row edit-mode" data-stat-id="{{statId}}" data-skill-id="{{skillId}}">
|
||||
<span class="skill-name">{{localize skill.label}}</span>
|
||||
{{#if ../isEditMode}}
|
||||
<input type="number" name="system.stats.{{statId}}.{{skillId}}.value"
|
||||
value="{{lookup (lookup ../system.stats statId) skillId 'value'}}"
|
||||
min="0" max="8" class="skill-value-input">
|
||||
{{else}}
|
||||
<span class="skill-value">{{lookup (lookup ../system.stats statId) skillId 'value'}}</span>
|
||||
{{/if}}
|
||||
<div class="skill-checkboxes-container">
|
||||
<div class="skill-checkboxes">
|
||||
{{#each (array 1 2 3 4 5 6 7 8) as |level|}}
|
||||
<label class="skill-checkbox-wrapper">
|
||||
<input type="checkbox" name="system.stats.{{statId}}.{{skillId}}.level{{level}}"
|
||||
{{#if (lookup (lookup (lookup @root.system.stats statId) skillId) (concat 'level' level))}}checked{{/if}}
|
||||
class="skill-level-checkbox">
|
||||
</label>
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
<input type="number" name="system.stats.{{statId}}.{{skillId}}.value"
|
||||
value="{{lookup (lookup @root.system.stats statId) skillId 'value'}}"
|
||||
min="0" max="8" class="skill-value-input">
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="skill-row rollable" data-stat-id="{{statId}}" data-skill-id="{{skillId}}"
|
||||
title="{{localize 'CELESTOPOL.Roll.clickToRoll'}}">
|
||||
<span class="skill-name">{{localize skill.label}}</span>
|
||||
<div class="skill-checkboxes-container">
|
||||
<div class="skill-checkboxes">
|
||||
{{#each (array 1 2 3 4 5 6 7 8) as |level|}}
|
||||
<label class="skill-checkbox-wrapper">
|
||||
<input type="checkbox"
|
||||
{{#if (lookup (lookup (lookup @root.system.stats statId) skillId) (concat 'level' level))}}checked{{/if}}
|
||||
disabled class="skill-level-checkbox">
|
||||
</label>
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
<span class="skill-value">{{lookup (lookup @root.system.stats statId) skillId 'value'}}</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user