Added a commonListeners in helper to avoid repetitions

Added a "compendium-link" listener class to open compendium folder in JournalEntries
This commit is contained in:
Vlyan
2021-06-02 15:05:50 +02:00
parent aeec63dcc4
commit b1a1430114
7 changed files with 57 additions and 19 deletions

View File

@@ -160,12 +160,8 @@ export class TwentyQuestionsDialog extends FormApplication {
activateListeners(html) {
super.activateListeners(html);
// Toggle
html.find(".toggle-on-click").on("click", (event) => {
const elmt = $(event.currentTarget).data("toggle");
const tgt = html.find("." + elmt);
tgt.toggleClass("toggle-active");
});
// Commons
game.l5r5e.HelpersL5r5e.commonListeners(html);
// BT Next
html.find(".next").on("click", (event) => {