contesti, in progress
This commit is contained in:
parent
036d1f5f28
commit
4545f129a5
20
js/utils.js
20
js/utils.js
|
@ -807,18 +807,23 @@ function buildFilterContextJson( contextcantiche) {
|
|||
|
||||
|
||||
|
||||
var contextfilter=[]
|
||||
var cantichecontextfilter=[]
|
||||
var cgroup=JSON.parse(contextgroup)
|
||||
filters=JSON.parse(filtercontexttemplate)
|
||||
cantichefilters=JSON.parse(filtercontextcantichetemplate)
|
||||
//var contextfilter=[]
|
||||
//var cantichecontextfilter=[]
|
||||
//var cgroup=JSON.parse(contextgroup)
|
||||
//filters=JSON.parse(filtercontexttemplate)
|
||||
//cantichefilters=JSON.parse(filtercontextcantichetemplate)
|
||||
|
||||
var canticheliteral=['Inferno', 'Purgatorio', 'Paradiso']
|
||||
|
||||
for (var ky in contextcantiche){
|
||||
for (var ky in contextcantiche){
|
||||
var contextfilter=[]
|
||||
var cantichecontextfilter=[]
|
||||
var cgroup=JSON.parse(contextgroup)
|
||||
if(contextcantiche.hasOwnProperty(ky)){
|
||||
console.log(`test ${ky} : ${contextcantiche[ky]}`)
|
||||
|
||||
var cfilter=JSON.parse(canticacontexttemplate);
|
||||
|
||||
cfilter['value']=canticheliteral[ky-1]
|
||||
cantichecontextfilter.push(cfilter)
|
||||
for (var kval in contextcantiche[ky]){
|
||||
|
@ -829,7 +834,10 @@ function buildFilterContextJson( contextcantiche) {
|
|||
}
|
||||
}
|
||||
if (contextfilter.length>0){
|
||||
var filters=JSON.parse(filtercontexttemplate)
|
||||
var cantichefilters=JSON.parse(filtercontextcantichetemplate)
|
||||
filters['expression']['args'].push(contextfilter)
|
||||
|
||||
//resfilters.push(filters)
|
||||
cgroup.patterns.splice(0,0,filters)
|
||||
cantichefilters['expression']['args'].push(cantichecontextfilter)
|
||||
|
|
Loading…
Reference in New Issue