Aggiunto bottone filtra

This commit is contained in:
nicola 2025-03-13 19:47:51 +01:00
parent cd0ed513dd
commit 83940423db
1 changed files with 14 additions and 8 deletions

View File

@ -603,12 +603,13 @@ $(document).ready(function() {
loadedCanti.add(cid)
}
//var telive = getListaRis()
//var versiCommentati = $(".risultato").removeClass("risultato");
for (var tel of telive) {
var telId = tel.split("_");
telId = "#" + telId[0] + telId[1] + "_" + telId[2];
//replace inserito per evitare errori per i dati non corretti
$(telId + " #" + tel.replace('|', '')).addClass("mark ")
$(telId + " #" + tel.replace('|', '')).addClass("mark risultato")
}
$("#" + $(this).attr('name').replace(" ", "_")).attr('style', 'display: d-flex;')
@ -1016,7 +1017,7 @@ $(document).ready(function() {
var cid = $(this).attr('id');
var queryComment = false;
var idClass = $(this).attr('class');
var parentClass = $(this).parent().attr('class');
//var parentClass = $(this).parent().attr('class');
filterOn = true;
if (idClass.includes("filterRiferimentiOn")) {
@ -1031,7 +1032,7 @@ $(document).ready(function() {
}
if (getListaIdCommenti().length > 0) {
if (filterOn) {
if (parentClass.includes("mark")) {
if (idClass.includes("risultato")) {
$(".filterRiferimentiOn").css('display', 'inline-block');
$(".filterRiferimentiOff").css('display', 'none');
} else {
@ -1646,7 +1647,7 @@ $(document).ready(function() {
var telive = getListaRis()
for (var ve of telive) {
//let idve = ve
$(ve.replace('|', '')).removeClass("mark ")
$(ve.replace('|', '')).removeClass("mark risultato")
minim.contents().find(ve.replace('|', '')).removeClass("mark ")
}
const tmplistaidcomm = getListaIdCommenti()
@ -1907,7 +1908,7 @@ $(document).ready(function() {
//BOTTONE ESPANSIONE MODIFICARE
var spanBadgeExpand = $('<button class="btn btn-sm btn-outline-primary espandiFrase px-1 pt-1 pb-0"/>');
/*var spanBadgeExpand = $('<button class="btn btn-sm btn-outline-primary espandiFrase px-1 pt-1 pb-0"/>');
var expandIcon = '<ion-icon name="expand-outline"></ion-icon>';
var spanBadgeReduce = $('<button class="btn btn-sm btn-outline-secondary riduciFrase px-1 pt-1 pb-0 ml-1 disabled"/>');
var reduceIcon = '<ion-icon name="contract-outline"></ion-icon>';
@ -1922,7 +1923,7 @@ $(document).ready(function() {
spanBadgeExpand.appendTo(comandiGrp);
spanBadgeReduce.appendTo(comandiGrp);
comandiGrp.appendTo(comandi);
comandiGrp.appendTo(comandi);*/
var citazioneDiv = $('<div class=" text-right flex-nowrap d-inline ml-3 px-3 py-0"/>')
@ -2216,7 +2217,12 @@ $(document).ready(function() {
var spanoccorrenza = $('<button />')
spanoccorrenza.attr('id', idVerso)
//btn-sm btn-outline-secondary
spanoccorrenza.attr('class', 'btn btn-sm btn-outline-primary showcomments bg-light border-0 rounded text-primary px-1 pt-1 pb-0 ml-1');
if (idVerso.startsWith("CommentoRes_")){
spanoccorrenza.attr('class', 'btn btn-sm btn-outline-primary risultato showcomments bg-light border-0 rounded text-primary px-1 pt-1 pb-0 ml-1');
}else{
spanoccorrenza.attr('class', 'btn btn-sm btn-outline-primary showcomments bg-light border-0 rounded text-primary px-1 pt-1 pb-0 ml-1');
}
if (numberOfComments > 1) {
var commentIcon = '<ion-icon name="document-attach"></ion-icon><ion-icon name="add-circle-outline"></ion-icon>';
} else {