add autori dei dialoghi

This commit is contained in:
cesare 2024-01-09 14:21:03 +01:00
parent dbb6e6525a
commit b23b5f991c
3 changed files with 45 additions and 16 deletions

View File

@ -587,3 +587,10 @@ li::marker {
color: #977356; color: #977356;
} }
.autoredialogotag {
font-style: italic;
font-family: Book Antiqua,Palatino,Palatino Linotype,Palatino LT STD,Georgia,serif;
line-height: 0.5em;
font-size: 12px;
}

View File

@ -84,8 +84,6 @@ $("#valoreVista").on('change', function() {
break; break;
case "dialoghi": case "dialoghi":
resetFrasi() resetFrasi()
resetGraphStruct()
emptyStructCard()
loadDialoghi(); loadDialoghi();
break; break;
@ -665,6 +663,11 @@ function loadClausola(idperiodo, funzionefrase, fromn, ton) {
}) })
} }
const dialogclasses={
"SpeakableDiscourse":"diaSpeakable",
"ThoughtDiscourse":"diaPensato",
"DirectDiscourse":"diaDiretto"
}
function loadDialoghi() { function loadDialoghi() {
var aca='3' var aca='3'
if (cantoDisplayed.includes('Inferno')) if (cantoDisplayed.includes('Inferno'))
@ -674,25 +677,26 @@ function loadDialoghi() {
for (const india in dialoghi){ for (const india in dialoghi){
//console.log(dialoghi[india]['Cnt'].replace('_so','')) //console.log(dialoghi[india]['Cnt'].replace('_so',''))
var diaclass=dialoghi[india]['Cnt'].replace('_so','') var diaclass=dialoghi[india]['Cnt'].replace('_so','')
if(diaclass.split('_')[0]!=aca) var authclass=dialoghi[india]['Cnt'];
continue;
if(diaclass.split('_')[1]!=cantoDisplayed.split('_')[1]) if(diaclass.split('_')[1]!=cantoDisplayed.split('_')[1])
continue; continue;
var csscl='diaDiretto ' if(diaclass.split('_')[0]!=aca)
var diaty=dialoghi[india]['Dty'] continue;
if (diaty=='SpeakableDiscourse')
csscl='diaSpeakable ' var csscl=dialogclasses[dialoghi[india]['Dty']]
if (diaty=='ThoughtDiscourse')
csscl='diaPensato '
$(cantoDisplayed).find(' .'+diaclass).each(function() { $(cantoDisplayed).find(' .'+diaclass).each(function() {
$(this).addClass(csscl) $(this).addClass(csscl)
//$(this).css('color', '#1f78b4');
//$(this).addClass("font-weight-bold ") })
$(cantoDisplayed).find(' .'+authclass).each(function() {
//$(this).addClass(csscl)
$(this).attr('style', 'display: d-flex;');
}) })
minim.contents().find(' .'+diaclass).each(function() { minim.contents().find(' .'+diaclass).each(function() {
$(this).addClass(csscl) $(this).addClass(csscl)
//$(this).css('color', '#1f78b4');
//$(this).addClass("font-weight-bold ")
}) })
} }
@ -728,9 +732,14 @@ function resetFrasi(){
$(cantoDisplayed).find(' .diaSpeakable').each(function() { $(cantoDisplayed).find(' .diaSpeakable').each(function() {
$(this).removeClass('diaSpeakable'); $(this).removeClass('diaSpeakable');
}) })
$(cantoDisplayed).find(' .autoredialogotag').each(function() {
$(this).css('display', 'none');
})
$(cantoDisplayed).find(' .sentencetag').each(function() { $(cantoDisplayed).find(' .sentencetag').each(function() {
$(this).css('display', 'none'); $(this).css('display', 'none');
}) })
$(cantoDisplayed).find(' .'+formaClass).each(function() { $(cantoDisplayed).find(' .'+formaClass).each(function() {
//console.log(colorssp(mapsynttypestopalette[stp])) //console.log(colorssp(mapsynttypestopalette[stp]))
$(this).css('color', ''); $(this).css('color', '');
@ -1529,6 +1538,16 @@ function resetFrasi(){
spanoccorrenza.attr('class', sentenceid+' sentencetag') spanoccorrenza.attr('class', sentenceid+' sentencetag')
spanoccorrenza.append(separator+" ") spanoccorrenza.append(separator+" ")
if (separator==closeSTag){ if (separator==closeSTag){
for (const india in dialoghi){
if (dialoghi[india]['Cnt'].replace('_so','')==sentenceid){
var supelname=$('<sup />')
supelname.append("("+dialoghi[india]['Spna']+')')
supelname.attr('class', sentenceid+'_so autoredialogotag')
supelname.css("display", "none")
supelname.appendTo(elementoverso)
break;
}
}
varsupel=$('<sup />') varsupel=$('<sup />')
//varsupel.append(sentenceid.split('_')[3]+' ') //varsupel.append(sentenceid.split('_')[3]+' ')
varsupel.append(pnum+' ') varsupel.append(pnum+' ')

View File

@ -190,6 +190,8 @@ const maptypes = {
"ParentheticalCoI": "Coordinata alla parentetica I grado", "SubVII": "Subordinata VII grado" "ParentheticalCoI": "Coordinata alla parentetica I grado", "SubVII": "Subordinata VII grado"
} }
orlprefix = 'https://dantenetwork.it/ontology/orl/current/' orlprefix = 'https://dantenetwork.it/ontology/orl/current/'
syntitprefix = 'https://dantenetwork.it/ontology/syntit/current/' syntitprefix = 'https://dantenetwork.it/ontology/syntit/current/'
@ -1254,6 +1256,7 @@ function getVersiConCitazioni(canticapar='', cantopar=''){
//TEMPORANEAMENTE: gestione del grafo quando viene chiusa la finestra dal bottone, dovebbe essere spostato //TEMPORANEAMENTE: gestione del grafo quando viene chiusa la finestra dal bottone, dovebbe essere spostato
const myiframe = document.getElementsByClassName("minimap__content");
function resetGraphStruct(){ function resetGraphStruct(){
var periodograph=document.getElementById("periodograph"); var periodograph=document.getElementById("periodograph");
@ -1276,8 +1279,8 @@ function resetGraphStruct(){
} }
//reset Minimap //reset Minimap
const iframe = document.getElementsByClassName("minimap__content");
var iframeDocument = iframe[0].contentDocument || iframe[0].contentWindow.document; var iframeDocument = myiframe[0].contentDocument || myiframe[0].contentWindow.document;
if (!iframeDocument) { if (!iframeDocument) {
throw "iframe couldn't be found in DOM."; throw "iframe couldn't be found in DOM.";
} }