use jQuery path for _showControlWhen

This commit is contained in:
2020-12-20 02:05:47 +01:00
parent 1bcfba1f68
commit a93b34d2ce
4 changed files with 8 additions and 8 deletions

View File

@ -118,15 +118,15 @@ export class RdDRoll extends Dialog {
dmgText = '(' + dmgText + ')';
}
HtmlUtility._showControlWhen(".diffMoral", rollData.selectedCarac == actor.data.data.carac.volonte);
HtmlUtility._showControlWhen(".etat-general", !dialog._isIgnoreEtatGeneral(rollData));
HtmlUtility._showControlWhen($(".diffMoral"), rollData.selectedCarac == actor.data.data.carac.volonte);
HtmlUtility._showControlWhen($(".etat-general"), !dialog._isIgnoreEtatGeneral(rollData));
// Sort management
if (rollData.selectedSort) {
rollData.bonus = RdDItemSort.getCaseBonus(rollData.selectedSort, rollData.coord),
//console.log("Toggle show/hide", rollData.selectedSort);
HtmlUtility._showControlWhen("#div-sort-difficulte", RdDItemSort.isDifficulteVariable(rollData.selectedSort))
HtmlUtility._showControlWhen("#div-sort-ptreve", RdDItemSort.isCoutVariable(rollData.selectedSort))
HtmlUtility._showControlWhen($("#div-sort-difficulte"), RdDItemSort.isDifficulteVariable(rollData.selectedSort))
HtmlUtility._showControlWhen($("#div-sort-ptreve"), RdDItemSort.isCoutVariable(rollData.selectedSort))
}
// Mise à jour valeurs