sync: investigation-board_v13 v0.2

This commit is contained in:
2025-10-09 20:58:50 +02:00
parent 3a610b71e2
commit c7048e6c32
3 changed files with 32 additions and 16 deletions
@@ -1,15 +1,31 @@
{ {
"id": "investigation-board",
"title": "Investigation Board", "title": "Investigation Board",
"description": "A Foundry VTT module that lets everyone create...photo notes on the scene as collaborative investigation tools.", "description": "A Foundry VTT module that lets everyone create, edit, and move sticky and photo notes on the scene as collaborative investigation tools.",
"version": "1.3.2", "version": "1.3.2",
"authors": [{ "name": "Gus", "url": "", "email": "" }], "authors": [
"compatibility": { "minimum": "12", "verified": "13" }, {
"name": "Gus",
"url": "",
"email": ""
}
],
"compatibility": {
"minimum": "12",
"verified": "13"
},
"esmodules": [ "esmodules": [
"scripts/settings.js", "scripts/settings.js",
"scripts/investigation-board.js" "scripts/investigation-board.js"
], ],
"styles": ["styles/style.css"], "styles": [
"styles/style.css"
],
"packs": [], "packs": [],
"templates": ["templates/drawing-sheet.html"], "templates": [
} "templates/drawing-sheet.html"
],
"url": "https://github.com/mordachai/investigation-board",
"manifest": "https://github.com/mordachai/investigation-board/raw/main/module.json",
"download": "https://github.com/mordachai/investigation-board/raw/main/investigation-board.zip",
"id": "investigation-board"
}
@@ -76,8 +76,8 @@ class CustomDrawingSheet extends DrawingConfig {
// Add activateListeners to hook up the file-picker button. // Add activateListeners to hook up the file-picker button.
activateListeners(element) { activateListeners(element) {
super.activateListeners(html); super.activateListeners(element);
html.find(".file-picker-button").click(ev => { element.querySelectorAll(".file-picker-button").forEach(btn => btn.addEventListener("click", ev => {
ev.preventDefault(); ev.preventDefault();
// Open Foundry's FilePicker for images; adjust the "current" directory if needed. // Open Foundry's FilePicker for images; adjust the "current" directory if needed.
new FilePicker({ new FilePicker({
@@ -88,7 +88,7 @@ class CustomDrawingSheet extends DrawingConfig {
const input = element.querySelector("input[name='image']"); if (input) input.value = path; const input = element.querySelector("input[name='image']"); if (input) input.value = path;
} }
}).browse(); }).browse();
}); }));
} }
@@ -444,13 +444,13 @@ async function createNote(noteType) {
Hooks.on("getSceneControlButtons", (controls) => { Hooks.on("getSceneControlButtons", (controls) => {
const journalControls = controls.find((c) => c.name === "notes"); const journalControls = Array.isArray(controls) ? controls.find((c) => c.name === "notes") : (controls["notes"] ?? controls.notes);
if (!journalControls) return; if (!journalControls) return;
journalControls.tools.push( journalControls.tools.push(
{ name: "createStickyNote", title: "Create Sticky Note", icon: "fas fa-sticky-note", onClick: () => createNote("sticky"), button: true }, { name: "createStickyNote", title: "Create Sticky Note", icon: "fa-solid fa-note-sticky", onChange: (ev, active) => { if (active) createNote("sticky"); }, button: true },
{ name: "createPhotoNote", title: "Create Photo Note", icon: "fa-solid fa-camera-polaroid", onClick: () => createNote("photo"), button: true }, { name: "createPhotoNote", title: "Create Photo Note", icon: "fa-solid fa-camera-polaroid", onChange: (ev, active) => { if (active) createNote("photo"); }, button: true },
{ name: "createIndexCard", title: "Create Index Card", icon: "fa-regular fa-subtitles", onClick: () => createNote("index"), button: true } { name: "createIndexCard", title: "Create Index Card", icon: "fa-regular fa-rectangle-list", onChange: (ev, active) => { if (active) createNote("index"); }, button: true }
); );
}); });
+1 -1
View File
@@ -1 +1 @@
0.1 0.2