From 86534b5b826b09f45a9ec3e9dabf62ec99ff0ffe Mon Sep 17 00:00:00 2001 From: cesare Date: Wed, 26 Feb 2025 11:39:28 +0100 Subject: [PATCH] gestione riferimenti proemio --- js/browseMgr_5.1.js | 43 ++++++++++++++++++++++++++++--------------- js/dataMgr_5.1.js | 6 ++++-- 2 files changed, 32 insertions(+), 17 deletions(-) diff --git a/js/browseMgr_5.1.js b/js/browseMgr_5.1.js index 51ec4e8..bb7cb70 100644 --- a/js/browseMgr_5.1.js +++ b/js/browseMgr_5.1.js @@ -194,7 +194,7 @@ $(document).ready(function() { var cid = $(this).attr('id'); var parcid = cid.split('_'); var posVerso - reit = '#versiFrase' + parcid[4] + var reit = '#versiFrase' + parcid[4] var expcontextLength = $(reit + " > li").length if (cid.includes('_er_')) { expcontextLength = contextLength @@ -239,7 +239,7 @@ $(document).ready(function() { //evidenzio risultato for (var ris of listarisultati) { - idris = '#e' + ris + var idris = '#e' + ris $(idris).addClass("font-weight-bold mark ") } @@ -879,6 +879,7 @@ $(document).ready(function() { /* */ var mresult = await getVersiConCitazioni(cantica, canto) + commentsSQL = Object.groupBy(mresult, ({ VersoCitazione }) => VersoCitazione); @@ -897,8 +898,10 @@ $(document).ready(function() { break; if(t=='Proemio'){ console.log(idminimap+' '+t) - var elcanto=$("#" + idminimap) - createProemioSpan(idCommento + t, elcanto, commentsSQL[ke].length) + var elcanto=$("#" + 'Titolo'+idminimap) + if (canto.startsWith('0')) + canto=canto.replace('0','') + createProemioSpan(idCommento + t, elcanto, commentsSQL[ke].length, cantica + '_Canto_' + canto+'_Proemio') continue } @@ -1728,16 +1731,21 @@ $(document).ready(function() { } - function createProemioSpan(idVerso, elementoverso, numberOfComments) { - var spanoccorrenza = $('