modificata la visualizzazione dei dialoghi
This commit is contained in:
parent
e19c15992d
commit
cdbaadf82e
|
@ -572,20 +572,28 @@ li::marker {
|
|||
color: #c5ce46;
|
||||
}
|
||||
|
||||
.diaDiretto {
|
||||
.diaDante {
|
||||
font-style: italic;
|
||||
font-weight: bold;
|
||||
color: #bb6258;
|
||||
color: #0d83f2; /*#bb6258;*/
|
||||
}
|
||||
|
||||
.diaPensato {
|
||||
.diaBeatrice {
|
||||
font-style: italic;
|
||||
font-weight: bold;
|
||||
color: #bb9358;
|
||||
color: #6fcceb; /*#bb9358;*/
|
||||
}
|
||||
|
||||
.diaSpeakable {
|
||||
.diaVirgilio {
|
||||
font-style: italic;
|
||||
font-weight: bold;
|
||||
color: #977356;
|
||||
color: #78877c; /*#977356;*/
|
||||
}
|
||||
|
||||
.diaAltri {
|
||||
font-style: italic;
|
||||
font-weight: bold;
|
||||
color: #524c4c;
|
||||
}
|
||||
|
||||
.autoredialogotag {
|
||||
|
|
|
@ -16,6 +16,14 @@ $(document).ready(function() {
|
|||
lsid='';
|
||||
removeGraph=false;
|
||||
|
||||
const dialogspeakers={
|
||||
"Beatrice":"diaBeatrice",
|
||||
"Dante":"diaDante",
|
||||
"Virgilio":"diaVirgilio"
|
||||
}
|
||||
const dialogaltri='diaAltri'
|
||||
|
||||
|
||||
const cantobadgeclass = 'badge badge-outline-warning badge-pill'
|
||||
|
||||
const sparqlGenerator = sparqljs.Generator;
|
||||
|
@ -637,11 +645,8 @@ function loadClausola(idperiodo, funzionefrase, fromn, ton) {
|
|||
|
||||
})
|
||||
}
|
||||
const dialogclasses={
|
||||
"SpeakableDiscourse":"diaSpeakable",
|
||||
"ThoughtDiscourse":"diaPensato",
|
||||
"DirectDiscourse":"diaDiretto"
|
||||
}
|
||||
|
||||
|
||||
function loadDialoghi() {
|
||||
var aca='3'
|
||||
if (cantoDisplayed.includes('Inferno'))
|
||||
|
@ -656,8 +661,11 @@ function loadDialoghi() {
|
|||
continue;
|
||||
if(diaclass.split('_')[0]!=aca)
|
||||
continue;
|
||||
var csscl=dialogaltri
|
||||
if (dialoghi[india]['Spna'] in dialogspeakers){
|
||||
csscl=dialogspeakers[dialoghi[india]['Spna']]
|
||||
}
|
||||
|
||||
var csscl=dialogclasses[dialoghi[india]['Dty']]
|
||||
|
||||
$(cantoDisplayed).find(' .'+diaclass).each(function() {
|
||||
$(this).addClass(csscl)
|
||||
|
@ -714,18 +722,22 @@ function loadFrasi() {
|
|||
}
|
||||
function resetFrasi(){
|
||||
|
||||
$(cantoDisplayed).find(' .diaDiretto').each(function() {
|
||||
$(this).removeClass('diaDiretto');
|
||||
})
|
||||
$(cantoDisplayed).find(' .diaPensato').each(function() {
|
||||
$(this).removeClass('diaPensato');
|
||||
})
|
||||
$(cantoDisplayed).find(' .diaSpeakable').each(function() {
|
||||
$(this).removeClass('diaSpeakable');
|
||||
})
|
||||
$(cantoDisplayed).find(' .autoredialogotag').each(function() {
|
||||
$(this).css('display', 'none');
|
||||
})
|
||||
for (mk in dialogspeakers){
|
||||
console.log (mk+' '+dialogspeakers[mk])
|
||||
$(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);
|
||||
})
|
||||
|
||||
$(cantoDisplayed).find(' .sentencetag').each(function() {
|
||||
$(this).css('display', 'none');
|
||||
})
|
||||
|
@ -736,16 +748,7 @@ function resetFrasi(){
|
|||
$(this).css('color', '');
|
||||
$(this).removeClass('font-weight-bold')
|
||||
})
|
||||
//let minim=$(" .minimap__content")
|
||||
minim.contents().find(" .diaDiretto").each(function(){
|
||||
$(this).removeClass('diaDiretto');
|
||||
})
|
||||
minim.contents().find(" .diaPensato").each(function(){
|
||||
$(this).removeClass('diaPensato');
|
||||
})
|
||||
minim.contents().find(" .diaSpeakable").each(function(){
|
||||
$(this).removeClass('diaSpeakable');
|
||||
})
|
||||
|
||||
minim.contents().find(" .sentencetag").each(function(){
|
||||
$(this).css('display', 'none');
|
||||
})
|
||||
|
@ -1261,8 +1264,7 @@ function resetFrasi(){
|
|||
myitems= detail.split(',');
|
||||
|
||||
catgramm='<div class="ttContent">';
|
||||
subcatgramm='<p> <b> '+lemma+' - </b><i>'+myitems[0]+','+myitems.slice(1)+'</i></p></div>';
|
||||
//subcatgramm='<p> <b> '+lemma+' - </b><i>'+myitems+'</i></p></div>';
|
||||
subcatgramm='<p> <b> '+lemma+' - </b><i>'+myitems[0]+','+myitems.slice(1)+'</i></p></div>';
|
||||
popoverText = popoverText + catgramm + subcatgramm;
|
||||
}
|
||||
|
||||
|
@ -1546,7 +1548,10 @@ function resetFrasi(){
|
|||
spanoccorrenza.attr('title', catgramm)
|
||||
spanoccorrenza.attr('class', sentenceid+' sentencetag')
|
||||
spanoccorrenza.append(separator+" ")
|
||||
|
||||
if (separator==closeSTag){
|
||||
/*
|
||||
//aggiunge il nome del 'parlante', NON SERVE RIMUOVERE
|
||||
for (const india in dialoghi){
|
||||
if (dialoghi[india]['Cnt'].replace('_so','')==sentenceid){
|
||||
var supelname=$('<sup />')
|
||||
|
@ -1557,6 +1562,7 @@ function resetFrasi(){
|
|||
break;
|
||||
}
|
||||
}
|
||||
*/
|
||||
varsupel=$('<sup />')
|
||||
//varsupel.append(sentenceid.split('_')[3]+' ')
|
||||
varsupel.append(pnum+' ')
|
||||
|
|
Loading…
Reference in New Issue