implementazione bottone lista risultati
This commit is contained in:
parent
2c28bb1500
commit
d019e01a5f
|
@ -387,6 +387,7 @@ $(" ."+formaClass).hover(function(idx, element) {
|
||||||
|
|
||||||
|
|
||||||
$(".badge").remove();
|
$(".badge").remove();
|
||||||
|
$("#headingZero").css("display", "none")
|
||||||
listarisultati = []
|
listarisultati = []
|
||||||
listaPeriodiRisultato=[]
|
listaPeriodiRisultato=[]
|
||||||
resultSentences=new Set()
|
resultSentences=new Set()
|
||||||
|
@ -729,18 +730,29 @@ $(" ."+formaClass).hover(function(idx, element) {
|
||||||
|
|
||||||
//aggiunge badge con totale risultati accanto alle cantiche
|
//aggiunge badge con totale risultati accanto alle cantiche
|
||||||
i = 0
|
i = 0
|
||||||
|
var totResultN=0;
|
||||||
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);
|
||||||
if (count>0){
|
if (count>0){
|
||||||
|
totResultN+=count
|
||||||
var spanbadgecantica = $('<span />');
|
var spanbadgecantica = $('<span />');
|
||||||
spanbadgecantica.attr('class', 'badge badge-primary badge-pill mx-2 lista-risultati');
|
spanbadgecantica.attr('class', 'badge badge-primary badge-pill mx-2 lista-risultati');
|
||||||
spanbadgecantica.append(count +' >')
|
spanbadgecantica.append(count)
|
||||||
spanbadgecantica.appendTo($('#cantica' + i + '-badge'))
|
spanbadgecantica.appendTo($('#cantica' + i + '-badge'))
|
||||||
//$('#cantica' + i).after(spanbadgecantica)
|
//$('#cantica' + i).after(spanbadgecantica)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//aggiunge badge con totale risultati nel bottone lista canti
|
||||||
|
if (totResultN>0){
|
||||||
|
$("#headingZero").attr('style', 'display: d-flex;')
|
||||||
|
var spanbadgelista = $('<span />');
|
||||||
|
spanbadgelista.attr('class', 'badge badge-primary badge-pill mx-2 lista-risultati');
|
||||||
|
spanbadgelista.append(totResultN)
|
||||||
|
spanbadgelista.appendTo($('#cantica0-badge'))
|
||||||
|
}
|
||||||
//aggiunge badge con totale risultati accanto ai canti
|
//aggiunge badge con totale risultati accanto ai canti
|
||||||
|
|
||||||
console.log('results end...')
|
console.log('results end...')
|
||||||
|
|
||||||
//console.log(sid)
|
//console.log(sid)
|
||||||
|
|
|
@ -60,6 +60,7 @@ document.addEventListener("dblclick", function(e){
|
||||||
|
|
||||||
sentence[i].classList.remove('font-weight-normal');
|
sentence[i].classList.remove('font-weight-normal');
|
||||||
}
|
}
|
||||||
|
getDimensionsDiv()
|
||||||
if (tmpsent==lsentid)
|
if (tmpsent==lsentid)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue