Finish the weapons block styling and make it so that I can use IDs in the sheet without crying
This commit is contained in:
parent
fae962dc7e
commit
99dd7b791a
8 changed files with 242 additions and 104 deletions
|
|
@ -19,7 +19,14 @@ Hooks.on(`hotReload`, async (data) => {
|
|||
};
|
||||
|
||||
// Re-register our new partial template & cache it.
|
||||
const templateName = `dotdungeon.${data.path.split("/").pop().replace(".hbs", "")}`;
|
||||
const alias = data.path
|
||||
.split(`/`)
|
||||
.pop()
|
||||
.split(`.`)
|
||||
.slice(0, -1)
|
||||
.reverse()
|
||||
.join(`.`);
|
||||
const templateName = `dotdungeon.${alias}`;
|
||||
Handlebars.registerPartial(templateName, template);
|
||||
_templateCache[templateName] = template;
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ export class PlayerSheet extends GenericSheet {
|
|||
Toggles the expanded state for the detail elements in the sheet.
|
||||
*/
|
||||
html.find(`summary`).on(`click`, ($e) => {
|
||||
console.debug(`.dungeon | summary[data-collapse-id="${$e.target.dataset.collapseId}"] click event`);
|
||||
console.debug(`.dungeon | summary[data-collapse-id="${$e.target.dataset.collapseId}"] click event (open=${$e.target.parentNode.open})`);
|
||||
/*
|
||||
This seeming inversion of logic is due to the fact that this handler
|
||||
gets called before the element is updated to include/reflect the
|
||||
|
|
@ -61,6 +61,7 @@ export class PlayerSheet extends GenericSheet {
|
|||
};
|
||||
|
||||
ctx.meta = {
|
||||
idp: this.actor.uuid,
|
||||
expanded: this._expanded,
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue