gestione risultati come periodo
This commit is contained in:
parent
bc4502b4bf
commit
67eb044ef1
|
@ -90,6 +90,22 @@ function getRoman(numero) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function loadPeriodo(idperiodo) {
|
||||||
|
|
||||||
|
|
||||||
|
$(cantoDisplayed).find(' .'+idperiodo).each(function() {
|
||||||
|
var pstp=$(this).attr('class').split(" ")[1]
|
||||||
|
|
||||||
|
$(this).css('color', colorssp(mapsynttypestopalette[pstp]));
|
||||||
|
})
|
||||||
|
|
||||||
|
minim.contents().find(' .'+idperiodo).each(function() {
|
||||||
|
var mpstp=$(this).attr('class').split(" ")[1]
|
||||||
|
|
||||||
|
$(this).css('color', colorssp(mapsynttypestopalette[mpstp]));
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
function loadFrasi() {
|
function loadFrasi() {
|
||||||
|
|
||||||
$(cantoDisplayed).find(' .sentencetag').each(function() {
|
$(cantoDisplayed).find(' .sentencetag').each(function() {
|
||||||
|
@ -641,8 +657,9 @@ $(" ."+formaClass).hover(function(idx, element) {
|
||||||
$("#vistaFrasi").empty()
|
$("#vistaFrasi").empty()
|
||||||
$("#vistaFrasi").css("display", "none");
|
$("#vistaFrasi").css("display", "none");
|
||||||
for (msid of listaPeriodiRisultato){
|
for (msid of listaPeriodiRisultato){
|
||||||
$(msid).each(function(){
|
$('.'+msid).each(function(){
|
||||||
$(this).removeClass("font-weight-bold mark ")
|
//$(this).removeClass("font-weight-bold mark ")
|
||||||
|
$(this).css('color', '');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -753,9 +770,12 @@ $(" ."+formaClass).hover(function(idx, element) {
|
||||||
|
|
||||||
if (listaPeriodiRisultato.length){
|
if (listaPeriodiRisultato.length){
|
||||||
for (msid of listaPeriodiRisultato){
|
for (msid of listaPeriodiRisultato){
|
||||||
|
loadPeriodo(msid)
|
||||||
|
/*
|
||||||
$(msid).each(function(){
|
$(msid).each(function(){
|
||||||
$(this).addClass("font-weight-bold mark ")
|
$(this).addClass("font-weight-bold mark ")
|
||||||
});
|
});
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -980,22 +1000,25 @@ $(" ."+formaClass).hover(function(idx, element) {
|
||||||
|
|
||||||
cantiche = ["Inferno", "Purgatorio", "Paradiso"]
|
cantiche = ["Inferno", "Purgatorio", "Paradiso"]
|
||||||
|
|
||||||
if (!listarisultati.length || unitaRicerca=='frase'){
|
if (!listarisultati.length || unitaRicerca == 'frase') {
|
||||||
|
|
||||||
resultsInCantica=[]
|
resultsInCantica = []
|
||||||
resultsInCanto=[]
|
resultsInCanto = []
|
||||||
listaPeriodiRisultato=[]
|
listaPeriodiRisultato = []
|
||||||
if (listaclausole.length){
|
if (listaclausole.length) {
|
||||||
for (var frase of listaclausole){
|
for (var frase of listaclausole) {
|
||||||
var fraseItems=frase.split('-');
|
var fraseItems = frase.split('-');
|
||||||
for (var p=parseInt(fraseItems[1]); p<parseInt(fraseItems[2])+1;p++){
|
|
||||||
|
for (var p = parseInt(fraseItems[1]); p < parseInt(fraseItems[2]) + 1; p++) {
|
||||||
|
|
||||||
listarisultati.push(p)
|
listarisultati.push(p)
|
||||||
}
|
}
|
||||||
if (!resSent.has(fraseItems[0]+'-'+fraseItems[3])){
|
|
||||||
resSent.add(fraseItems[0]+'-'+fraseItems[3])
|
if (!resSent.has(fraseItems[0] + '-' + fraseItems[3])) {
|
||||||
|
resSent.add(fraseItems[0] + '-' + fraseItems[3])
|
||||||
resultsInCantica.push(fraseItems[4]);
|
resultsInCantica.push(fraseItems[4]);
|
||||||
resultsInCanto.push(fraseItems[4] + fraseItems[5])
|
resultsInCanto.push(fraseItems[4] + fraseItems[5])
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1011,11 +1034,15 @@ $(" ."+formaClass).hover(function(idx, element) {
|
||||||
console.log(mysid)
|
console.log(mysid)
|
||||||
//$(mysid).addClass('font-italic')
|
//$(mysid).addClass('font-italic')
|
||||||
//$(mysid).addClass("font-weight-bold mark ")
|
//$(mysid).addClass("font-weight-bold mark ")
|
||||||
listaPeriodiRisultato.push(mysid)
|
listaPeriodiRisultato.push(fraseItems[0].toString())
|
||||||
|
loadPeriodo(fraseItems[0].toString())
|
||||||
|
/*
|
||||||
$(mysid).each(function(){
|
$(mysid).each(function(){
|
||||||
//console.log('add id '+$(this).attr('id'));
|
//console.log('add id '+$(this).attr('id'));
|
||||||
listarisultati.push($(this).attr('id'))
|
listarisultati.push($(this).attr('id'))
|
||||||
|
|
||||||
});
|
});
|
||||||
|
*/
|
||||||
if (!resSent.has(fraseItems[0])){
|
if (!resSent.has(fraseItems[0])){
|
||||||
resSent.add(fraseItems[0])
|
resSent.add(fraseItems[0])
|
||||||
resultsInCantica.push(fraseItems[4]);
|
resultsInCantica.push(fraseItems[4]);
|
||||||
|
|
|
@ -237,6 +237,7 @@ WHERE {
|
||||||
//colori
|
//colori
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var colorssp = d3.scaleQuantize()
|
var colorssp = d3.scaleQuantize()
|
||||||
.domain([0, 17])
|
.domain([0, 17])
|
||||||
.range(["#1f78b4", "#a6cee3", "#b2df8a", "#33a02c", "#fb9a99", "#e31a1c", "#fdbf6f", "#ff7f00",
|
.range(["#1f78b4", "#a6cee3", "#b2df8a", "#33a02c", "#fb9a99", "#e31a1c", "#fdbf6f", "#ff7f00",
|
||||||
|
|
Loading…
Reference in New Issue