Utilisation de la dateReel du calendrier
This commit is contained in:
parent
2dbe0dea4a
commit
8f7efdad87
@ -25,23 +25,13 @@ export class DialogChronologie extends Dialog {
|
|||||||
journalId: game.settings.get(SYSTEM_RDD, LATEST_USED_JOURNAL_ID),
|
journalId: game.settings.get(SYSTEM_RDD, LATEST_USED_JOURNAL_ID),
|
||||||
journaux: game.journal.filter(it => it.testUserPermission(game.user, CONST.DOCUMENT_OWNERSHIP_LEVELS.OWNER)),
|
journaux: game.journal.filter(it => it.testUserPermission(game.user, CONST.DOCUMENT_OWNERSHIP_LEVELS.OWNER)),
|
||||||
timestamp: game.system.rdd.calendrier.timestamp,
|
timestamp: game.system.rdd.calendrier.timestamp,
|
||||||
dateReel: DialogChronologie.getCurrentDateTime()
|
dateReel: game.system.rdd.calendrier.dateReel()
|
||||||
};
|
};
|
||||||
const html = await renderTemplate("systems/foundryvtt-reve-de-dragon/templates/dialog-chronologie.html", dialogData);
|
const html = await renderTemplate("systems/foundryvtt-reve-de-dragon/templates/dialog-chronologie.html", dialogData);
|
||||||
const dialog = new DialogChronologie(html, dialogData);
|
const dialog = new DialogChronologie(html, dialogData);
|
||||||
dialog.render(true);
|
dialog.render(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
static getCurrentDateTime() {
|
|
||||||
return new Date().toLocaleString("sv-SE", {
|
|
||||||
year: "numeric",
|
|
||||||
month: "2-digit",
|
|
||||||
day: "2-digit",
|
|
||||||
hour: "2-digit",
|
|
||||||
minute: "2-digit"
|
|
||||||
}).replace(" ", "T");
|
|
||||||
}
|
|
||||||
|
|
||||||
constructor(html, dialogData) {
|
constructor(html, dialogData) {
|
||||||
const options = {
|
const options = {
|
||||||
classes: ["DialogChronologie"],
|
classes: ["DialogChronologie"],
|
||||||
@ -124,7 +114,7 @@ export class DialogChronologie extends Dialog {
|
|||||||
heure: RdDTimestamp.definition(this.html.find("form.rdddialogchrono :input[name='chronologie.heure']").val()),
|
heure: RdDTimestamp.definition(this.html.find("form.rdddialogchrono :input[name='chronologie.heure']").val()),
|
||||||
minute: this.html.find("form.rdddialogchrono :input[name='chronologie.minute']").val(),
|
minute: this.html.find("form.rdddialogchrono :input[name='chronologie.minute']").val(),
|
||||||
},
|
},
|
||||||
dateReel: this.html.find("form.rdddialogchrono :input[name='dateReel']").val().replace('T', ' ')
|
dateReel: this.html.find("form.rdddialogchrono :input[name='dateReel']").val()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user