Fixes mineurs #583
@ -151,7 +151,7 @@ export class EnvironmentSheetHelper {
|
|||||||
|
|
||||||
static activateListeners(sheet, html) {
|
static activateListeners(sheet, html) {
|
||||||
if (!sheet.options.editable) return;
|
if (!sheet.options.editable) return;
|
||||||
html.find("a.milieu-add").click(event => EnvironmentSheetHelper.onAddMilieu(sheet, event));
|
html.find("a.milieu-add").click(event => EnvironmentSheetHelper.onAddMilieu(html, sheet, event));
|
||||||
html.find("div.environnement-milieu a.milieu-delete").click(event => EnvironmentSheetHelper.onDeleteMilieu(sheet, event));
|
html.find("div.environnement-milieu a.milieu-delete").click(event => EnvironmentSheetHelper.onDeleteMilieu(sheet, event));
|
||||||
html.find("div.environnement-milieu select.environnement-rarete").change(event => EnvironmentSheetHelper.onChange(sheet, event,
|
html.find("div.environnement-milieu select.environnement-rarete").change(event => EnvironmentSheetHelper.onChange(sheet, event,
|
||||||
(updated) => {
|
(updated) => {
|
||||||
@ -168,8 +168,8 @@ export class EnvironmentSheetHelper {
|
|||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
static async onAddMilieu(sheet, event) {
|
static async onAddMilieu(html, sheet, event) {
|
||||||
const milieu = $("input.input-selection-milieu").val();
|
const milieu = html.find('input.input-selection-milieu').val();
|
||||||
if (!milieu) {
|
if (!milieu) {
|
||||||
ui.notifications.warn(`Choisissez le milieu dans lequel se trouve le/la ${sheet.item.name}`);
|
ui.notifications.warn(`Choisissez le milieu dans lequel se trouve le/la ${sheet.item.name}`);
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user