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:
@@ -8,21 +8,44 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#each factions as |faction factionId|}}
|
||||
<tr class="faction-row">
|
||||
<tr class="faction-row" data-faction="{{factionId}}">
|
||||
<td class="faction-name">{{localize faction.label}}</td>
|
||||
<td class="faction-value">
|
||||
{{#if ../isEditMode}}
|
||||
<input type="number" name="system.factions.{{factionId}}.value"
|
||||
value="{{lookup ../system.factions factionId 'value'}}" min="0">
|
||||
{{else}}
|
||||
<span>{{lookup ../system.factions factionId 'value'}}</span>
|
||||
{{/if}}
|
||||
<div class="faction-checkboxes-container">
|
||||
<div class="faction-checkboxes">
|
||||
{{#each (array 1 2 3 4 5 6 7 8 9) as |level|}}
|
||||
{{#if @root.isEditMode}}
|
||||
<label class="faction-checkbox-wrapper">
|
||||
<input type="checkbox" name="system.factions.{{factionId}}.level{{level}}"
|
||||
{{#if (lookup (lookup @root.system.factions factionId) (concat 'level' level))}}checked{{/if}}
|
||||
class="faction-checkbox"
|
||||
data-faction="{{factionId}}"
|
||||
data-level="{{level}}">
|
||||
</label>
|
||||
{{else}}
|
||||
<label class="faction-checkbox-wrapper">
|
||||
<input type="checkbox"
|
||||
{{#if (lookup (lookup @root.system.factions factionId) (concat 'level' level))}}checked{{/if}}
|
||||
disabled class="faction-checkbox">
|
||||
</label>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</div>
|
||||
<span class="faction-count">
|
||||
{{#if ../isEditMode}}
|
||||
<input type="number" name="system.factions.{{factionId}}.value"
|
||||
value="{{lookup (lookup ../system.factions factionId) 'value'}}" min="0" max="9" class="faction-value-input">
|
||||
{{else}}
|
||||
{{lookup (lookup ../system.factions factionId) 'value'}}
|
||||
{{/if}}
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
|
||||
{{!-- Factions personnalisées --}}
|
||||
<tr class="faction-row custom">
|
||||
<tr class="faction-row custom" data-faction="perso1">
|
||||
<td>
|
||||
{{#if isEditMode}}
|
||||
<input type="text" name="system.factions.perso1.label"
|
||||
@@ -33,14 +56,38 @@
|
||||
{{/if}}
|
||||
</td>
|
||||
<td>
|
||||
{{#if isEditMode}}
|
||||
<input type="number" name="system.factions.perso1.value" value="{{system.factions.perso1.value}}" min="0">
|
||||
{{else}}
|
||||
<span>{{system.factions.perso1.value}}</span>
|
||||
{{/if}}
|
||||
<div class="faction-checkboxes-container">
|
||||
<div class="faction-checkboxes">
|
||||
{{#each (array 1 2 3 4 5 6 7 8 9) as |level|}}
|
||||
{{#if ../isEditMode}}
|
||||
<label class="faction-checkbox-wrapper">
|
||||
<input type="checkbox" name="system.factions.perso1.level{{level}}"
|
||||
{{#if (lookup ../system.factions.perso1 (concat 'level' level))}}checked{{/if}}
|
||||
class="faction-checkbox"
|
||||
data-faction="perso1"
|
||||
data-level="{{level}}">
|
||||
</label>
|
||||
{{else}}
|
||||
<label class="faction-checkbox-wrapper">
|
||||
<input type="checkbox"
|
||||
{{#if (lookup ../system.factions.perso1 (concat 'level' level))}}checked{{/if}}
|
||||
disabled class="faction-checkbox">
|
||||
</label>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</div>
|
||||
<span class="faction-count">
|
||||
{{#if ../isEditMode}}
|
||||
<input type="number" name="system.factions.perso1.value"
|
||||
value="{{system.factions.perso1.value}}" min="0" max="9" class="faction-value-input">
|
||||
{{else}}
|
||||
{{system.factions.perso1.value}}
|
||||
{{/if}}
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="faction-row custom">
|
||||
<tr class="faction-row custom" data-faction="perso2">
|
||||
<td>
|
||||
{{#if isEditMode}}
|
||||
<input type="text" name="system.factions.perso2.label"
|
||||
@@ -51,11 +98,35 @@
|
||||
{{/if}}
|
||||
</td>
|
||||
<td>
|
||||
{{#if isEditMode}}
|
||||
<input type="number" name="system.factions.perso2.value" value="{{system.factions.perso2.value}}" min="0">
|
||||
{{else}}
|
||||
<span>{{system.factions.perso2.value}}</span>
|
||||
{{/if}}
|
||||
<div class="faction-checkboxes-container">
|
||||
<div class="faction-checkboxes">
|
||||
{{#each (array 1 2 3 4 5 6 7 8 9) as |level|}}
|
||||
{{#if ../isEditMode}}
|
||||
<label class="faction-checkbox-wrapper">
|
||||
<input type="checkbox" name="system.factions.perso2.level{{level}}"
|
||||
{{#if (lookup ../system.factions.perso2 (concat 'level' level))}}checked{{/if}}
|
||||
class="faction-checkbox"
|
||||
data-faction="perso2"
|
||||
data-level="{{level}}">
|
||||
</label>
|
||||
{{else}}
|
||||
<label class="faction-checkbox-wrapper">
|
||||
<input type="checkbox"
|
||||
{{#if (lookup ../system.factions.perso2 (concat 'level' level))}}checked{{/if}}
|
||||
disabled class="faction-checkbox">
|
||||
</label>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</div>
|
||||
<span class="faction-count">
|
||||
{{#if ../isEditMode}}
|
||||
<input type="number" name="system.factions.perso2.value"
|
||||
value="{{system.factions.perso2.value}}" min="0" max="9" class="faction-value-input">
|
||||
{{else}}
|
||||
{{system.factions.perso2.value}}
|
||||
{{/if}}
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
Reference in New Issue
Block a user