From bcd25dd0ed82e10373dce5eba384088609bc4e43 Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Sun, 13 Nov 2022 21:57:18 +0100 Subject: [PATCH] Affichage de dialog en 2 temps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sinon, la touche entrée est appliqué sur une commande et ferme le dialogue --- module/dialog-chronologie.js | 3 ++- module/dialog-repos.js | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/module/dialog-chronologie.js b/module/dialog-chronologie.js index 0e84e358..d7ec467e 100644 --- a/module/dialog-chronologie.js +++ b/module/dialog-chronologie.js @@ -27,7 +27,8 @@ export class DialogChronologie extends Dialog { dateReel: DialogChronologie.getCurrentDateTime() }; const html = await renderTemplate("systems/foundryvtt-reve-de-dragon/templates/dialog-chronologie.html", dialogData); - new DialogChronologie(html).render(true); + const dialog = new DialogChronologie(html); + dialog.render(true); } constructor(html) { diff --git a/module/dialog-repos.js b/module/dialog-repos.js index f3030899..324b6d91 100644 --- a/module/dialog-repos.js +++ b/module/dialog-repos.js @@ -3,9 +3,9 @@ import { Misc } from "./misc.js"; export class DialogRepos extends Dialog { static async create(actor) { - let actorData = actor - const html = await renderTemplate("systems/foundryvtt-reve-de-dragon/templates/dialog-repos.html", actorData); - new DialogRepos(html, actor).render(true); + const html = await renderTemplate("systems/foundryvtt-reve-de-dragon/templates/dialog-repos.html", actor); + const dialog = new DialogRepos(html, actor); + dialog.render(true); } constructor(html, actor) {