diff --git a/js/cesareBrowse.js b/js/cesareBrowse.js index 801ee0b..95c96c1 100644 --- a/js/cesareBrowse.js +++ b/js/cesareBrowse.js @@ -123,6 +123,7 @@ function loadFrasi() { }) //drawMinimap(cantoDisplayed) } + function resetFrasi(){ $(cantoDisplayed).find(' .sentencetag').each(function() { @@ -144,6 +145,7 @@ function resetFrasi(){ //$(" .Ma, .Co, .Su, .Pa").each(function(idx, element) { + $(" ."+formaClass).each(function(idx, element) { // We cycle through the elements using each() so that we can choose the element specifically that we wish to clean up afterward var ele = $(element); @@ -441,10 +443,12 @@ $(" ."+formaClass).hover(function(idx, element) { jQuery(document).delegate('.navig-canto', 'click', function(e) { resetFrasi() + //nasconde vista risultati $("#vistaFrasi").css("display", "none"); //rimuove il grafo sintattico se c'รจ' var periodograph=document.getElementById("periodograph"); + if (periodograph!=null){ let showngr=document.getElementById("periodograph").getAttribute('name').split("_") var tmpsent=showngr[0]+"_"+showngr[1]+"_s_"+showngr[2]; @@ -481,28 +485,12 @@ $(" ."+formaClass).hover(function(idx, element) { } //$("#" + $(this).attr('name').replace(" ", "_")).css("display", "block"); $("#" + $(this).attr('name').replace(" ", "_")).attr('style', 'display: d-flex;') + drawMinimap("#" + $(this).attr('name').replace(" ", "_")) - $(" ."+formaClass).each(function(idx, element) { - var ele = $(element); - ele.tooltip({ - content: (function() {return formatTTContent(ele.attr('title'), ele.attr('class').split(' ')[1]);}), - classes:{"ui-tooltip":'Nik_dropdown-content'}, - close: function (event, ui) {$(".ui-helper-hidden-accessible").remove();}, - create: function(ev, ui) {$(this).data("ui-tooltip").liveRegion.remove();}, - hide: false, - show: false - - }); - ele.hover(function(idx, element) { - - sentenceId=$(this).attr('class').split(' ')[0].split('_') - var tmplisid=sentenceId[0]+'_'+sentenceId[1]+'_'+sentenceId[3] - lsentid=$(this).attr('class').split(' ')[0] - lisid=tmplisid - - }); - - }); + if (selectedVista=='frasi'){ + loadFrasi(); + } + addFormaListeners(); }); @@ -655,9 +643,8 @@ $(" ."+formaClass).hover(function(idx, element) { $(".badge").remove(); - $("#headingZero").css("display", "none"); - //$("#vistaFrasi").empty() - //$("#vistaFrasi").css("display", "none"); + //$("#headingZero").css("display", "none"); + listarisultati = [] listaPeriodiRisultato=[] resultSentences=new Set()