Cleanup roll windows

- permettre plusieurs fenêtres de jets en même temps en éliminant les
  id dans le html et les jquery sur id pour éviter les interactions
- génération de la table par handlebars
This commit is contained in:
Vincent Vandemeulebrouck
2022-12-06 01:30:12 +01:00
parent f027e3318b
commit 2122a54db7
43 changed files with 319 additions and 343 deletions

View File

@ -20,7 +20,7 @@ export class RdDAstrologieJoueur extends Dialog {
astrologie: RdDItemCompetence.findCompetence(actor.items, 'Astrologie')
}
const html = await renderTemplate('systems/foundryvtt-reve-de-dragon/templates/dialog-astrologie-joueur.html', dialogData);
let options = { classes: ["rdddialog"], width: 600, height: 500, 'z-index': 99999 };
let options = { classes: ["rdd-roll-dialog"], width: 600, height: 500, 'z-index': 99999 };
if (dialogConfig.options) {
mergeObject(options, dialogConfig.options, { overwrite: true });
}
@ -37,7 +37,7 @@ export class RdDAstrologieJoueur extends Dialog {
// Get all n
// Common conf
let dialogConf = { content: html, title: "Nombres Astraux", buttons: myButtons, default: "saveButton" };
let dialogOptions = { classes: ["rdddialog"], width: 600, height: 300, 'z-index': 99999 };
let dialogOptions = { classes: ["rdd-roll-dialog"], width: 600, height: 300, 'z-index': 99999 };
super(dialogConf, dialogOptions);
this.actor = actor;
@ -68,7 +68,7 @@ export class RdDAstrologieJoueur extends Dialog {
carac_vue: this.actor.system.carac['vue'].value,
etat: this.dataNombreAstral.etat,
astrologie: this.dataNombreAstral.astrologie,
conditions: $("#diffConditions").val(),
conditions: $("[name='diffConditions']").val(),
date: $("#joursAstrologie").val(),
userId: game.user.id
}
@ -92,7 +92,7 @@ export class RdDAstrologieJoueur extends Dialog {
super.activateListeners(html);
$(function () {
$("#diffConditions").val(0);
$("[name='diffConditions']").val(0);
});
html.find('#jet-astrologie').click((event) => {