foundryvtt-reve-de-dragon/templates/dialog-roll-sort.html
Vincent Vandemeulebrouck 63770790b9 Fix multi-dialogs
Arrêter d'utiliser le jQuery $(selector) qui cause des effets de bord si
plusieurs élements de la page (ie: foundry) correspondent
au selector.

Stocker le html dans les Sheet/Dialogs lors de l'appel
activateListeners  afin de pouvoir s'y référer ensuite.

Utiliser this.html.find pour chercher dans le html de la fenêtre
courante.

Eliminer les référence par id html car l'id est unique (donc ne marche
pas en multi-fenêtres)
2022-12-09 02:07:59 +01:00

77 lines
3.2 KiB
HTML

<form class="dialog-roll-sort">
<img class="chat-icon" src="{{competence.img}}" alt="{{competence.name}}" />
<div>
<h2 class="flexrow">Lancer le {{#if sort.system.isrituel}}rituel{{else}}sort{{/if}}</h2>
<select name="sort" class="roll-sort" data-dtype="String">
{{#select sort}}
{{#each sortList as |choix key|}}
<option value={{key}}>{{choix.name}}
- {{#if choix.system.caseTMRspeciale}} {{choix.system.caseTMRspeciale}}
{{else}}{{choix.system.caseTMR}}{{/if}} / R{{choix.system.difficulte}} r {{choix.system.ptreve}} ({{choix.system.draconic}})
</option>
{{/each}}
{{/select}}
</select>
</div>
<div class="grid grid-2col">
<div class="flex-group-left">
<div class="flexrow">
<label for="tmr">TMR - {{tmr.coord}}:</label><label name="tmr">{{tmr.label}}</label>
</div>
<div class="flexrow">
<label for="carac">Rêve:</label><label name="carac">{{selectedCarac.value}}</label>
</div>
<div class="flexrow">
<label for="ptreve-variable">Points de Rêve: </label>
<select name="ptreve-variable" class="div-sort-ptreve-var" data-dtype="number">
{{#select ptreve-variable}}
{{#each coutreve as |cout key|}}
<option value={{cout}}>{{cout}}</option>
{{/each}}
{{/select}}
</select>
<label class="div-sort-ptreve-fixe">{{selectedSort.system.ptreve}}</select>
</div>
<div class="flexrow div-sort-non-rituel">
<label>Mettre en réserve</label>
<input class="checkbox-by-name" type="checkbox" name="mettreEnReserve" {{#if mettreEnReserve}}checked{{/if}} />
</div>
</div>
<div class="flex-group-left">
<div class="flexrow">
<label for="competence">Draconic:</label>
<select name="competence" class="roll-draconic" data-dtype="String">
{{#select draconic}}
{{#each draconicList as |draconic key|}}
<option value={{key}}>{{draconic.name}} : {{numberFormat draconic.system.niveau decimals=0 sign=true}}
</option>
{{/each}}
{{/select}}
</select>
</div>
<div class="flexrow">
<label for="diffLibre">Difficulté</label>
<select name="diffLibre" class="div-sort-difficulte-var" data-dtype="number">
{{#select diffLibre}}
{{#each difficultesLibres as |key|}}
<option value={{key}}>{{numberFormat key decimals=0 sign=true}}</option>
{{/each}}
{{/select}}
</select>
<label class="div-sort-difficulte-fixe">{{numberFormat selectedSort.system.difficulte decimals=0 sign=true}}</label>
</div>
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-diffCondition.html"}}
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-forcer.html"}}
<div class="flexrow">
<label for="bonus-case">Bonus de case </label>
<label name="bonus-case" class="bonus-case">0%</label>
</div>
<div class="placeholder-ajustements" class="flexrow"></div>
</div>
</div>
<div class="placeholder-description-sort">
</div>
<div class="placeholder-resolution"></div>
</form>