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