Add Reuse asset type

This commit is contained in:
2025-08-08 12:06:38 +02:00
parent 9196653c0d
commit f849f885f9
9 changed files with 250 additions and 1 deletions

View File

@@ -10,6 +10,7 @@ import { Finding } from './components/Finding.js';
import { Prehistoric } from './components/Prehistoric.js';
import { Underwater } from './components/Underwater.js';
import { GisState } from "./state.js";
import { Reuse } from './components/Reuse.js';
/**
* @namespace UI
@@ -213,6 +214,22 @@ UI.openUnderwaterModal = function (data, selector) {
underwater.render().then(html => modal.querySelector('#underwater-sheet').innerHTML = html);
modal.classList.add('is-active');
}
/**
* @todo Biblio?
* @param {object} data The data retrieved from the DB to display as modal content
* @param {string} selector The modal selector
*/
UI.openReuseModal = function (data, selector) {
const modal = document.querySelector(selector);
let reuse = new Reuse();
reuse.data = data;
// For Stimulus biblio_controller
//GisState.bibliography = underwater;
reuse.render().then(html => modal.querySelector('#reuse-sheet').innerHTML = html);
modal.classList.add('is-active');
}
/**
* Open Spotlight gallery
* @param {string} galleryId The id of the trigger element