using helpers for selects

This commit is contained in:
Vlyan
2020-12-18 13:55:28 +01:00
parent 1ad9d639f2
commit 97060b5666
22 changed files with 138 additions and 102 deletions

View File

@@ -13,7 +13,7 @@ export class AdvancementSheetL5r5e extends ItemSheetL5r5e {
static get defaultOptions() {
return mergeObject(super.defaultOptions, {
classes: ["l5r5e", "sheet", "advancement"],
template: CONFIG.L5r5e.paths.templates + "item/advancement-sheet.html",
template: CONFIG.l5r5e.paths.templates + "item/advancement-sheet.html",
width: 520,
height: 480,
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "description" }],
@@ -25,6 +25,7 @@ export class AdvancementSheetL5r5e extends ItemSheetL5r5e {
sheetData.data.dtypes = ["String", "Number", "Boolean"];
sheetData.data.subTypesList = AdvancementSheetL5r5e.types;
sheetData.data.skillsList = game.l5r5e.HelpersL5r5e.getSkillsList(true);
return sheetData;
}

View File

@@ -8,7 +8,7 @@ export class ArmorSheetL5r5e extends ItemSheetL5r5e {
static get defaultOptions() {
return mergeObject(super.defaultOptions, {
classes: ["l5r5e", "sheet", "armor"],
template: CONFIG.L5r5e.paths.templates + "item/armor-sheet.html",
template: CONFIG.l5r5e.paths.templates + "item/armor-sheet.html",
width: 520,
height: 480,
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "description" }],

View File

@@ -7,7 +7,7 @@ export class ItemSheetL5r5e extends ItemSheet {
static get defaultOptions() {
return mergeObject(super.defaultOptions, {
classes: ["l5r5e", "sheet", "item"],
template: CONFIG.L5r5e.paths.templates + "item/item-sheet.html",
template: CONFIG.l5r5e.paths.templates + "item/item-sheet.html",
width: 520,
height: 480,
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "description" }],
@@ -18,20 +18,8 @@ export class ItemSheetL5r5e extends ItemSheet {
const sheetData = super.getData();
sheetData.data.dtypes = ["String", "Number", "Boolean"];
sheetData.data.ringsList = CONFIG.L5r5e.stances.map((e) => {
return {
id: e,
label: game.i18n.localize(`l5r5e.rings.${e}`),
};
});
sheetData.data.techniquesList = CONFIG.L5r5e.techniques.map((e) => {
return {
id: e,
label: game.i18n.localize(`l5r5e.techniques.${e}`),
};
});
sheetData.data.ringsList = game.l5r5e.HelpersL5r5e.getRingsList();
sheetData.data.techniquesList = game.l5r5e.HelpersL5r5e.getTechniquesList();
return sheetData;
}

View File

@@ -14,7 +14,7 @@ export class PeculiaritySheetL5r5e extends ItemSheetL5r5e {
static get defaultOptions() {
return mergeObject(super.defaultOptions, {
classes: ["l5r5e", "sheet", "peculiarity"],
template: CONFIG.L5r5e.paths.templates + "item/peculiarity-sheet.html",
template: CONFIG.l5r5e.paths.templates + "item/peculiarity-sheet.html",
width: 520,
height: 480,
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "description" }],

View File

@@ -8,10 +8,11 @@ export class QualitySheetL5r5e extends ItemSheetL5r5e {
static get defaultOptions() {
return mergeObject(super.defaultOptions, {
classes: ["l5r5e", "sheet", "quality"],
template: CONFIG.L5r5e.paths.templates + "item/quality-sheet.html",
template: CONFIG.l5r5e.paths.templates + "item/quality-sheet.html",
width: 520,
height: 480,
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "description" }],
});
}
// TODO certain propriétés en annule d'autres : aiguisé <-> abimé. voir comment faire.
}

View File

@@ -8,7 +8,7 @@ export class TechniqueSheetL5r5e extends ItemSheetL5r5e {
static get defaultOptions() {
return mergeObject(super.defaultOptions, {
classes: ["l5r5e", "sheet", "technique"],
template: CONFIG.L5r5e.paths.templates + "item/technique-sheet.html",
template: CONFIG.l5r5e.paths.templates + "item/technique-sheet.html",
width: 520,
height: 480,
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "description" }],

View File

@@ -9,7 +9,7 @@ export class WeaponSheetL5r5e extends ItemSheetL5r5e {
static get defaultOptions() {
return mergeObject(super.defaultOptions, {
classes: ["l5r5e", "sheet", "weapon"],
template: CONFIG.L5r5e.paths.templates + "item/weapon-sheet.html",
template: CONFIG.l5r5e.paths.templates + "item/weapon-sheet.html",
width: 520,
height: 480,
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "description" }],