visualizzazione frasi per lista risultati

This commit is contained in:
cesare 2023-02-27 09:21:07 +01:00
parent 822dcb0fcb
commit d157014b54
1 changed files with 6 additions and 65 deletions

View File

@ -43,7 +43,7 @@ $(document).ready(function() {
esprlogica = [] esprlogica = []
} }
hideMinimap(); //hideMinimap();
createAllDivCanti() createAllDivCanti()
//const start = performance.now(); //const start = performance.now();
showCanto(formeprima, '1','1') showCanto(formeprima, '1','1')
@ -66,26 +66,15 @@ $("#valoreVista").on('change', function() {
break; break;
case "frasi": case "frasi":
loadFrasi(); loadFrasi();
$("#vistaDialoghi").css("display", "none");
$("#vistaMetafore").css("display", "none");
//$(cantoDisplayed).css("display", "none");
//$("#vistaFrasi").attr('style', 'display: d-flex;');
break; break;
case "metafore": case "metafore":
//loadMetafore(); //loadMetafore();
//$("#vistaDialoghi").css("display", "none");
//$("#vistaFrasi").css("display", "none");
//resetFrasi()
//$(cantoDisplayed).css("display", "none");
//$("#vistaMetafore").attr('style', 'display: d-flex;');
break; break;
case "dialoghi": case "dialoghi":
//loadDialoghi(); //loadDialoghi();
//$("#vistaMetafore").css("display", "none");
//$("#vistaFrasi").css("display", "none");
//resetFrasi()
//$(cantoDisplayed).css("display", "none");
//$("#vistaDialoghi").attr('style', 'display: d-flex;');
break; break;
} }
}); });
@ -182,25 +171,6 @@ $(" ."+formaClass).hover(function(idx, element) {
}); });
/*
jQuery(document).delegate('#sentence', 'click', function(e) {
e.preventDefault();
sentenceId=$(this).attr('class').split(' ')[0].replace('$','')
console.log(sentenceId)
if (shownSentenceList.has(sentenceId)){
lisid=''
resetSentenceStructure(sentenceId)
shownSentenceList.delete(sentenceId)
}
else{
//showSentenceStructure (sentenceId)
shownSentenceList.add(sentenceId)
}
});
*/
//displayCantoWrapperId //displayCantoWrapperId
//$("#" + displayId).scroll(function() { //$("#" + displayId).scroll(function() {
@ -455,6 +425,7 @@ $(" ."+formaClass).hover(function(idx, element) {
//visualizzo //visualizzo
$("#vistaFrasi").attr('style', 'display: d-flex;'); $("#vistaFrasi").attr('style', 'display: d-flex;');
manageMM("#vistaFrasi") manageMM("#vistaFrasi")
cantoDisplayed = "#vistaFrasi";
}); });
@ -501,16 +472,13 @@ $(" ."+formaClass).hover(function(idx, element) {
//$("#" + $(this).attr('name').replace(" ", "_")).css("display", "block"); //$("#" + $(this).attr('name').replace(" ", "_")).css("display", "block");
$("#" + $(this).attr('name').replace(" ", "_")).attr('style', 'display: d-flex;') $("#" + $(this).attr('name').replace(" ", "_")).attr('style', 'display: d-flex;')
//drawMinimap("#" + $(this).attr('name').replace(" ", "_"))
manageMM("#" + $(this).attr('name').replace(" ", "_")) manageMM("#" + $(this).attr('name').replace(" ", "_"))
if (selectedVista=='frasi'){ if (selectedVista=='frasi'){
loadFrasi(); loadFrasi();
} }
addFormaListeners(); addFormaListeners();
}); });
@ -716,39 +684,12 @@ $(" ."+formaClass).hover(function(idx, element) {
sid = '.' + sentence.toString() sid = '.' + sentence.toString()
//console.log(sid) //console.log(sid)
$(sid).addClass('text-info font-italic') $(sid).addClass('text-info font-italic')
/*
$(sid).each(function(){
//console.log($(this).attr('class'))
if ($(this).attr('class').includes(' Ma ')){
$(this).addClass("text-primary font-weight-normal")
}
if ($(this).attr('class').includes(' Su ')){
$(this).addClass("text-info font-weight-normal")
}
if ($(this).attr('class').includes(' Co ')){
$(this).addClass("text-warning font-weight-normal")
}
if ($(this).attr('class').includes(' Pc ')){
$(this).addClass("text-success font-weight-normal")
}
if ($(this).attr('class').includes(' Pa ')){
$(this).addClass("text-secondary font-weight-normal")
}
})
*/
} }
function resetSentenceStructure(sentence) { function resetSentenceStructure(sentence) {
/*
$(" ." + sentence).removeClass('text-info font-weight-normal')
$(" ." + sentence).removeClass('text-primary font-weight-normal')
$(" ." + sentence).removeClass('text-secondary font-weight-normal')
$(" ." + sentence).removeClass('text-warning font-weight-normal')
$(" ." + sentence).removeClass('text-success font-weight-normal')
*/
$(" ." + sentence).removeClass('text-info font-italic') $(" ." + sentence).removeClass('text-info font-italic')
} }