Correction: rename bringToTop

This commit is contained in:
2025-10-15 22:39:07 +02:00
parent 68c01fc930
commit 2cf5b06da8
4 changed files with 17 additions and 13 deletions

View File

@@ -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);

View File

@@ -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));

View File

@@ -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);

View File

@@ -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) {