From 2cf5b06da831cf418aec7a21e93fc63ef1f34e34 Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Wed, 15 Oct 2025 22:39:07 +0200 Subject: [PATCH] Correction: rename bringToTop --- module/rdd-roll-ethylisme.js | 2 +- module/rdd-roll-resolution-table.js | 4 ++-- module/rdd-roll.js | 2 +- module/rdd-tmr-dialog.js | 22 +++++++++++++--------- 4 files changed, 17 insertions(+), 13 deletions(-) diff --git a/module/rdd-roll-ethylisme.js b/module/rdd-roll-ethylisme.js index 440d7a08..67a56c28 100644 --- a/module/rdd-roll-ethylisme.js +++ b/module/rdd-roll-ethylisme.js @@ -25,7 +25,7 @@ export class RdDRollDialogEthylisme extends Dialog { activateListeners(html) { super.activateListeners(html); this.html = html; - this.bringToTop(); + this.bringToFront(); this.html.find(".force-alcool").change((event) => { this.rollData.forceAlcool = Misc.toInt(event.currentTarget.value); diff --git a/module/rdd-roll-resolution-table.js b/module/rdd-roll-resolution-table.js index 337a9568..2334614f 100644 --- a/module/rdd-roll-resolution-table.js +++ b/module/rdd-roll-resolution-table.js @@ -22,7 +22,7 @@ export class RdDRollResolutionTable extends Dialog { RdDRollResolutionTable.resolutionTable.render(true); } else{ - RdDRollResolutionTable.resolutionTable.bringToTop(); + RdDRollResolutionTable.resolutionTable.bringToFront(); } } @@ -70,7 +70,7 @@ export class RdDRollResolutionTable extends Dialog { activateListeners(html) { super.activateListeners(html); this.html = html; - this.bringToTop(); + this.bringToFront(); this.html.find("[name='diffLibre']").val(Misc.toInt(this.rollData.diffLibre)); diff --git a/module/rdd-roll.js b/module/rdd-roll.js index 65c08de6..3c369ecd 100644 --- a/module/rdd-roll.js +++ b/module/rdd-roll.js @@ -128,7 +128,7 @@ export class RdDRoll extends Dialog { activateListeners(html) { super.activateListeners(html); this.html = html; - this.bringToTop(); + this.bringToFront(); console.log('RdDRoll.activateListeners', this.rollData); diff --git a/module/rdd-tmr-dialog.js b/module/rdd-tmr-dialog.js index aa4d1182..1303882a 100644 --- a/module/rdd-tmr-dialog.js +++ b/module/rdd-tmr-dialog.js @@ -125,7 +125,11 @@ export class RdDTMRDialog extends Dialog { HtmlUtility.showControlWhen(this.html.find(".appliquerFatigue"), ReglesOptionnelles.isUsing("appliquer-fatigue")); HtmlUtility.showControlWhen(this.html.find(".lire-signe-draconique"), this.actor.isResonanceSigneDraconique(this._getCoordActor())); - this.html.find('form.tmr-dialog *').click(event => this.subdialog?.bringToTop()); + this.html.find('form.tmr-dialog *').click(event => { + if (this.subdialog?.rendered){ + this.subdialog?.bringToFront() + } + }) // Roll Sort this.html.find('.lancer-sort').click(event => this.lancerUnSort()); @@ -169,26 +173,26 @@ export class RdDTMRDialog extends Dialog { async forceTMRDisplay() { if (this.rendered) { - this.bringToTop() - this.bringSubDialogToTop(); + this.bringToFront() + this.bringSubDialogToFront(); } } - bringSubDialogToTop() { - if (this.subdialog?.bringToTop && this.subdialog?.element && this.subdialog?.element[0]) { - this.subdialog.bringToTop(); + bringSubDialogToFront() { + if (this.subdialog?.bringToFront && this.subdialog?.element && this.subdialog?.element[0]) { + this.subdialog.bringToFront(); } } async restoreTMRAfterAction() { this.subdialog = undefined await this.maximize() - this.bringToTop() + this.bringToFront() } forceTMRContinueAction() { ui.notifications.warn('Vous devez finir votre action avant de continuer dans les TMR'); - this.bringSubDialogToTop(); + this.bringSubDialogToFront(); return false } @@ -642,7 +646,7 @@ export class RdDTMRDialog extends Dialog { ? TMRUtility.getTMRType(tmr.coord) + " ??" : tmr.label + " (" + tmr.coord + ")"); - this.setTMRPendingAction({ bringToTop: () => { } }) + this.setTMRPendingAction({ bringToFront: () => { } }) const myRoll = await RdDDice.rollTotal("1dt", { showDice: SHOW_DICE }); this.restoreTMRAfterAction() if (myRoll == 7) {