corretto bug firefox, aggiunta classe nowrap per i versi

This commit is contained in:
cesare 2022-11-18 16:36:24 +01:00
parent 2bf937668a
commit 4633e31863
1 changed files with 16 additions and 15 deletions

View File

@ -469,16 +469,20 @@ jQuery(document).delegate('#cleanresult', 'click', function(e) {
var orderedListaCanti = Array.from(listaCanti) var orderedListaCanti = Array.from(listaCanti)
orderedListaCanti = orderedListaCanti.sort((a, b) => { orderedListaCanti = orderedListaCanti.sort((a, b) => {
if (parseInt(a.split(" ")[1]) < parseInt(b.split(" ")[1])) { return parseInt(a.split(" ")[1], 10)-parseInt(b.split(" ")[1], 10)
return -1; //if (parseInt(a.split(" ")[1], 10) < parseInt(b.split(" ")[1]), 10) {
} // return -1;
//}
}); });
var orderedListaVersi = Array.from(listaVersi) var orderedListaVersi = Array.from(listaVersi)
orderedListaVersi = orderedListaVersi.sort((a, b) => { orderedListaVersi = orderedListaVersi.sort((a, b) => {
if (parseInt(a.numverso) < parseInt(b.numverso)) { return parseInt(a.numverso, 10)-parseInt(b.numverso, 10)
return -1; //if (parseInt(a.numverso, 10) < parseInt(b.numverso, 10)) {
} // console.log(parseInt(a.numverso, 10)+' '+parseInt(b.numverso, 10))
// return -1;
//}
}); });
@ -494,9 +498,10 @@ jQuery(document).delegate('#cleanresult', 'click', function(e) {
var orderedListaForme = Array.from(listaForme) var orderedListaForme = Array.from(listaForme)
orderedListaForme = orderedListaForme.sort((a, b) => { orderedListaForme = orderedListaForme.sort((a, b) => {
if (parseInt(a.pos) < parseInt(b.pos)) { return parseInt(a.pos, 10)-parseInt(b.pos, 10)
return -1; //if (parseInt(a.pos) < parseInt(b.pos)) {
} // return -1;
//}
}); });
@ -530,7 +535,7 @@ jQuery(document).delegate('#cleanresult', 'click', function(e) {
elementoverso.append(verso.numverso + ". ") elementoverso.append(verso.numverso + ". ")
//elementoverso.append(verso.numverso + ". " + managePunctuation(verso.verso)) //elementoverso.append(verso.numverso + ". " + managePunctuation(verso.verso))
elementoverso.attr("style", "line-height: 0.5em") elementoverso.attr("style", "line-height: 0.5em")
elementoverso.attr('class', 'f6 font-weight-lighter') elementoverso.attr('class', 'f6 font-weight-lighter nowrap')
elementoverso.attr('id', verso.cantica+"_"+ verso.canto.replace(" ", "_")+"_"+verso.numverso) elementoverso.attr('id', verso.cantica+"_"+ verso.canto.replace(" ", "_")+"_"+verso.numverso)
elementoverso.appendTo('#' + cantica + verso.canto.replace(" ", "_")) elementoverso.appendTo('#' + cantica + verso.canto.replace(" ", "_"))
@ -597,12 +602,9 @@ jQuery(document).delegate('#cleanresult', 'click', function(e) {
for(cantica of cantiche){ for(cantica of cantiche){
i+=1 i+=1
let count = resultsInCantica.reduce((n, x) => n + (x === cantica), 0); let count = resultsInCantica.reduce((n, x) => n + (x === cantica), 0);
//<span class="badge badge-primary badge-pill"></span>
var spanbadgecantica=$('<span />'); var spanbadgecantica=$('<span />');
spanbadgecantica.attr('class', 'badge badge-primary badge-pill ml-1'); spanbadgecantica.attr('class', 'badge badge-primary badge-pill ml-1');
//spanbadgecantica.attr('class', 'position-absolute top-0 start-100 translate-middle badge rounded-pill badge-primary');
spanbadgecantica.append(count) spanbadgecantica.append(count)
//spanbadgecantica.insertAfter($('#cantica'+i))
spanbadgecantica.appendTo($('#cantica'+i)) spanbadgecantica.appendTo($('#cantica'+i))
} }
//aggiunge badge con totale risultati accanto ai canti //aggiunge badge con totale risultati accanto ai canti
@ -612,7 +614,6 @@ jQuery(document).delegate('#cleanresult', 'click', function(e) {
if (k==0) if (k==0)
continue continue
let count = resultsInCanto.reduce((n, x) => n + (x === cantica+'Canto '+k), 0); let count = resultsInCanto.reduce((n, x) => n + (x === cantica+'Canto '+k), 0);
//<span class="badge badge-outline-info badge-pill">14</span>
var spanbadge=$('<span />'); var spanbadge=$('<span />');
spanbadge.attr('class', cantobadgeclass); spanbadge.attr('class', cantobadgeclass);