Prepare for images in prehistoric
This commit is contained in:
@@ -205,13 +205,18 @@ UI.openFindingModal = function (data, selector) {
|
||||
*/
|
||||
UI.openPrehistModal = function (data, selector) {
|
||||
const modal = document.querySelector(selector);
|
||||
let dataTabs = modal.querySelectorAll('.data-tabs');
|
||||
|
||||
// Reset data tabs content
|
||||
for (let tab of dataTabs) tab.innerHTML = '';
|
||||
|
||||
let prehistoric = new Prehistoric();
|
||||
prehistoric.data = data;
|
||||
|
||||
// For Stimulus biblio_controller
|
||||
//window.Biblio = prehistoric;
|
||||
prehistoric.render().then(html => modal.querySelector('#prehist-sheet').innerHTML = html);
|
||||
prehistoric.setImages(modal.querySelector('#photos'), this.imageGallery);
|
||||
modal.classList.add('is-active');
|
||||
}
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user