diff --git a/css/custom2_4.3.css b/css/custom2_4.3.css index da37f2e..b5fd6ca 100644 --- a/css/custom2_4.3.css +++ b/css/custom2_4.3.css @@ -573,6 +573,7 @@ li::marker { } .diaDiretto { + font-style: italic; font-weight: bold; color: #bb6258; } @@ -594,3 +595,6 @@ li::marker { font-size: 12px; } +.ttContentPers { + padding: 3px 3px 0px 3px; +} diff --git a/js/cesareBrowse.js b/js/cesareBrowse.js index 3babdce..54a768e 100644 --- a/js/cesareBrowse.js +++ b/js/cesareBrowse.js @@ -101,7 +101,7 @@ $(" ."+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); ele.tooltip({ - content: (function() {return formatTTContent(ele.attr('title'), ele.attr('class').split(' ')[1]);}), + content: (function() {return formatTTContent(ele.attr('title'), ele.attr('class').split(' ')[1], ele.attr('class').split(' ')[0]);}), 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();}, @@ -521,32 +521,6 @@ $(" ."+formaClass).hover(function(idx, element) { //Utility functions - /* - function addFormaListenersInRisultato(tmplist){ - - for (ris of tmplist) { - - ele = $(ris) - $(ris).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: { delay: 800, duration: 0 } - - }); - $(ris).hover(function(idx, element) { - - var sentenceId = $(this).attr('class').split(' ')[0].split('_') - var tmplisid = sentenceId[0] + '_' + sentenceId[1] + '_' + sentenceId[3] - lsentid = $(this).attr('class').split(' ')[0] - lisid = tmplisid - - }); - } - - }*/ function addFormaListenersInCanto(){ let idn=0 @@ -555,7 +529,7 @@ $(" ."+formaClass).hover(function(idx, element) { var ele = $(element); $(element).tooltip({ - content: (function() { return formatTTContent(ele.attr('title'), ele.attr('class').split(' ')[1]); }), + content: (function() { return formatTTContent(ele.attr('title'), ele.attr('class').split(' ')[1], ele.attr('class').split(' ')[0]); }), 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(); }, @@ -1258,9 +1232,12 @@ function resetFrasi(){ } } - //Visualizzazione lemma e categoria grammaticale + //Calcola lemma e categoria grammaticale oppure categoria sintattica per tooltip - function formatTTContent(categ, syntType){ + function formatTTContent(categ, syntType, sentId){ + if (selectedVista=='frasi'){ + return '
'+maptypes[syntType]+'
'; + } var details=[]; var lemma=categ.split('#')[1].replace("^", " ") //il lemma var categoria=categ.split('#')[0] // la categoria @@ -1270,10 +1247,15 @@ function resetFrasi(){ var catgramm; var subcatgramm = ''; var popoverText = ''; - if (selectedVista=='frasi'){ - return '
'+maptypes[syntType]+'
'; + var discorsost=''; + var TipiDiscorso={ + "ThoughtDiscourse": "Pensato", + "DirectDiscourse": "Diretto", + "SpeakableDiscourse": "Parlato" + } + for (detail of details){ myitems= detail.split(','); @@ -1284,6 +1266,16 @@ function resetFrasi(){ popoverText = popoverText + catgramm + subcatgramm; } + if(selectedVista=='dialoghi'){ + for (const india in dialoghi){ + if (dialoghi[india]['Cnt'].replace('_so','')==sentId){ + discorsost="
Personaggio: "+dialoghi[india]['Spna'].replace('http://dantenetwork.it/data/commedia/', '') + +'
Discorso: '+TipiDiscorso[dialoghi[india]['Dty']]+'
' + break; + } + } + } + popoverText=popoverText+discorsost return (popoverText); }