From 73e8a5f7a2ee661ae414ec2d33b92fe8c4fa8606 Mon Sep 17 00:00:00 2001 From: nicola Date: Tue, 11 Mar 2025 19:43:44 +0100 Subject: [PATCH] tentativo risoluzione bottoni in lista risultati --- js/browseMgr_5.1.js | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/js/browseMgr_5.1.js b/js/browseMgr_5.1.js index 0feeb57..10838b9 100644 --- a/js/browseMgr_5.1.js +++ b/js/browseMgr_5.1.js @@ -664,9 +664,9 @@ $(document).ready(function() { - function addFormaListenersInCanto() { + function addFormaListenersInCanto(cantoCitazione = cantoDisplayed) { let idn = 0 - $(cantoDisplayed).find(" ." + formaClass).each(function(idx, element) { + $(cantoCitazione).find(" ." + formaClass).each(function(idx, element) { idn = idn + 1 var ele = $(element); @@ -1869,17 +1869,9 @@ $(document).ready(function() { } if (!(loadedCanti.has(cid))) { + //loadCommentsBottons(cid,formeCanto, numCantica, canto) showCanto(formeCanto, numCantica, canto) loadedCanti.add(cid) - //drawMinimap(cid, false) - - /*initCitazioni(cid); - $(cid).find(" .showcomments").each(function() { - $(this).css("display", "inline-block"); - })*/ - /*minim.contents().find(" .showcomments").each(function() { - $(this).css('display', 'inline-block'); - })*/ } verso = commentoRisultato[3]; @@ -1921,6 +1913,12 @@ $(document).ready(function() { return verso; } + async function loadCommentsBottons(cid,formeCanto, numCantica, canto) { + await initCitazioni(cid) + showCanto(formeCanto, numCantica, canto) + drawMinimap(cid, false) + addFormaListenersInCanto(); + } function executeLocalSearch(testo, forme, limit, cantica, cont, resultsInCantica, resultsInCanto) { for (var ip = 0; ip <= limit; ip++) {