Migliorato gestione bottone filtro

This commit is contained in:
nicola 2025-03-13 22:24:14 +01:00
parent 83940423db
commit a32e097665
1 changed files with 21 additions and 10 deletions

View File

@ -592,24 +592,35 @@ $(document).ready(function() {
}
}
var parcid = cid.split('_')
var numeroVerso;
var forma;
if (parcid[0].includes('Inferno')) {
forma = formeprima;
numeroVerso = 1;
}
if (parcid[0].includes('Purgatorio')) {
forma = formeseconda;
numeroVerso = 2;
}
if (parcid[0].includes('Paradiso')) {
forma = formeterza;
numeroVerso = 3;
}
if (!(loadedCanti.has(cid))) {
if (parcid[0].includes('Inferno'))
showCanto(formeprima, '1', parcid[1])
if (parcid[0].includes('Purgatorio'))
showCanto(formeseconda, '2', parcid[1])
if (parcid[0].includes('Paradiso'))
showCanto(formeterza, '3', parcid[1])
showCanto(forma, '1', parcid[1])
loadedCanti.add(cid)
}
//var versiCommentati = $(".risultato").removeClass("risultato");
for (var tel of telive) {
var telId = tel.split("_");
var commento = "#Commento_"+numeroVerso+"_" + telId[2] + "_" + telId[3];
//commento = commento+telId[2] + "_" + telId[3];
telId = "#" + telId[0] + telId[1] + "_" + telId[2];
$(commento).addClass("risultato ")
//replace inserito per evitare errori per i dati non corretti
$(telId + " #" + tel.replace('|', '')).addClass("mark risultato")
$(telId + " #" + tel.replace('|', '')).addClass("mark ")
}
$("#" + $(this).attr('name').replace(" ", "_")).attr('style', 'display: d-flex;')
@ -1647,7 +1658,7 @@ $(document).ready(function() {
var telive = getListaRis()
for (var ve of telive) {
//let idve = ve
$(ve.replace('|', '')).removeClass("mark risultato")
$(ve.replace('|', '')).removeClass("mark ")
minim.contents().find(ve.replace('|', '')).removeClass("mark ")
}
const tmplistaidcomm = getListaIdCommenti()