Correction sur creation oeuvre
This commit is contained in:
parent
7eada123c8
commit
32c14a8533
@ -220,7 +220,7 @@ export class RdDActorSheet extends ActorSheet {
|
||||
RdDUtility.selectObjetType( this );
|
||||
});
|
||||
html.find('.creer-une-oeuvre').click(async event => {
|
||||
this.selectTypeOeuvre();
|
||||
RdDUtility.selectTypeOeuvre(this);
|
||||
});
|
||||
html.find('#nettoyer-conteneurs').click(async event => {
|
||||
this.actor.nettoyerConteneurs();
|
||||
|
@ -286,6 +286,28 @@ export class RdDUtility {
|
||||
d.render(true);
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async selectTypeOeuvre( actorSheet) {
|
||||
let typeObjets = RdDItem.getTypesOeuvres();
|
||||
let options = `<span class="competence-label">Selectionnez le type d'oeuvre</span><select class="item-type">`;
|
||||
for (let typeName of typeObjets) {
|
||||
options += `<option value="${typeName}">${typeName}</option>`
|
||||
}
|
||||
options += '</select>';
|
||||
let d = new Dialog({
|
||||
title: "Créer un équipement",
|
||||
content: options,
|
||||
buttons: {
|
||||
one: {
|
||||
icon: '<i class="fas fa-check"></i>',
|
||||
label: "Créer l'objet",
|
||||
callback: () => this.creerObjet(actorSheet)
|
||||
}
|
||||
}
|
||||
});
|
||||
d.render(true);
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static buildListOptions(min, max) {
|
||||
let options = ""
|
||||
|
Loading…
Reference in New Issue
Block a user