gestione contesti query, bug fixing
This commit is contained in:
parent
8268a419fa
commit
71fb0c4c02
|
@ -18,6 +18,8 @@ export var listaClausoleRisultato;
|
||||||
export var numeroContesti;
|
export var numeroContesti;
|
||||||
export var cantoDisplayed;
|
export var cantoDisplayed;
|
||||||
export var showOffset = 30;
|
export var showOffset = 30;
|
||||||
|
export var graphTextReset;
|
||||||
|
|
||||||
const cantobadgeclass = 'badge badge-outline-warning badge-pill'
|
const cantobadgeclass = 'badge badge-outline-warning badge-pill'
|
||||||
const hdnNamespace = 'http://dantenetwork.it/data/commedia/'
|
const hdnNamespace = 'http://dantenetwork.it/data/commedia/'
|
||||||
const syntitNamespace = 'https://dantenetwork.it/ontology/syntit/current/'
|
const syntitNamespace = 'https://dantenetwork.it/ontology/syntit/current/'
|
||||||
|
@ -37,6 +39,7 @@ $(document).ready(function() {
|
||||||
var listaClausoleRisultatoContesti = []
|
var listaClausoleRisultatoContesti = []
|
||||||
|
|
||||||
var listaRisultatiCommenti = []
|
var listaRisultatiCommenti = []
|
||||||
|
graphTextReset= function(){manageResults()}
|
||||||
|
|
||||||
const sparqlGenerator = sparqljs.Generator;
|
const sparqlGenerator = sparqljs.Generator;
|
||||||
const myEngine = new Comunica.QueryEngine();
|
const myEngine = new Comunica.QueryEngine();
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
import commarc from "https://hdnlab1.isti.cnr.it/d3search/node_modules/commarcdiag/index.js";*/
|
import commarc from "https://hdnlab1.isti.cnr.it/d3search/node_modules/commarcdiag/index.js";*/
|
||||||
import {Runtime, Library, Inspector} from "https://lida.dantenetwork.it/node_modules/commarcdiag/runtime.js";
|
import {Runtime, Library, Inspector} from "https://lida.dantenetwork.it/node_modules/commarcdiag/runtime.js";
|
||||||
import commarc from "https://lida.dantenetwork.it/node_modules/commarcdiag/index.js";
|
import commarc from "https://lida.dantenetwork.it/node_modules/commarcdiag/index.js";
|
||||||
import {formaClass, lisid, lsentid, vistaPeriodi, listaPeriodiRisultato, listaClausoleRisultato, cantoDisplayed} from "./browseMgr_5.1.js"
|
import {formaClass, lisid, lsentid, vistaPeriodi, listaPeriodiRisultato, listaClausoleRisultato, cantoDisplayed, graphTextReset} from "./browseMgr_5.1.js"
|
||||||
import { fillStructCard, emptyStructCard } from "./script_5.1.js";
|
import { fillStructCard, emptyStructCard } from "./script_5.1.js";
|
||||||
|
|
||||||
const iframe = document.getElementsByClassName("minimap__content");
|
const iframe = document.getElementsByClassName("minimap__content");
|
||||||
|
@ -137,8 +137,8 @@ export function resetGraphStr(){
|
||||||
for (let i = 0; i < sentence.length; i++) {
|
for (let i = 0; i < sentence.length; i++) {
|
||||||
//var matches = listaClausoleRisultato.filter(s => s.includes(sentence[i].classList[0]));
|
//var matches = listaClausoleRisultato.filter(s => s.includes(sentence[i].classList[0]));
|
||||||
sentence[i].classList.remove('font-italic');
|
sentence[i].classList.remove('font-italic');
|
||||||
if (!vistaPeriodi && !listaPeriodiRisultato.includes(tmpsent)
|
/*if (!vistaPeriodi && !listaPeriodiRisultato.includes(tmpsent)
|
||||||
&& listaClausoleRisultato.filter(cl => cl.split('-')[0]==tmpsent).length==0)
|
&& listaClausoleRisultato.filter(cl => cl.split('-')[0]==tmpsent).length==0)*/
|
||||||
sentence[i].style.removeProperty('color');
|
sentence[i].style.removeProperty('color');
|
||||||
|
|
||||||
sentence[i].classList.remove('font-weight-normal');
|
sentence[i].classList.remove('font-weight-normal');
|
||||||
|
@ -160,7 +160,7 @@ export function resetGraphStr(){
|
||||||
}
|
}
|
||||||
//EMPTY CARD
|
//EMPTY CARD
|
||||||
emptyStructCard()
|
emptyStructCard()
|
||||||
|
graphTextReset()
|
||||||
if (tmpsent == lsentid) {
|
if (tmpsent == lsentid) {
|
||||||
|
|
||||||
return true
|
return true
|
||||||
|
|
|
@ -592,6 +592,18 @@ function buildSQ(stquery) {
|
||||||
}
|
}
|
||||||
console.log(tmpJ);
|
console.log(tmpJ);
|
||||||
buildSPQuery(tmpJ);
|
buildSPQuery(tmpJ);
|
||||||
|
if (filtroContesto.length > 0) {
|
||||||
|
for (tmpc of filtroContesto) {
|
||||||
|
console.log(filtroContesto[0])
|
||||||
|
multipleCondSpQuery.where.splice(1, 0, tmpc)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*if (stquery[clause]['queryText'].trim() == "") {
|
||||||
|
if (myquery.where[0].type == 'filter')
|
||||||
|
myquery.where.splice(0, 1)
|
||||||
|
}*/
|
||||||
|
|
||||||
|
}
|
||||||
return multipleCondSpQuery;
|
return multipleCondSpQuery;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue