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 cantoDisplayed;
|
||||
export var showOffset = 30;
|
||||
export var graphTextReset;
|
||||
|
||||
const cantobadgeclass = 'badge badge-outline-warning badge-pill'
|
||||
const hdnNamespace = 'http://dantenetwork.it/data/commedia/'
|
||||
const syntitNamespace = 'https://dantenetwork.it/ontology/syntit/current/'
|
||||
|
@ -37,7 +39,8 @@ $(document).ready(function() {
|
|||
var listaClausoleRisultatoContesti = []
|
||||
|
||||
var listaRisultatiCommenti = []
|
||||
|
||||
graphTextReset= function(){manageResults()}
|
||||
|
||||
const sparqlGenerator = sparqljs.Generator;
|
||||
const myEngine = new Comunica.QueryEngine();
|
||||
|
||||
|
@ -1769,7 +1772,7 @@ $(document).ready(function() {
|
|||
|
||||
}
|
||||
|
||||
function manageResults() {
|
||||
function manageResults() {
|
||||
if (listaPeriodiRisultato.length) {
|
||||
for (var msid of listaPeriodiRisultato) {
|
||||
loadPeriodo(msid)
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
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 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";
|
||||
|
||||
const iframe = document.getElementsByClassName("minimap__content");
|
||||
|
@ -137,14 +137,14 @@ export function resetGraphStr(){
|
|||
for (let i = 0; i < sentence.length; i++) {
|
||||
//var matches = listaClausoleRisultato.filter(s => s.includes(sentence[i].classList[0]));
|
||||
sentence[i].classList.remove('font-italic');
|
||||
if (!vistaPeriodi && !listaPeriodiRisultato.includes(tmpsent)
|
||||
&& listaClausoleRisultato.filter(cl => cl.split('-')[0]==tmpsent).length==0)
|
||||
/*if (!vistaPeriodi && !listaPeriodiRisultato.includes(tmpsent)
|
||||
&& listaClausoleRisultato.filter(cl => cl.split('-')[0]==tmpsent).length==0)*/
|
||||
sentence[i].style.removeProperty('color');
|
||||
|
||||
sentence[i].classList.remove('font-weight-normal');
|
||||
|
||||
}
|
||||
|
||||
|
||||
//reset Minimap
|
||||
var iframeDocument = myiframe[0].contentDocument || myiframe[0].contentWindow.document;
|
||||
if (!iframeDocument) {
|
||||
|
@ -160,7 +160,7 @@ export function resetGraphStr(){
|
|||
}
|
||||
//EMPTY CARD
|
||||
emptyStructCard()
|
||||
|
||||
graphTextReset()
|
||||
if (tmpsent == lsentid) {
|
||||
|
||||
return true
|
||||
|
|
|
@ -592,6 +592,18 @@ function buildSQ(stquery) {
|
|||
}
|
||||
console.log(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;
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue