Compare commits

...

2 Commits

Author SHA1 Message Date
cesare 7939551043 cesareBrowse -> browseMgr per index_4.5 2024-04-22 12:12:48 +02:00
cesare 5b7bc21bfe cesareBrowse -> browseMgr per index_4.5 2024-04-22 09:58:40 +02:00
4 changed files with 2538 additions and 38 deletions

View File

@ -471,6 +471,7 @@ a[target="_blank"]::after {
.Nik_dropdown-content { .Nik_dropdown-content {
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
background-color: #e4e5dd !important;
color: #1E90FF; color: #1E90FF;
} }

View File

@ -36,7 +36,7 @@
<script src="https://hdnlab1.isti.cnr.it/d3search/node_modules/commarcdiag/d3.js"></script> <script src="https://hdnlab1.isti.cnr.it/d3search/node_modules/commarcdiag/d3.js"></script>
<script type="text/javascript" src="./js/lib/peg-0.10.0.min.js"></script> <script type="text/javascript" src="./js/lib/peg-0.10.0.min.js"></script>
<script type="text/javascript" src="./js/lib/jquery.ui.touch-punch.js"></script> <script type="text/javascript" src="./js/lib/jquery.ui.touch-punch.js"></script>
<script type="text/javascript" src="./js/cesareBrowse.js"></script> <script type="text/javascript" src="./js/browseMgr.js"></script>
<script type="text/javascript" src="./js/minimap_4.3.js"></script> <script type="text/javascript" src="./js/minimap_4.3.js"></script>
<script type="text/javascript" src="./js/partext.js"></script> <script type="text/javascript" src="./js/partext.js"></script>
<script type="text/javascript" src="./js/utils.js"></script> <script type="text/javascript" src="./js/utils.js"></script>

2520
js/browseMgr.js Normal file

File diff suppressed because it is too large Load Diff

View File

@ -8,8 +8,6 @@ var lsid;
var lsentid; var lsentid;
const formaClass='frm' const formaClass='frm'
var selectedVista; var selectedVista;
var vistaPeriodi=false
var vistaDialoghi=false
var listaPeriodiRisultato; var listaPeriodiRisultato;
var listaClausoleRisultato; var listaClausoleRisultato;
var numeroContesti; var numeroContesti;
@ -79,16 +77,20 @@ $('#opzioniVista :checkbox').change(function() {
//resetFrasi() //resetFrasi()
selectedVista = 'frasi' selectedVista = 'frasi'
$(cantoDisplayed).attr('style', 'display: d-flex;') $(cantoDisplayed).attr('style', 'display: d-flex;')
vistaPeriodi=true
//cancello il grafo sintattico
//resetGraphStruct()
//emptyStructCard()
loadFrasi(); loadFrasi();
break; break;
case "visPeriodi|false": case "visPeriodi|false":
$("#vistaFrasi").css("display", "none"); $("#vistaFrasi").css("display", "none");
resetFrasi() resetFrasi()
vistaPeriodi=false
if(vistaDialoghi)
loadDialoghi();
$(cantoDisplayed).attr('style', 'display: d-flex;') $(cantoDisplayed).attr('style', 'display: d-flex;')
//cancello il grafo sintattico
//resetGraphStruct()
//emptyStructCard()
break; break;
case "visRiferimenti|true": case "visRiferimenti|true":
$(".showcomments").css("display", "inline-block"); $(".showcomments").css("display", "inline-block");
@ -107,30 +109,12 @@ $('#opzioniVista :checkbox').change(function() {
break; break;
case "visDialoghi|true": case "visDialoghi|true":
selectedVista = 'dialoghi' selectedVista = 'dialoghi'
//resetFrasi() esetFrasi()
loadDialoghi(); loadDialoghi();
vistaDialoghi=true
break; break;
case "visDialoghi|false": case "visDialoghi|false":
$("#vistaDialoghi").css("display", "none"); $("#vistaDialoghi").css("display", "none");
vistaDialoghi=false resetFrasi()
//trasformare in una funzione
for (mk in dialogspeakers){
$(cantoDisplayed).find(' .'+dialogspeakers[mk]).each(function() {
$(this).removeClass(dialogspeakers[mk]);
})
minim.contents().find(' .'+dialogspeakers[mk]).each(function(){
$(this).removeClass(dialogspeakers[mk]);
})
}
$(cantoDisplayed).find(' .'+dialogaltri).each(function() {
$(this).removeClass(dialogaltri);
})
minim.contents().find(' .'+dialogaltri).each(function(){
$(this).removeClass(dialogaltri);
})
break; break;
case "visMetafore|true": case "visMetafore|true":
//loadMetafore(); //loadMetafore();
@ -140,7 +124,7 @@ $('#opzioniVista :checkbox').change(function() {
} }
}); });
/*$("#valoreVista").on('change', function() { $("#valoreVista").on('change', function() {
selectedVista = $(this).val(); selectedVista = $(this).val();
switch (selectedVista){ switch (selectedVista){
case "forme": case "forme":
@ -171,7 +155,7 @@ $('#opzioniVista :checkbox').change(function() {
resetGraphStruct() resetGraphStruct()
emptyStructCard() emptyStructCard()
} }
});*/ });
@ -847,7 +831,6 @@ function resetFrasi(){
//cancello il grafo sintattico //cancello il grafo sintattico
resetGraphStruct() resetGraphStruct()
emptyStructCard() emptyStructCard()
vistaPeriodi=false
} }
/*INIZIO GESTIONE CITAZIONI*/ /*INIZIO GESTIONE CITAZIONI*/
@ -1310,9 +1293,9 @@ function resetFrasi(){
//Calcola lemma e categoria grammaticale oppure categoria sintattica per tooltip //Calcola lemma e categoria grammaticale oppure categoria sintattica per tooltip
function formatTTContent(categ, syntType, sentId){ function formatTTContent(categ, syntType, sentId){
/*if (selectedVista=='frasi'){ if (selectedVista=='frasi'){
return '<div class="ttContent"><b>'+maptypes[syntType]+'</b></div>'; return '<div class="ttContent"><b>'+maptypes[syntType]+'</b></div>';
}*/ }
var details=[]; var details=[];
var lemma=categ.split('#')[1].replace("^", " ") //il lemma var lemma=categ.split('#')[1].replace("^", " ") //il lemma
var categoria=categ.split('#')[0] // la categoria var categoria=categ.split('#')[0] // la categoria
@ -1323,7 +1306,6 @@ function resetFrasi(){
var subcatgramm = ''; var subcatgramm = '';
var popoverText = ''; var popoverText = '';
var discorsost=''; var discorsost='';
var funcFrase='';
var TipiDiscorso={ var TipiDiscorso={
"ThoughtDiscourse": "Pensato", "ThoughtDiscourse": "Pensato",
"DirectDiscourse": "Diretto", "DirectDiscourse": "Diretto",
@ -1341,7 +1323,7 @@ function resetFrasi(){
popoverText = popoverText + catgramm + subcatgramm; popoverText = popoverText + catgramm + subcatgramm;
} }
if(vistaDialoghi){ if(selectedVista=='dialoghi'){
for (const india in dialoghi){ for (const india in dialoghi){
if (dialoghi[india]['Cnt'].replace('_so','')==sentId){ if (dialoghi[india]['Cnt'].replace('_so','')==sentId){
discorsost="<div class='ttContentPers'><b>Personaggio:</b> <i>"+dialoghi[india]['Spna'].replace('http://dantenetwork.it/data/commedia/', '')+'</i>' discorsost="<div class='ttContentPers'><b>Personaggio:</b> <i>"+dialoghi[india]['Spna'].replace('http://dantenetwork.it/data/commedia/', '')+'</i>'
@ -1350,10 +1332,7 @@ function resetFrasi(){
} }
} }
} }
if(vistaPeriodi){ popoverText=popoverText+discorsost
funcFrase='<div class="ttContent"><b>'+maptypes[syntType]+'</b></div>'
}
popoverText=popoverText+discorsost+funcFrase
return (popoverText); return (popoverText);
} }