Fix stupid biblio bug
This commit is contained in:
parent
e3fe2f1b94
commit
023b94b2a0
@ -91,17 +91,17 @@ export class Finding {
|
||||
let citations = '';
|
||||
|
||||
if (record.bibliography.length) {
|
||||
record.bibliography.forEach(record => {
|
||||
record.bibliography.forEach(biblio => {
|
||||
citations += `
|
||||
<span class="is-clickable is-capitalized has-text-link"
|
||||
id="cit-${record.id}">
|
||||
${record.citation.toLowerCase()},
|
||||
</span> ${record.pages};
|
||||
id="cit-${biblio.id}">
|
||||
${biblio.citation.toLowerCase()},
|
||||
</span> ${biblio.pages};
|
||||
`;
|
||||
|
||||
this.biblioElements.push(`
|
||||
<div class="p-2 mt-2" id="ref-${record.id}">
|
||||
<p>${record.reference}</p>
|
||||
<div class="p-2 mt-2" id="ref-${biblio.id}">
|
||||
<p>${biblio.reference}</p>
|
||||
</div>
|
||||
`
|
||||
);
|
||||
|
@ -182,7 +182,7 @@ UI.openNotConserModal = async function (data, selector) {
|
||||
sheet.siteData = data;
|
||||
modal.querySelector('#not-conser-sheet').innerHTML = await sheet.render();
|
||||
modal.addEventListener('click', event => {
|
||||
const biblio = document.querySelector('#biblio');
|
||||
const biblio = modal.querySelector('#biblio');
|
||||
if (event.target.id.includes('cit')) {
|
||||
|
||||
const id = event.target.id.replace('cit-','');
|
||||
@ -226,9 +226,9 @@ UI.openFindingModal = async function (data, selector) {
|
||||
finding.setImages();
|
||||
modal.querySelector('#finding-sheet').innerHTML = await finding.render();
|
||||
modal.addEventListener('click', event => {
|
||||
const biblio = document.querySelector('#biblio');
|
||||
if (event.target.id.includes('cit')) {
|
||||
const biblio = modal.querySelector('#biblio');
|
||||
|
||||
if (event.target.id.includes('cit')) {
|
||||
const id = event.target.id.replace('cit-','');
|
||||
|
||||
biblio.innerHTML = '<button class="delete"></button>';
|
||||
|
Loading…
Reference in New Issue
Block a user