sistemato navigazione tra canti e tolto background al verso risultato

This commit is contained in:
nicola 2023-02-13 13:30:32 +01:00
parent e514334001
commit 01a0c9244d
1 changed files with 12 additions and 5 deletions

View File

@ -317,7 +317,7 @@ $(" ."+formaClass).hover(function(idx, element) {
if (elementoLista[i].canto == canto){ if (elementoLista[i].canto == canto){
if (elementoLista[i].verso == numeroVerso){ if (elementoLista[i].verso == numeroVerso){
if (elementoLista[i].posizione == risultato){ if (elementoLista[i].posizione == risultato){
verso += "<span style='background-color:LightGray'>"+elementoLista[i].testo + " "+"</span >" verso += "<span style='color:red'>"+elementoLista[i].testo + " "+"</span >"
}else{ }else{
verso += elementoLista[i].testo + " " verso += elementoLista[i].testo + " "
} }
@ -344,7 +344,7 @@ $(" ."+formaClass).hover(function(idx, element) {
titoloCanto.appendTo(elencoRisutati); titoloCanto.appendTo(elencoRisutati);
} }
} }
versoCorrente.attr("style", "color: red") //versoCorrente.attr("style", "color: red")
canto = elementoLista[i-1].canto; canto = elementoLista[i-1].canto;
//versi.push(verso); //versi.push(verso);
var elencoVersi = $('<h5 class="titolo-canto pb-2" />') var elencoVersi = $('<h5 class="titolo-canto pb-2" />')
@ -364,6 +364,13 @@ $(" ."+formaClass).hover(function(idx, element) {
jQuery(document).delegate('.navig-canto', 'click', function(e) { jQuery(document).delegate('.navig-canto', 'click', function(e) {
resetFrasi() resetFrasi()
elencoFrasiDisplayed = false;
$(cantoDisplayed).attr('style', 'display: d-flex;');
$("#vistaFrasi").css("display", "none");
var listaRisultati = $('.lista-risultati');
listaRisultati.attr("style", "background-color: ##007bff")
$('.canto').each(function() { $('.canto').each(function() {
$(this).css("display", "none"); $(this).css("display", "none");
}); });
@ -880,8 +887,8 @@ $(" ."+formaClass).hover(function(idx, element) {
if (count>0){ if (count>0){
totResultN+=count 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');
spanbadgecantica.append(count+listIcon) spanbadgecantica.append(count)
spanbadgecantica.appendTo($('#cantica' + i + '-badge')) spanbadgecantica.appendTo($('#cantica' + i + '-badge'))
//$('#cantica' + i).after(spanbadgecantica) //$('#cantica' + i).after(spanbadgecantica)
} }
@ -910,7 +917,7 @@ $(" ."+formaClass).hover(function(idx, element) {
if (count>0){ if (count>0){
var spanbadge = $('<span />'); var spanbadge = $('<span />');
spanbadge.attr('class', cantobadgeclass); spanbadge.attr('class', cantobadgeclass);
spanbadge.append(count+listIcon) spanbadge.append(count)
//spanbadge.appendTo($('[name="' + cantica + 'Canto ' + k + '"]')) //spanbadge.appendTo($('[name="' + cantica + 'Canto ' + k + '"]'))
spanbadge.appendTo($nctags.filter('[name="' + cantica + 'Canto ' + k + '"]')) spanbadge.appendTo($nctags.filter('[name="' + cantica + 'Canto ' + k + '"]'))
//spanbadge.insertAfter($('[name="'+cantica+'Canto '+k+'"]')) //spanbadge.insertAfter($('[name="'+cantica+'Canto '+k+'"]'))