diff --git a/js/cesareBrowse.js b/js/cesareBrowse.js index a1c4123..11555a5 100644 --- a/js/cesareBrowse.js +++ b/js/cesareBrowse.js @@ -623,7 +623,7 @@ $(" ."+formaClass).hover(function(idx, element) { function cleanSearchResult() { - $("#headingZero").css("display", "none"); + $("#headingZero").closest('.card') .css("display", "none"); $("#vistaFrasi").empty() $("#vistaFrasi").css("display", "none"); for (msid of listaPeriodiRisultato){ @@ -745,7 +745,8 @@ $(" ."+formaClass).hover(function(idx, element) { createSpanPeriodiTag(closeSTag, 'c', formaItem[2]-1, currSentenceId, elverso) currSentenceId=null } - elverso=createDivVersoNew(cantica, formaItem[3], 'Canto_' + formaItem[1]) + //elverso=createDivVersoNew(cantica, formaItem[3], 'Canto_' + formaItem[1]) + elverso=createDivVersoLI(cantica, formaItem[3], 'Canto_' + formaItem[1]) setVersiCanto.add(cantica+ "_" + formaItem[3] + "_" + 'Canto_' + formaItem[1]) } if(currSentenceId==null || currSentenceId != sentenceid){ @@ -816,11 +817,38 @@ $(" ."+formaClass).hover(function(idx, element) { } - function createDivVersoGeneric(cantica, num, canto) { + function createDivVersoLI(cantica, num, canto) { + var elementoverso = createDivVersoGenericLi(cantica, num, canto) + let cantoContainer=$('#' + cantica + canto); + elementoverso.appendTo(cantoContainer.find('ol')) + return elementoverso + + } + + function createDivVersoGenericLi(cantica, num, canto) { + //let digits=num.length + + var elementoverso = $('
  • ') + + elementoverso.attr("value", num) + + elementoverso.attr("style", "line-height: 1.0em") + + elementoverso.attr('class', 'f6 mb-2 text-muted text-nowrap font-weight-lighter '+cantica+' '+canto) + + elementoverso.attr('id', cantica + "_" + canto + "_" + num) + elementoverso.append('\xa0') + return elementoverso + } + + function createDivVersoGeneric(cantica, num, canto) { + var elementoverso = $('

    ') + var spannum=$('') spannum.append(num + ". ") + spannum.attr('class', 'numverso text-muted') elementoverso.append(spannum) //elementoverso.append(num + ". ") @@ -879,6 +907,10 @@ $(" ."+formaClass).hover(function(idx, element) { divcanto.attr('id', (cantica + canto).replace(" ", "_")) titolocanto.appendTo(divcanto) + //nuovo + var olversi=$('

      ') + olversi.appendTo(divcanto) + //fine nuovo divcanto.appendTo('#displaycanto') } } @@ -1025,7 +1057,7 @@ $(" ."+formaClass).hover(function(idx, element) { } //aggiunge badge con totale risultati nel bottone lista risultati if (totResultN>0){ - $("#headingZero").attr('style', 'display: d-flex;') + $("#headingZero").closest('.card') .attr('style', 'display: d-flex;') var spanbadgelista = $(''); spanbadgelista.attr('class', 'badge badge-primary badge-pill mx-2 lista-risultati'); spanbadgelista.append(totResultN+listIcon) @@ -1057,9 +1089,11 @@ $(" ."+formaClass).hover(function(idx, element) { console.log('badge end...') //aggiorna minimap + /* if (currentMinimap != '') { showMinimap() } + */ }); queryExecuted = true; diff --git a/js/syntgraph.js b/js/syntgraph.js index c712088..f03c6e2 100644 --- a/js/syntgraph.js +++ b/js/syntgraph.js @@ -4,7 +4,7 @@ import {Runtime, Library, Inspector} from "https://hdnlab1.isti.cnr.it/d3search/node_modules/commarcdiag/runtime.js"; import commarc from "https://hdnlab1.isti.cnr.it/d3search/node_modules/commarcdiag/index.js"; - +const iframe = document.getElementsByClassName("minimap__content"); const runtime1 = new Runtime(new Library(name => { console.log('name' +name) switch (name) { @@ -96,7 +96,7 @@ document.addEventListener("dblclick", function(e){ function resetMinimap(sentid){ - var iframe = document.getElementsByClassName("minimap__content"); + //var iframe = document.getElementsByClassName("minimap__content"); var iframeDocument = iframe[0].contentDocument || iframe[0].contentWindow.document; if (!iframeDocument) { @@ -115,7 +115,7 @@ function resetMinimap(sentid){ function updateMinimap(sentid){ - var iframe = document.getElementsByClassName("minimap__content"); + //var iframe = document.getElementsByClassName("minimap__content"); var iframeDocument = iframe[0].contentDocument || iframe[0].contentWindow.document; if (!iframeDocument) { diff --git a/js/utils.js b/js/utils.js index d7e5f3d..ef49267 100644 --- a/js/utils.js +++ b/js/utils.js @@ -236,8 +236,12 @@ WHERE { //colori + var colorssp = d3.scaleQuantize() .domain([0, 17]) + /*.range(["#1f78b4", "#a6cee3", "#b2df8a", "#33a02c", "#fb9a99", "#e31a1c", "#fdbf6f", "#ff7f00", + "#cab2d6", "#6a3d9a", "#ffff99", "#b15928", "#F46D43", + "#D53E4F", "#9E0142", "#e377c2", "#7f7f7f", "#bcbd22"]);*/ .range(["#3288bd", "#66c2a5", "#e41a1c", "#4daf4a", "#984ea3", "#d53e4f", "#f46d43", "#ABDDA4", "#E6F598", "#FFFFBF", "#FEE08B", "#FDAE61", "#F46D43", "#D53E4F", "#9E0142", "#e377c2", "#7f7f7f", "#bcbd22"]);