Use GisState for biblio as well
This commit is contained in:
@@ -9,6 +9,7 @@ import { NotConserved } from './components/NotConserved.js';
|
||||
import { Finding } from './components/Finding.js';
|
||||
import { Prehistoric } from './components/Prehistoric.js';
|
||||
import { Underwater } from './components/Underwater.js';
|
||||
import { GisState } from "./state.js";
|
||||
|
||||
/**
|
||||
* @namespace UI
|
||||
@@ -107,7 +108,7 @@ UI.openSiteModal = function (data, selector) {
|
||||
let siteSheet = new SiteSheet();
|
||||
siteSheet.siteData = data;
|
||||
|
||||
window.Biblio = siteSheet;
|
||||
GisState.bibliography = siteSheet;
|
||||
|
||||
modal.querySelector('#short-sheet').innerHTML = siteSheet.renderShort();
|
||||
if (data.description) {
|
||||
@@ -169,7 +170,7 @@ UI.openNotConserModal = function (data, selector) {
|
||||
let notConserved = new NotConserved();
|
||||
notConserved.data = data;
|
||||
// For Stimulus biblio_controller
|
||||
window.Biblio = notConserved;
|
||||
GisState.bibliography = notConserved;
|
||||
|
||||
notConserved.render().then(html => modal.querySelector('#not-conserved-sheet').innerHTML = html);
|
||||
notConserved.renderDocs().then(html => modal.querySelector('#documents').innerHTML = html);
|
||||
@@ -191,7 +192,7 @@ UI.openFindingModal = function (data, selector) {
|
||||
finding.data = data;
|
||||
|
||||
// For Stimulus biblio_controller
|
||||
window.Biblio = finding;
|
||||
GisState.bibliography = finding;
|
||||
|
||||
finding.render().then(html => modal.querySelector('#finding-sheet').innerHTML = html);
|
||||
finding.setImages(modal.querySelector('#photos'), this.imageGallery);
|
||||
@@ -214,7 +215,7 @@ UI.openPrehistModal = function (data, selector) {
|
||||
prehistoric.data = data;
|
||||
|
||||
// For Stimulus biblio_controller
|
||||
//window.Biblio = prehistoric;
|
||||
//GisState.bibliography = prehistoric;
|
||||
prehistoric.render().then(html => modal.querySelector('#prehist-sheet').innerHTML = html);
|
||||
prehistoric.setImages(modal.querySelector('#photos'), this.imageGallery);
|
||||
modal.classList.add('is-active');
|
||||
@@ -231,7 +232,7 @@ UI.openUnderwaterModal = function (data, selector) {
|
||||
underwater.data = data;
|
||||
|
||||
// For Stimulus biblio_controller
|
||||
//window.Biblio = prehistoric;
|
||||
//GisState.bibliography = underwater;
|
||||
underwater.render().then(html => modal.querySelector('#underwater-sheet').innerHTML = html);
|
||||
modal.classList.add('is-active');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user