From 4e4a24983f7a27d0d32de015dedf25a40bd592c7 Mon Sep 17 00:00:00 2001 From: cesare Date: Tue, 7 Nov 2023 15:25:50 +0100 Subject: [PATCH] Citazioni/riferimenti, in progress --- js/cesareBrowse.js | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/js/cesareBrowse.js b/js/cesareBrowse.js index 64e7cdb..d2a2f1e 100644 --- a/js/cesareBrowse.js +++ b/js/cesareBrowse.js @@ -744,6 +744,23 @@ function resetFrasi(){ } + //DA MODIFICARE: getComments può restituire più di un commento + function getComments(cid){ + + var id = cid.substr(9); + for (var pos in commentsArray){ + var comments = commentsArray[pos] + if (comments.verso == id){ + console.log(comments) + return ('
Annotazione: '+comments.annotazione + "
Frammento annotazione: "+comments.frammentoNota + "
Commentario: " + comments.commentario+"
"+ + "
Testo fonte citazione: "+comments.TestoFonteCitazione+"
Luogo fonte citazione: "+comments.LuogoFonteCitazione+ + "
Autore citazione: "+comments.AutoreCitazione+"
Fonte Citazione: "+comments.FonteCitazione+ + "
Natura del riferimento: "+comments.NaturaRiferimento) + } + } + return null; + } + /*FINE GESTIONE CITAZIONI*/ function getCantica(numeroCantica){ @@ -1042,19 +1059,7 @@ function resetFrasi(){ spanComment.appendTo(commentArea); }) - //DA MODIFICARE: getComments può restituire più di un commento - function getComments(cid){ - - var id = cid.substr(9); - for (var pos in commentsArray){ - var comments = commentsArray[pos] - if (comments.verso == id){ - console.log(comments) - return (comments.annotazione + comments.verso + " di" + comments.commentario+"
") - } - } - return null; - } + function createSpanPeriodiTag(separator, catgramm, pos, sentenceid, elementoverso, pnum) { var spanoccorrenza = $('')