ottimizzata visualizzazione farsi in query

This commit is contained in:
cesare 2023-04-21 14:07:28 +02:00
parent 138e890324
commit 6f775f7473
1 changed files with 17 additions and 6 deletions

View File

@ -607,8 +607,24 @@ function loadPeriodo(idperiodo) {
})
}
function isPeriodoInCanto(idperiodo, canto){
datiperiodo=idperiodo.split('_')
daticanto=canto.split('_')
canticaprd=datiperiodo[0]
cantoprd=datiperiodo[1]
if(canticaprd=='1' && daticanto[0].includes('Inferno'))
return(cantoprd==daticanto[1])
if(canticaprd=='2' && daticanto[0].includes('Purgatorio'))
return(cantoprd==daticanto[1])
if(canticaprd=='3' && daticanto[0].includes('Paradiso'))
return(cantoprd==daticanto[1])
return false
}
function loadFrase(idperiodo, funzionefrase) {
if (!isPeriodoInCanto(idperiodo, cantoDisplayed))
return
$(cantoDisplayed).find(' .'+idperiodo).each(function() {
var pstp=$(this).attr('class').split(" ")[1]
@ -1142,12 +1158,7 @@ function resetFrasi(){
var fraseItems = frase.split('-');
loadFrase(fraseItems[0].toString(), fraseItems[3].toString())
/*
for (var p = parseInt(fraseItems[1]); p < parseInt(fraseItems[2]) + 1; p++) {
listarisultati.push(p)
}
*/
if (!resSent.has(fraseItems[0] + '-' + fraseItems[3])) {
resSent.add(fraseItems[0] + '-' + fraseItems[3])