From 64b98dd37927eac05ebfc7bb2b0567a0ab00140a Mon Sep 17 00:00:00 2001 From: Byroks Date: Wed, 28 Oct 2026 08:28:41 +0100 Subject: [PATCH] Gunst & Makel sind erstellbar auf Charakterbogen Verhindere das collapsible getriggert wird wenn buttons auf dem item geclickt werden. --- src/sheets/character-sheet.mjs | 14 ++++--- templates/actor/hintergrund.hbs | 70 +++++++++++++++++++++++++++++---- 2 files changed, 70 insertions(+), 14 deletions(-) diff --git a/src/sheets/character-sheet.mjs b/src/sheets/character-sheet.mjs index 77c456c..4da1db8 100644 --- a/src/sheets/character-sheet.mjs +++ b/src/sheets/character-sheet.mjs @@ -123,11 +123,14 @@ export class M6ActorSheet extends api.HandlebarsApplicationMixin(sheets.ActorShe collapsible.forEach((node) => { node.addEventListener( "click", - function () { - node.classList.toggle("active"); - var content = node.nextElementSibling; - content.classList.toggle("active"); - node.getElementsByTagName("i")[0].classList.toggle("fa-compress"); + function (e) { + e = window.event || e; + if (this === e.target) { + node.classList.toggle("active"); + var content = node.nextElementSibling; + content.classList.toggle("active"); + node.getElementsByTagName("i")[0].classList.toggle("fa-compress"); + } }, { capture: true } ); @@ -163,7 +166,6 @@ export class M6ActorSheet extends api.HandlebarsApplicationMixin(sheets.ActorShe flags: this.actor.flags, config: CONFIG }); - console.warn(context); return context; } diff --git a/templates/actor/hintergrund.hbs b/templates/actor/hintergrund.hbs index 25f3213..695100b 100644 --- a/templates/actor/hintergrund.hbs +++ b/templates/actor/hintergrund.hbs @@ -81,6 +81,22 @@
{{#with itemTypes.gunst}} +
+
+ {{#if @root.editable}} + + + {{localize "DOCUMENT.Create" type=this.label}} + + {{/if}} +
+
{{#each this.items as |gunst|}}