class pour sélection par nom de champ

This commit is contained in:
Vincent Vandemeulebrouck
2021-04-09 01:05:32 +02:00
parent 0ae77f6889
commit 1f4523930c
2 changed files with 6 additions and 5 deletions

View File

@ -219,14 +219,15 @@ export class RdDRoll extends Dialog {
this.rollData.dmg.mortalite = event.currentTarget.checked ? "non-mortel" : "mortel";
this.updateRollResult();
});
html.find('#tactique-combat').change((event) => {
this.rollData.tactique = event.currentTarget.value;
this.updateRollResult();
});
html.find('.cuisine-proportions').change((event) => {
this.rollData.proportions = Number(event.currentTarget.value);
this.updateRollResult();
});
html.find('.select-by-name').change((event) => {
const attribute = event.currentTarget.attributes['name'].value;
this.rollData[attribute] = event.currentTarget.value;
this.updateRollResult();
});
html.find('.checkbox-by-name').change((event) => {
const attribute = event.currentTarget.attributes['name'].value;
this.rollData[attribute] = event.currentTarget.checked;