forked from public/foundryvtt-reve-de-dragon
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)
This commit is contained in:
@ -1,2 +1,2 @@
|
||||
<h3>Astrologie</h3>
|
||||
<span class="astrologie-label"><a id="jet-astrologie">Astrologie : Nombres Astraux</a></span>
|
||||
<span class="astrologie-label"><a name="jet-astrologie">Astrologie : Nombres Astraux</a></span>
|
||||
|
@ -14,7 +14,7 @@
|
||||
{{/select}}
|
||||
</select>
|
||||
<label> Jours</label>
|
||||
<select name="joursAstrologie" id="joursAstrologie" data-dtype="Number">
|
||||
<select name="joursAstrologie" data-dtype="Number">
|
||||
{{#select joursSuivants}}
|
||||
{{#each dates as |date key|}}
|
||||
<option value={{date.index}}>{{date.label}}</option>
|
||||
@ -22,7 +22,7 @@
|
||||
{{/select}}
|
||||
</select>
|
||||
<label>Etat Général: {{etat}}</label>
|
||||
<label> <a id='jet-astrologie'>Faire un jet d'Astrologie</a></label>
|
||||
<label> <a name="jet-astrologie">Faire un jet d'Astrologie</a></label>
|
||||
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
|
@ -1,8 +1,7 @@
|
||||
<form class="encaisse-roll-dialog">
|
||||
<h2 class="encaisserdialog" id="encaisserTitle"></h2>
|
||||
<div class="flexrow">
|
||||
<label>Modificateurs aux Dommages:</label>
|
||||
<select class="competence-value flex-shrink" name="modificateurDegats" id="modificateurDegats" data-dtype="number">
|
||||
<select class="competence-value flex-shrink" name="modificateurDegats" data-dtype="number">
|
||||
{{#select modificateurDegats}}
|
||||
{{#each ajustementsEncaissement as |key|}}
|
||||
<option value={{key}}>{{numberFormat key decimals=0 sign=true}}</option>
|
||||
@ -11,11 +10,14 @@
|
||||
</select>
|
||||
</div>
|
||||
<div class="flexcol">
|
||||
<label >Cas particuliers:</label>
|
||||
<select name="encaisserSpecial" id="encaisserSpecial" data-dtype="String">
|
||||
<label>Cas particuliers:</label>
|
||||
<select name="encaisserSpecial" data-dtype="String">
|
||||
<option value="aucun">Aucun</option>
|
||||
<option value="noarmure">Ne pas compter les Armures</option>
|
||||
<option value="chute">Chute : Limiter les armures à 2 PA</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="flexcol">
|
||||
<label> </label>
|
||||
</div>
|
||||
</form>
|
||||
|
@ -1,16 +1,18 @@
|
||||
<form class="dialog-roll-sort">
|
||||
<h2 class="flexrow">Lancer le {{#if sort.system.isrituel}}rituel{{else}}sort{{/if}}:
|
||||
<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 |sort key|}}
|
||||
<option value={{key}}>{{this.name}} - {{#if this.system.caseTMRspeciale}} {{this.system.caseTMRspeciale}}
|
||||
{{else}}{{this.system.caseTMR}}{{/if}} / R{{this.system.difficulte}} r {{sort.system.ptreve}} ({{sort.system.draconic}})
|
||||
{{#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>
|
||||
</h2>
|
||||
<img class="chat-icon" src="{{competence.img}}" alt="{{competence.name}}" />
|
||||
</div>
|
||||
<div class="grid grid-2col">
|
||||
<div class="flex-group-left">
|
||||
<div class="flexrow">
|
||||
@ -67,13 +69,8 @@
|
||||
<div class="placeholder-ajustements" class="flexrow"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="description-sort">
|
||||
<hr>
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/partial-description-sort.html" sort=selectedSort}}
|
||||
<div class="placeholder-description-sort">
|
||||
</div>
|
||||
|
||||
<div class="placeholder-resolution"></div>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
</script>
|
@ -33,13 +33,13 @@
|
||||
<div class="form-group">
|
||||
<label for="base">Niveau de base </label>
|
||||
{{#if isGM}}
|
||||
<select name="system.base" id="base" data-dtype="Number">
|
||||
<select name="system.base" data-dtype="Number">
|
||||
{{#select system.base}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/enum-base-competence.html"}}
|
||||
{{/select}}
|
||||
</select>
|
||||
{{else}}
|
||||
<label id="base">{{system.base}}</label>
|
||||
<label name="system.base">{{system.base}}</label>
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
@ -85,14 +85,14 @@
|
||||
<label>Date de l'Enchantement : Jour/Mois (date actuelle : {{dateActuelle}})</label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<select name="splitDate.day" class="enchanteDate" id="jourMois" data-dtype="String">
|
||||
<select name="splitDate.day" class="enchanteDate" data-dtype="String">
|
||||
{{#select splitDate.day}}
|
||||
{{#each jourMoisOptions as |key|}}
|
||||
<option value="{{key}}">{{numberFormat key decimals=0}}</option>
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
</select>
|
||||
<select name="splitDate.month" class="enchanteDate" id="nomMois" data-dtype="String">
|
||||
<select name="splitDate.month" class="enchanteDate" data-dtype="String">
|
||||
{{#select splitDate.month}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/enum-heures.html"}}
|
||||
{{/select}}
|
||||
|
@ -5,6 +5,6 @@
|
||||
{{#if sort.system.duree}}<label><strong>Durée</strong>: {{sort.system.duree}} </label>{{/if}}
|
||||
{{#if sort.system.coutseuil}}<label><strong>Coût de seuil</strong>: {{sort.system.coutseuil}}</label>{{/if}}
|
||||
</div>
|
||||
<div class="details-sort">
|
||||
<div class="description-sort">
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/partial-description-overflow.html" sort.system}}
|
||||
</div>
|
Reference in New Issue
Block a user