implementazione vista 'dialoghi'

This commit is contained in:
cesare 2024-01-04 15:32:24 +01:00
parent def872d683
commit 6d3ac4aa7d
2 changed files with 2648 additions and 2 deletions

View File

@ -92,7 +92,8 @@ $("#valoreVista").on('change', function() {
break;
case "dialoghi":
//loadDialoghi();
resetFrasi()
loadDialoghi();
break;
case "citazioni":
@ -279,6 +280,9 @@ $(" ."+formaClass).hover(function(idx, element) {
if (selectedVista=='frasi'){
loadFrasi();
}
if (selectedVista=='dialoghi'){
loadDialoghi();
}
addFormaListenersInCanto()
drawMinimap('#vistaFrasi', false)
@ -500,7 +504,9 @@ $(" ."+formaClass).hover(function(idx, element) {
if (selectedVista=='frasi'){
loadFrasi();
}
if (selectedVista=='dialoghi'){
loadDialoghi();
}
addFormaListenersInCanto();
@ -683,7 +689,29 @@ function loadClausola(idperiodo, funzionefrase, fromn, ton) {
})
}
function loadDialoghi() {
var aca='3'
if (cantoDisplayed.includes('Inferno'))
aca='1'
if (cantoDisplayed.includes('Purgatorio'))
aca='2'
for (const india in dialoghi){
//console.log(dialoghi[india]['Cnt'].replace('_so',''))
var diaclass=dialoghi[india]['Cnt'].replace('_so','')
if(diaclass.split('_')[0]!=aca)
continue;
$(cantoDisplayed).find(' .'+diaclass).each(function() {
//#1f78b4
$(this).css('color', '#1f78b4');
$(this).addClass("font-weight-bold ")
})
minim.contents().find(' .'+diaclass).each(function() {
$(this).css('color', '#1f78b4');
$(this).addClass("font-weight-bold ")
})
}
}
function loadFrasi() {
$(cantoDisplayed).find(' .sentencetag').each(function() {
@ -712,6 +740,7 @@ function resetFrasi(){
$(cantoDisplayed).find(' .'+formaClass).each(function() {
//console.log(colorssp(mapsynttypestopalette[stp]))
$(this).css('color', '');
$(this).removeClass('font-weight-bold')
})
//let minim=$(" .minimap__content")
minim.contents().find(" .sentencetag").each(function(){
@ -719,6 +748,7 @@ function resetFrasi(){
})
minim.contents().find(' .'+formaClass).each(function() {
$(this).css('color', '');
$(this).removeClass('font-weight-bold')
})
//evidenzio i periodi se unità di ricerca è impostato come periodo
if (listaPeriodiRisultato.length) {

File diff suppressed because it is too large Load Diff