Add Reuse asset type
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user