gestione liste
This commit is contained in:
parent
4c7af575d8
commit
fa9aecd1e2
|
|
@ -228,7 +228,11 @@ $(" ."+formaClass).hover(function(idx, element) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
jQuery(document).delegate(' .lista-risultati', 'click', function(e) {
|
||||||
|
var cantica=$(this).siblings(' .btn-link')[0];
|
||||||
|
var canticaid=$(cantica).attr('id')
|
||||||
|
console.log('fava lista risultati '+canticaid)
|
||||||
|
});
|
||||||
|
|
||||||
jQuery(document).delegate('.navig-canto', 'click', function(e) {
|
jQuery(document).delegate('.navig-canto', 'click', function(e) {
|
||||||
resetFrasi()
|
resetFrasi()
|
||||||
|
|
@ -740,9 +744,10 @@ $(" ."+formaClass).hover(function(idx, element) {
|
||||||
let count = resultsInCantica.reduce((n, x) => n + (x === cantica), 0);
|
let count = resultsInCantica.reduce((n, x) => n + (x === cantica), 0);
|
||||||
if (count>0){
|
if (count>0){
|
||||||
var spanbadgecantica = $('<span />');
|
var spanbadgecantica = $('<span />');
|
||||||
spanbadgecantica.attr('class', 'badge badge-primary badge-pill ml-1');
|
spanbadgecantica.attr('class', 'badge badge-primary badge-pill ml-1 lista-risultati');
|
||||||
spanbadgecantica.append(count)
|
spanbadgecantica.append(count +' >')
|
||||||
spanbadgecantica.appendTo($('#cantica' + i))
|
//spanbadgecantica.appendTo($('#cantica' + i))
|
||||||
|
$('#cantica' + i).after(spanbadgecantica)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//aggiunge badge con totale risultati accanto ai canti
|
//aggiunge badge con totale risultati accanto ai canti
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@ document.addEventListener("dblclick", function(e){
|
||||||
if (name === "sentenceStructArcs")
|
if (name === "sentenceStructArcs")
|
||||||
return new Inspector(document.querySelector("#displayinfo"));
|
return new Inspector(document.querySelector("#displayinfo"));
|
||||||
});
|
});
|
||||||
main.redefine('width', 650);
|
main.redefine('width', 580);
|
||||||
main.redefine('height', 500);
|
main.redefine('height', 500);
|
||||||
|
|
||||||
//main.redefine("links", d3.csv("https://hdnlab1.isti.cnr.it/d3search/node_modules/commarcdiag/files/parsint_mod_completo_pre_new_4.csv", d3.autoType));
|
//main.redefine("links", d3.csv("https://hdnlab1.isti.cnr.it/d3search/node_modules/commarcdiag/files/parsint_mod_completo_pre_new_4.csv", d3.autoType));
|
||||||
|
|
|
||||||
77
js/utils.js
77
js/utils.js
|
|
@ -242,16 +242,20 @@ var colorssp = d3.scaleQuantize()
|
||||||
"#E6F598", "#FFFFBF", "#FEE08B", "#FDAE61", "#F46D43",
|
"#E6F598", "#FFFFBF", "#FEE08B", "#FDAE61", "#F46D43",
|
||||||
"#D53E4F", "#9E0142", "#e377c2", "#7f7f7f", "#bcbd22"]);
|
"#D53E4F", "#9E0142", "#e377c2", "#7f7f7f", "#bcbd22"]);
|
||||||
|
|
||||||
const mapsynttypestopalette={"Ma": 0, "SubI": 1, "SubII": 3, "SubIII": 4, "Co": 5,
|
const mapsynttypestopalette = {
|
||||||
|
"Ma": 0, "SubI": 1, "SubII": 3, "SubIII": 4, "Co": 5,
|
||||||
"CoI": 9, "CoII": 10, "SubIV": 5, "SubV": 6, "ParentethicalClause": 17,
|
"CoI": 9, "CoII": 10, "SubIV": 5, "SubV": 6, "ParentethicalClause": 17,
|
||||||
"CoIII": 11, "ParentheticalCo": 14, "PseudoCo": 16, "SubVI": 7, "CoIV": 12,
|
"CoIII": 11, "ParentheticalCo": 14, "PseudoCo": 16, "SubVI": 7, "CoIV": 12,
|
||||||
"CoV": 13, "ParentheticalCoI": 15, "SubVII": 8}
|
"CoV": 13, "ParentheticalCoI": 15, "SubVII": 8
|
||||||
|
}
|
||||||
|
|
||||||
const maptypes={"Ma": "Principale", "SubI": "Subordinata I grado", "SubII": "Subordinata II grado", "SubIII": "Subordinata III grado", "Co": "Coordinata",
|
const maptypes = {
|
||||||
|
"Ma": "Principale", "SubI": "Subordinata I grado", "SubII": "Subordinata II grado", "SubIII": "Subordinata III grado", "Co": "Coordinata",
|
||||||
"CoI": "Coordinata I grado", "CoII": "Coordinata II grado", "SubIV": "Subordinata IV grado", "SubV": "Subordinata V grado",
|
"CoI": "Coordinata I grado", "CoII": "Coordinata II grado", "SubIV": "Subordinata IV grado", "SubV": "Subordinata V grado",
|
||||||
"ParentethicalClause": "Parentetica", "CoIII": "Coordinata III grado", "ParentheticalCo": "Coordinata alla parentetica",
|
"ParentethicalClause": "Parentetica", "CoIII": "Coordinata III grado", "ParentheticalCo": "Coordinata alla parentetica",
|
||||||
"PseudoCo": "Pseudo-coordinata", "SubVI": "Subordinata VI grado", "CoIV": "Coordinata IV grado", "CoV": "Coordinata V grado",
|
"PseudoCo": "Pseudo-coordinata", "SubVI": "Subordinata VI grado", "CoIV": "Coordinata IV grado", "CoV": "Coordinata V grado",
|
||||||
"ParentheticalCoI": "Coordinata alla parentetica I grado", "SubVII": "Subordinata VII grado"}
|
"ParentheticalCoI": "Coordinata alla parentetica I grado", "SubVII": "Subordinata VII grado"
|
||||||
|
}
|
||||||
|
|
||||||
orlprefix = 'https://dantenetwork.it/ontology/orl/current/'
|
orlprefix = 'https://dantenetwork.it/ontology/orl/current/'
|
||||||
|
|
||||||
|
|
@ -259,11 +263,73 @@ syntitprefix='https://dantenetwork.it/ontology/syntit/current/'
|
||||||
|
|
||||||
//var stringInSparql= false;
|
//var stringInSparql= false;
|
||||||
|
|
||||||
|
/*
|
||||||
function writesparqlquery(query) {
|
function writesparqlquery(query) {
|
||||||
return (query);
|
return (query);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
function getFormaContext(formaid) {
|
||||||
|
var context = []
|
||||||
|
var cantica = 1;
|
||||||
|
var listaforme = formeprima;
|
||||||
|
var minpos = 0;
|
||||||
|
var offset = 0
|
||||||
|
var maxpos = 0;
|
||||||
|
|
||||||
|
|
||||||
|
if (parseInt(formaid) > 33373 && parseInt(formaid) < 66588) {
|
||||||
|
listaforme = formeseconda;
|
||||||
|
cantica = 2;
|
||||||
|
offset = 33374
|
||||||
|
}
|
||||||
|
if (parseInt(formaid) > 66587 && parseInt(formaid) < 99314) {
|
||||||
|
listaforme = formeterza;
|
||||||
|
cantica = 3;
|
||||||
|
offset = 66588
|
||||||
|
|
||||||
|
}
|
||||||
|
if (parseInt(formaid) > 99314 || parseInt(formaid) < 0){
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
maxpos = listaforme.length - 1
|
||||||
|
var pos = 0
|
||||||
|
for (i=0; i<listaforme.length; i++){
|
||||||
|
var tmpos=listaforme[i].split('_')[2]
|
||||||
|
if (tmpos==formaid){
|
||||||
|
pos=i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var item = listaforme[pos].split('_');
|
||||||
|
var numverso = item[3]
|
||||||
|
//var forma=item[0]
|
||||||
|
//var canto=item[1]
|
||||||
|
|
||||||
|
var contextinf = Math.max(minpos, parseInt(pos) - 30)
|
||||||
|
var contextsup = Math.min(maxpos, parseInt(pos) + 30)
|
||||||
|
for (j = contextinf; j < contextsup + 1; j++) {
|
||||||
|
var tmpform = listaforme[j].split('_');
|
||||||
|
if ((tmpform[3] > parseInt(numverso) - 2) && (tmpform[3] < parseInt(numverso) + 2)) {
|
||||||
|
var contextitem = {}
|
||||||
|
contextitem['testo'] = tmpform[0];
|
||||||
|
contextitem['verso'] = tmpform[3];
|
||||||
|
contextitem['canto'] = tmpform[1];
|
||||||
|
contextitem['cantica'] = cantica;
|
||||||
|
contextitem['posizione'] = tmpform[2];
|
||||||
|
contextitem['catg'] = tmpform[4];
|
||||||
|
contextitem['periodo'] = cantica + '_' + tmpform[1] + '_' + tmpform[5];
|
||||||
|
contextitem['funzperiodo'] = tmpform[6];
|
||||||
|
context.push(contextitem);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return context;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
//restituisce la query per ottenere tutti i versi di una cantica: NON USATA: RIMUOVERE
|
//restituisce la query per ottenere tutti i versi di una cantica: NON USATA: RIMUOVERE
|
||||||
|
|
||||||
|
|
@ -1120,7 +1186,8 @@ var syntgroup=` {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var funzione_clausola =
|
var funzione_clausola =
|
||||||
{"princ": "hasClauseFunction:MainClause",
|
{
|
||||||
|
"princ": "hasClauseFunction:MainClause",
|
||||||
"subord i": "hasClauseFunction:SubordinateClause",
|
"subord i": "hasClauseFunction:SubordinateClause",
|
||||||
"subord ii": "",
|
"subord ii": "",
|
||||||
"subord iii": "",
|
"subord iii": "",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue