Merkmale und Eigenschaften im Chat
This commit is contained in:
1 parent
bbb92445c6
commit
00473d3afc
11 files changed
+158
-62
No files matched your search
@@ -3,6 +3,7 @@
|
|||||||
"name": "Name",
|
"name": "Name",
|
||||||
"Angriff": "Angriff",
|
"Angriff": "Angriff",
|
||||||
"Schaden": "Schaden",
|
"Schaden": "Schaden",
|
||||||
|
"Zaubern": "Zaubern",
|
||||||
"Fertigkeit": "Fertigkeit",
|
"Fertigkeit": "Fertigkeit",
|
||||||
"Stufe": "Stufe",
|
"Stufe": "Stufe",
|
||||||
"Schicksalsmünzen": "Schicksalsmünzen",
|
"Schicksalsmünzen": "Schicksalsmünzen",
|
||||||
@@ -160,6 +161,16 @@
|
|||||||
},
|
},
|
||||||
"RollList": {
|
"RollList": {
|
||||||
"RollMode": "Wurf-Modus"
|
"RollMode": "Wurf-Modus"
|
||||||
|
},
|
||||||
|
"Settings": {
|
||||||
|
"zauberAlsTag": {
|
||||||
|
"name": "Zaubereigenschaften als TAG",
|
||||||
|
"hint": "Stelle Zaubereigenschaften als TAG Liste im Chat da."
|
||||||
|
},
|
||||||
|
"beschreibungChatActive": {
|
||||||
|
"name": "Chat-Beschreibungen automatisch ausklappen",
|
||||||
|
"hint": "Legt fest, ob Beschreibungen von Zaubern und Co. im Chat eingeklappt angezeigt werden oder vollständig."
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"TYPES": {
|
"TYPES": {
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
export const loadPartials = async function () {
|
export const loadPartials = async function () {
|
||||||
await foundry.applications.handlebars.loadTemplates([
|
await foundry.applications.handlebars.loadTemplates([
|
||||||
"systems/midgard6-lvd/src/templates/chat/chat-message-header.hbs"
|
"systems/midgard6-lvd/src/templates/chat/chat-message-header.hbs",
|
||||||
|
"systems/midgard6-lvd/src/templates/chat/secret-roll.hbs"
|
||||||
]);
|
]);
|
||||||
};
|
};
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
export const loadSettings = async function () {
|
||||||
|
game.settings.register("midgard6-lvd", "zauberAlsTag", {
|
||||||
|
name: game.i18n.localize("Midgard6.Settings.zauberAlsTag.name"),
|
||||||
|
hint: game.i18n.localize("Midgard6.Settings.zauberAlsTag.hint"),
|
||||||
|
scope: "user",
|
||||||
|
config: true,
|
||||||
|
default: false,
|
||||||
|
type: Boolean,
|
||||||
|
requiresReload: true
|
||||||
|
});
|
||||||
|
|
||||||
|
// Automatically collapse chat message descriptions
|
||||||
|
game.settings.register("midgard6-lvd", "beschreibungChatActive", {
|
||||||
|
name: game.i18n.localize("Midgard6.Settings.beschreibungChatActive.name"),
|
||||||
|
hint: game.i18n.localize("Midgard6.Settings.beschreibungChatActive.hint"),
|
||||||
|
scope: "client",
|
||||||
|
config: true,
|
||||||
|
default: false,
|
||||||
|
type: Boolean
|
||||||
|
});
|
||||||
|
};
|
||||||
@@ -32,7 +32,7 @@ export async function rollSpell(event, target) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let rollTerm = "@die + @skill";
|
let rollTerm = "@die + @skill";
|
||||||
let rollFlavor = dataset.name;
|
let rollFlavor = game.i18n.localize("Midgard6.Zaubern") + ": " + item.name;
|
||||||
let roll;
|
let roll;
|
||||||
|
|
||||||
if (dialogResult.spezLevel) {
|
if (dialogResult.spezLevel) {
|
||||||
@@ -41,7 +41,7 @@ export async function rollSpell(event, target) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (dialogResult.customRoll) {
|
if (dialogResult.customRoll) {
|
||||||
roll = new Roll(dialogResult.customRoll);
|
roll = new Roll(dialogResult.customRoll, {}, { title: rollFlavor });
|
||||||
} else {
|
} else {
|
||||||
roll = new Roll(
|
roll = new Roll(
|
||||||
rollTerm,
|
rollTerm,
|
||||||
@@ -54,19 +54,31 @@ export async function rollSpell(event, target) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (item.system.eigenschaften.schaden) {
|
||||||
|
const attackRoll = await roll.evaluate();
|
||||||
|
roll = [
|
||||||
|
attackRoll,
|
||||||
|
await new Roll(
|
||||||
|
"@die",
|
||||||
|
{ die: item.system.eigenschaften.schaden },
|
||||||
|
{ title: game.i18n.localize("Midgard6.Schaden") }
|
||||||
|
).evaluate()
|
||||||
|
];
|
||||||
|
} else {
|
||||||
|
// Execute the roll
|
||||||
|
await roll.evaluate();
|
||||||
|
}
|
||||||
|
|
||||||
// The parsed terms of the roll formula
|
// The parsed terms of the roll formula
|
||||||
console.log("Roll:", roll); // [Die, OperatorTerm, NumericTerm, OperatorTerm, NumericTerm]
|
console.log("Roll:", roll); // [Die, OperatorTerm, NumericTerm, OperatorTerm, NumericTerm]
|
||||||
|
|
||||||
// Execute the roll
|
|
||||||
await roll.evaluate();
|
|
||||||
|
|
||||||
const chatData = {
|
const chatData = {
|
||||||
rolls: roll,
|
rolls: roll,
|
||||||
speaker: ChatMessage.getSpeaker(),
|
speaker: ChatMessage.getSpeaker(),
|
||||||
flags: {
|
flags: {
|
||||||
"midgard6-lvd": {
|
"midgard6-lvd": {
|
||||||
title: rollFlavor,
|
title: rollFlavor,
|
||||||
eigenschaften: item.eigenschaften,
|
eigenschaften: item.system.eigenschaften,
|
||||||
isSpell: true,
|
isSpell: true,
|
||||||
beschreibung: await foundry.applications.ux.TextEditor.implementation.enrichHTML(
|
beschreibung: await foundry.applications.ux.TextEditor.implementation.enrichHTML(
|
||||||
item.system.beschreibung,
|
item.system.beschreibung,
|
||||||
@@ -102,7 +114,7 @@ export async function rollSkill(event, target) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Construct the Roll instance
|
// Construct the Roll instance
|
||||||
const skillValue = skill.value;
|
const skillValue = skill.value || skill;
|
||||||
let die = "";
|
let die = "";
|
||||||
switch (dialogResult.vorteil) {
|
switch (dialogResult.vorteil) {
|
||||||
case -1:
|
case -1:
|
||||||
@@ -126,7 +138,7 @@ export async function rollSkill(event, target) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (dialogResult.customRoll) {
|
if (dialogResult.customRoll) {
|
||||||
roll = new Roll(dialogResult.customRoll);
|
roll = new Roll(dialogResult.customRoll, {}, { title: rollFlavor });
|
||||||
} else {
|
} else {
|
||||||
roll = new Roll(
|
roll = new Roll(
|
||||||
rollTerm,
|
rollTerm,
|
||||||
@@ -154,7 +166,6 @@ export async function rollSkill(event, target) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
console.warn(dialogResult);
|
|
||||||
|
|
||||||
// Nutze applyRollMode, um Sichtbarkeiten (Whisper, Blind) korrekt zu setzen
|
// Nutze applyRollMode, um Sichtbarkeiten (Whisper, Blind) korrekt zu setzen
|
||||||
ChatMessage.applyMode(chatData, dialogResult.rollMode);
|
ChatMessage.applyMode(chatData, dialogResult.rollMode);
|
||||||
@@ -206,7 +217,7 @@ export async function rollWeapon(event, target) {
|
|||||||
rollFlavor += ": " + weapon.name;
|
rollFlavor += ": " + weapon.name;
|
||||||
|
|
||||||
if (dialogResult.customRoll) {
|
if (dialogResult.customRoll) {
|
||||||
attackRoll = await new Roll(dialogResult.customRoll).evaluate();
|
attackRoll = await new Roll(dialogResult.customRoll, {}, { title: rollFlavor }).evaluate();
|
||||||
} else {
|
} else {
|
||||||
attackRoll = await new Roll(
|
attackRoll = await new Roll(
|
||||||
rollTerm,
|
rollTerm,
|
||||||
@@ -215,7 +226,9 @@ export async function rollWeapon(event, target) {
|
|||||||
skill: skillValue,
|
skill: skillValue,
|
||||||
spezBonus: dialogResult.spezLevel + 1
|
spezBonus: dialogResult.spezLevel + 1
|
||||||
},
|
},
|
||||||
{ title: rollFlavor }
|
{
|
||||||
|
title: rollFlavor
|
||||||
|
}
|
||||||
).evaluate();
|
).evaluate();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -226,7 +239,6 @@ export async function rollWeapon(event, target) {
|
|||||||
).evaluate();
|
).evaluate();
|
||||||
|
|
||||||
// The parsed terms of the roll formula
|
// The parsed terms of the roll formula
|
||||||
console.warn(dialogResult);
|
|
||||||
const chatData = {
|
const chatData = {
|
||||||
rolls: [attackRoll, damageRoll],
|
rolls: [attackRoll, damageRoll],
|
||||||
speaker: ChatMessage.getSpeaker(),
|
speaker: ChatMessage.getSpeaker(),
|
||||||
@@ -234,6 +246,7 @@ export async function rollWeapon(event, target) {
|
|||||||
"midgard6-lvd": {
|
"midgard6-lvd": {
|
||||||
title: rollFlavor,
|
title: rollFlavor,
|
||||||
eigenschaften: weapon.eigenschaften,
|
eigenschaften: weapon.eigenschaften,
|
||||||
|
merkmale: weapon.system.merkmale,
|
||||||
beschreibung: await foundry.applications.ux.TextEditor.implementation.enrichHTML(
|
beschreibung: await foundry.applications.ux.TextEditor.implementation.enrichHTML(
|
||||||
weapon.system.beschreibung,
|
weapon.system.beschreibung,
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -88,9 +88,8 @@ export class M6ItemSheet extends api.HandlebarsApplicationMixin(sheets.ItemSheet
|
|||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
const currentInput = event.currentTarget;
|
const currentInput = event.currentTarget;
|
||||||
const value = currentInput.value;
|
const value = currentInput.value;
|
||||||
|
|
||||||
console.log("Feld verlassen! Aktueller Wert:", value);
|
console.log("Feld verlassen! Aktueller Wert:", value);
|
||||||
this.item.update({ [`${currentInput.id}`]: value.split(/[\s,]+/) });
|
this.item.update({ [`${currentInput.name}`]: value.split(/[\s,]+/) });
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------------- */
|
/* -------------------------------------------------- */
|
||||||
|
|||||||
@@ -57,5 +57,36 @@
|
|||||||
margin: 8px 4px;
|
margin: 8px 4px;
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
|
.hidden {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.tags {
|
||||||
|
align-items: center;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 0.125rem;
|
||||||
|
list-style-type: none;
|
||||||
|
padding-left: 0;
|
||||||
|
margin-bottom: 0.125rem;
|
||||||
|
.hidden {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.tag {
|
||||||
|
background-color: var(--M6-background-brown);
|
||||||
|
color: black;
|
||||||
|
font-family: var(--sans-serif);
|
||||||
|
font-size: var(--font-size-10);
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: 0.05em;
|
||||||
|
text-rendering: optimizeLegibility;
|
||||||
|
align-items: center;
|
||||||
|
border-radius: 2px;
|
||||||
|
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.5);
|
||||||
|
display: inline-flex;
|
||||||
|
font-weight: 500;
|
||||||
|
padding: 0.3em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
import { systemPath } from "./constants.mjs";
|
import { systemPath } from "./constants.mjs";
|
||||||
import { loadHelpers } from "./helpers/handlebar-helpers.mjs";
|
import { loadHelpers } from "./helpers/handlebar-helpers.mjs";
|
||||||
import { loadPartials } from "./helpers/partials.mjs";
|
import { loadPartials } from "./helpers/partials.mjs";
|
||||||
|
import { loadSettings } from "./helpers/settings.mjs";
|
||||||
|
|
||||||
import { CharacterData } from "./data/character-data.mjs";
|
import { CharacterData } from "./data/character-data.mjs";
|
||||||
import { WeaponData } from "./data/weapon-data.mjs";
|
import { WeaponData } from "./data/weapon-data.mjs";
|
||||||
@@ -92,6 +93,8 @@ Hooks.once("init", () => {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
loadSettings();
|
||||||
|
|
||||||
loadHelpers();
|
loadHelpers();
|
||||||
|
|
||||||
loadPartials();
|
loadPartials();
|
||||||
|
|||||||
@@ -6,6 +6,9 @@
|
|||||||
<span class="message-sender">
|
<span class="message-sender">
|
||||||
{{alias}}
|
{{alias}}
|
||||||
</span>
|
</span>
|
||||||
|
<span class="whisper-to">
|
||||||
|
{{author.name}}
|
||||||
|
</span>
|
||||||
{{#if isWhisper}}
|
{{#if isWhisper}}
|
||||||
<span class="whisper-to">{{localize "CHAT.To"}}: {{whisperTo}}</span>
|
<span class="whisper-to">{{localize "CHAT.To"}}: {{whisperTo}}</span>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|||||||
@@ -3,11 +3,42 @@
|
|||||||
|
|
||||||
{{!-- <hr> --}}
|
{{!-- <hr> --}}
|
||||||
{{#if isContentVisible}}
|
{{#if isContentVisible}}
|
||||||
|
|
||||||
|
{{#if isSpell}}
|
||||||
|
<div class="tags {{#unless zeigeZauberAlsTag}}hidden{{/unless}}">
|
||||||
|
{{#each eigenschaften as |eigenschaft|}}
|
||||||
|
<div class="tag">{{eigenschaft}}</div>
|
||||||
|
{{/each}}
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="collapsible {{#if zeigeZauberAlsTag}}hidden{{/if}}"
|
||||||
|
data-action="collapsible"
|
||||||
|
>{{localize "Midgard6.Item.merkmale"}}
|
||||||
|
<div>
|
||||||
|
<i class="fas fa-expand"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="content">
|
||||||
|
{{#each eigenschaften as |eigenschaft|}}
|
||||||
|
{{#if eigenschaft}}
|
||||||
|
<p>{{localizeConcat "Midgard6.Zauber." @key}}: {{eigenschaft}}</p>
|
||||||
|
{{/if}}
|
||||||
|
{{/each}}
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
{{#if merkmale}}
|
||||||
|
<div class="tags">
|
||||||
|
{{#each merkmale as |merkmal|}}
|
||||||
|
<div class="tag">{{merkmal}}</div>
|
||||||
|
{{/each}}
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
{{#if isRoll}}
|
{{#if isRoll}}
|
||||||
{{#each message.content as |roll|}}
|
{{#each message.content as |roll|}}
|
||||||
<fieldset>
|
<fieldset>
|
||||||
{{#if roll.options.title}}<legend>{{roll.options.title}}</legend>{{/if}}
|
{{#if roll.options.title}}<legend>{{roll.options.title}}</legend>{{/if}}
|
||||||
{{{roll.html}}}
|
{{{roll.html}}}
|
||||||
|
|
||||||
</fieldset>
|
</fieldset>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
{{else}}
|
{{else}}
|
||||||
@@ -19,7 +50,7 @@
|
|||||||
|
|
||||||
{{#if beschreibung}}
|
{{#if beschreibung}}
|
||||||
<div
|
<div
|
||||||
class="collapsible"
|
class="collapsible beschreibung"
|
||||||
data-action="collapsible"
|
data-action="collapsible"
|
||||||
>{{localize "Midgard6.Item.Description"}}
|
>{{localize "Midgard6.Item.Description"}}
|
||||||
<div>
|
<div>
|
||||||
@@ -31,18 +62,6 @@
|
|||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{else}}
|
{{else}}
|
||||||
<fieldset>
|
{{> "systems/midgard6-lvd/src/templates/chat/secret-roll.hbs"}}
|
||||||
{{#if isRoll}}
|
|
||||||
<legend>???</legend>
|
|
||||||
<div class="dice-roll">
|
|
||||||
<div class="dice-result">
|
|
||||||
<div class="dice-formula">???</div>
|
|
||||||
<h4 class="dice-total">?</h4>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{{else}}
|
|
||||||
<p>???</p>
|
|
||||||
{{/if}}
|
|
||||||
</fieldset>
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</li>
|
</li>
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
<fieldset>
|
||||||
|
{{#if isRoll}}
|
||||||
|
<legend>???</legend>
|
||||||
|
<div class="dice-roll">
|
||||||
|
<div class="dice-result">
|
||||||
|
<div class="dice-formula">???</div>
|
||||||
|
<h4 class="dice-total">?</h4>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{else}}
|
||||||
|
<p>???</p>
|
||||||
|
{{/if}}
|
||||||
|
</fieldset>
|
||||||
+15
-33
@@ -4,31 +4,6 @@ export class M6ChatMessage extends ChatMessage {
|
|||||||
// Default avatar for the chat message
|
// Default avatar for the chat message
|
||||||
static DEFAULT_AVATAR = "icons/svg/mystery-man.svg";
|
static DEFAULT_AVATAR = "icons/svg/mystery-man.svg";
|
||||||
|
|
||||||
_attachPartListeners(partId, html, bubble) {
|
|
||||||
super._attachPartListeners(partId, html, bubble);
|
|
||||||
console.warn("Here");
|
|
||||||
|
|
||||||
switch (partId) {
|
|
||||||
case "hintergrund":
|
|
||||||
const collapsible = html.querySelectorAll("div[data-action=collapsible]");
|
|
||||||
if (collapsible) {
|
|
||||||
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");
|
|
||||||
},
|
|
||||||
{ capture: true }
|
|
||||||
);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Render the HTML for the ChatMessage which should be added to the log
|
* Render the HTML for the ChatMessage which should be added to the log
|
||||||
* @param {object} [options] Additional options passed to the Handlebars template.
|
* @param {object} [options] Additional options passed to the Handlebars template.
|
||||||
@@ -41,7 +16,7 @@ export class M6ChatMessage extends ChatMessage {
|
|||||||
this.template = CONFIG.ChatMessage.template;
|
this.template = CONFIG.ChatMessage.template;
|
||||||
|
|
||||||
// By default, GM users have the trash-bin icon in the chat log itself
|
// By default, GM users have the trash-bin icon in the chat log itself
|
||||||
canDelete ??= game.user.isGM;
|
canDelete ??= game.user.isGM || game.user === this.author;
|
||||||
|
|
||||||
if (typeof this.system.renderHTML === "function") {
|
if (typeof this.system.renderHTML === "function") {
|
||||||
const html = await this.system.renderHTML({ canDelete, canClose, ...rest });
|
const html = await this.system.renderHTML({ canDelete, canClose, ...rest });
|
||||||
@@ -101,7 +76,10 @@ export class M6ChatMessage extends ChatMessage {
|
|||||||
].filterJoin(" "),
|
].filterJoin(" "),
|
||||||
|
|
||||||
// System-specific flags
|
// System-specific flags
|
||||||
|
eigenschaften: this.isContentVisible ? this.getFlag("midgard6-lvd", "eigenschaften") : "",
|
||||||
|
merkmale: this.isContentVisible ? this.getFlag("midgard6-lvd", "merkmale") : "",
|
||||||
beschreibung: this.isContentVisible ? this.getFlag("midgard6-lvd", "beschreibung") : "",
|
beschreibung: this.isContentVisible ? this.getFlag("midgard6-lvd", "beschreibung") : "",
|
||||||
|
zeigeZauberAlsTag: game.settings.get("midgard6-lvd", "zauberAlsTag"),
|
||||||
isSpell: this.getFlag("midgard6-lvd", "isSpell"),
|
isSpell: this.getFlag("midgard6-lvd", "isSpell"),
|
||||||
isRoll: this?.isRoll || false
|
isRoll: this?.isRoll || false
|
||||||
};
|
};
|
||||||
@@ -114,7 +92,6 @@ export class M6ChatMessage extends ChatMessage {
|
|||||||
// if (this.messageData?.message?.content) {
|
// if (this.messageData?.message?.content) {
|
||||||
// this.messageData.description = this.messageData?.message?.content;
|
// this.messageData.description = this.messageData?.message?.content;
|
||||||
// }
|
// }
|
||||||
console.warn(this.messageData);
|
|
||||||
// Render the chat message
|
// Render the chat message
|
||||||
let html = await foundry.applications.handlebars.renderTemplate(
|
let html = await foundry.applications.handlebars.renderTemplate(
|
||||||
this.template,
|
this.template,
|
||||||
@@ -124,12 +101,17 @@ export class M6ChatMessage extends ChatMessage {
|
|||||||
// Flag expanded state of dice rolls
|
// Flag expanded state of dice rolls
|
||||||
Hooks.callAll("renderChatMessageHTML", this, html, this.messageData);
|
Hooks.callAll("renderChatMessageHTML", this, html, this.messageData);
|
||||||
|
|
||||||
// Get whether descriptions should auto-collapse for this user or not and apply the styling
|
// Get whether descriptions should auto-expand for this user or not and apply the styling
|
||||||
// const autoCollapse = game.settings.get("midgard6-lvd", "autoCollapseDescriptions");
|
const autoExpand = game.settings.get("midgard6-lvd", "beschreibungChatActive");
|
||||||
// if (!autoCollapse) {
|
if (autoExpand) {
|
||||||
// const collapsibleContent = html.querySelector(".collapsible-content");
|
const collapsibleContent = html.querySelector(".collapsible.beschreibung");
|
||||||
// if (collapsibleContent) collapsibleContent.style.maxHeight = "unset";
|
if (collapsibleContent) {
|
||||||
// }
|
collapsibleContent.classList.toggle("active");
|
||||||
|
var content = collapsibleContent.nextElementSibling;
|
||||||
|
content.classList.toggle("active");
|
||||||
|
collapsibleContent.getElementsByTagName("i")[0].classList.toggle("fa-compress");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user