rif, in progress
This commit is contained in:
parent
49fe4d93eb
commit
fe9322e23c
|
@ -1,7 +1,7 @@
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
import { getVersiConCitazioni, queryRiferimenti, getListaRis} from './dataMgr.js';
|
import { getVersiConCitazioni, queryRiferimenti, getListaRis, cleanListaRis} from './dataMgr.js';
|
||||||
import { getJsonQuery, emptyStructCard } from './script_5.0.js';
|
import { getJsonQuery, emptyStructCard } from './script_5.0.js';
|
||||||
import {resetGraphStr} from './syntgraph_5.0.js'
|
import {resetGraphStr} from './syntgraph_5.0.js'
|
||||||
|
|
||||||
|
@ -554,7 +554,10 @@ $(document).ready(function() {
|
||||||
//$("#" + $(this).attr('name').replace(" ", "_")).css("display", "block");
|
//$("#" + $(this).attr('name').replace(" ", "_")).css("display", "block");
|
||||||
$("#" + $(this).attr('name').replace(" ", "_")).attr('style', 'display: d-flex;')
|
$("#" + $(this).attr('name').replace(" ", "_")).attr('style', 'display: d-flex;')
|
||||||
|
|
||||||
|
var telive=getListaRis()
|
||||||
|
for (var tel of telive){
|
||||||
|
$(tel).addClass("mark ")
|
||||||
|
}
|
||||||
|
|
||||||
drawMinimap("#" + $(this).attr('name').replace(" ", "_"), false)
|
drawMinimap("#" + $(this).attr('name').replace(" ", "_"), false)
|
||||||
|
|
||||||
|
@ -908,7 +911,7 @@ $(document).ready(function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
drawMinimap("#" + idminimap, false)
|
drawMinimap("#" + idminimap, false)
|
||||||
console.log (commentsSQL)
|
//console.log (commentsSQL)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1492,10 +1495,12 @@ $(document).ready(function() {
|
||||||
var telive=getListaRis()
|
var telive=getListaRis()
|
||||||
for (var ve of telive) {
|
for (var ve of telive) {
|
||||||
let idve = ve
|
let idve = ve
|
||||||
$(ve).removeClass("font-weight-bold mark ")
|
$(ve).removeClass("mark ")
|
||||||
minim.contents().find(ve).removeClass("font-weight-bold mark ")
|
minim.contents().find(ve).removeClass("mark ")
|
||||||
}
|
}
|
||||||
|
cleanListaRis()
|
||||||
drawMinimap(cantoDisplayed, true)
|
drawMinimap(cantoDisplayed, true)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*function manageMM(name) {
|
/*function manageMM(name) {
|
||||||
|
@ -1719,6 +1724,10 @@ $(document).ready(function() {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/*var telive=getListaRis()
|
||||||
|
for (var tel of telive){
|
||||||
|
$(tel).addClass("mark ")
|
||||||
|
}*/
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -59,14 +59,6 @@ rif_commentatori = result2.map((x) => x['Com']);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*rif_commentatori.sort((a, b) => {
|
|
||||||
var sre= (a.replace(/^\D+/g, '')-b.replace(/^\D+/g, ''))
|
|
||||||
console.log(sre)
|
|
||||||
return sre
|
|
||||||
})*/
|
|
||||||
//console.log(rif_commentatori)
|
|
||||||
|
|
||||||
|
|
||||||
var table = await conn.query(`
|
var table = await conn.query(`
|
||||||
select distinct CA from riferimenti order by CA;
|
select distinct CA from riferimenti order by CA;
|
||||||
`);
|
`);
|
||||||
|
@ -76,7 +68,7 @@ rif_areetematiche = result3.map((x) => x['CA']);
|
||||||
|
|
||||||
|
|
||||||
var table1 = await conn.query(`
|
var table1 = await conn.query(`
|
||||||
select distinct TiFo from riferimenti;
|
select distinct TiFo from riferimenti order by TiFo COLLATE NOCASE;
|
||||||
`);
|
`);
|
||||||
const result4 = table1.toArray().map((row) => row.toJSON());
|
const result4 = table1.toArray().map((row) => row.toJSON());
|
||||||
rif_fonti = result4.map((x) => x['TiFo']);
|
rif_fonti = result4.map((x) => x['TiFo']);
|
||||||
|
@ -88,6 +80,9 @@ console.log('done')
|
||||||
export function getListaRis(){
|
export function getListaRis(){
|
||||||
return listaidversi;
|
return listaidversi;
|
||||||
}
|
}
|
||||||
|
export function cleanListaRis(){
|
||||||
|
listaidversi=[];
|
||||||
|
}
|
||||||
export function getFontiS() {
|
export function getFontiS() {
|
||||||
|
|
||||||
return rif_fonti
|
return rif_fonti
|
||||||
|
@ -148,14 +143,22 @@ export async function queryRiferimenti(filtro, cid) {
|
||||||
queryfi += "Com like '%'"
|
queryfi += "Com like '%'"
|
||||||
if (filtro.Autore_Fonte != null && filtro.Autore_Fonte.trim() != 'all')
|
if (filtro.Autore_Fonte != null && filtro.Autore_Fonte.trim() != 'all')
|
||||||
queryfi += " and Aut='" + filtro.Autore_Fonte.trim() + "'"
|
queryfi += " and Aut='" + filtro.Autore_Fonte.trim() + "'"
|
||||||
|
if (filtro.Fonte != null && filtro.Fonte.trim() != 'all')
|
||||||
|
queryfi += " and TiFo='" + filtro.Fonte.trim() + "'"
|
||||||
|
|
||||||
|
if (filtro.Area_Tematica != null && filtro.Area_Tematica.trim() != 'all')
|
||||||
|
queryfi += " and CA='" + filtro.Area_Tematica.trim() + "'"
|
||||||
|
|
||||||
|
if (filtro.Tipo_Riferimento != null && filtro.Tipo_Riferimento.trim() != 'all')
|
||||||
|
queryfi += " and NaRi='" + filtro.Tipo_Riferimento.trim().toUpperCase() + "'"
|
||||||
|
|
||||||
var rs = await tconn.query(querytl + queryfi)
|
var rs = await tconn.query(querytl + queryfi)
|
||||||
var result4 = rs.toArray().map((row) => row.toJSON());
|
var result4 = rs.toArray().map((row) => row.toJSON());
|
||||||
|
|
||||||
await tconn.close();
|
await tconn.close();
|
||||||
var resxcantica = Object.groupBy(result4, ({ Cantica }) => Cantica);
|
var resxcantica = Object.groupBy(result4, ({ Cantica }) => Cantica);
|
||||||
|
|
||||||
|
listaidversi=[]
|
||||||
var numcid = cid.split('_')[1]
|
var numcid = cid.split('_')[1]
|
||||||
for (var cantica in resxcantica) {
|
for (var cantica in resxcantica) {
|
||||||
var $nctags = $(' .navig-canto')
|
var $nctags = $(' .navig-canto')
|
||||||
|
@ -183,10 +186,10 @@ export async function queryRiferimenti(filtro, cid) {
|
||||||
spanbadge.appendTo($nctags.filter('[name="' + cantica + 'Canto ' + canto + '"]'))
|
spanbadge.appendTo($nctags.filter('[name="' + cantica + 'Canto ' + canto + '"]'))
|
||||||
for (const tmpvi of tmpv) {
|
for (const tmpvi of tmpv) {
|
||||||
let myveid = '#' + cantica + '_Canto_' + canto + '_' + tmpvi.Verso.split('-')[0]
|
let myveid = '#' + cantica + '_Canto_' + canto + '_' + tmpvi.Verso.split('-')[0]
|
||||||
console.log(myveid)
|
//console.log(myveid)
|
||||||
listaidversi.push(myveid)
|
listaidversi.push(myveid)
|
||||||
if (cid.includes(cantica) && numcid == canto)
|
if (cid.includes(cantica) && numcid == canto)
|
||||||
$(myveid).addClass("font-weight-bold mark ")
|
$(myveid).addClass("mark ")
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue