From 138e89032488dded69379c1d646613ffadcb8c52 Mon Sep 17 00:00:00 2001 From: cesare Date: Fri, 21 Apr 2023 12:39:37 +0200 Subject: [PATCH] modificata query cond sintattiche --- js/utils.js | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/js/utils.js b/js/utils.js index 4643662..4692351 100644 --- a/js/utils.js +++ b/js/utils.js @@ -423,17 +423,22 @@ function parseJsonClause(op, tokens, nowhere) { //alert(op) var idp = -1 if (nowhere[0].type == 'filter' && nowhere[0].expression.args[0].value == 'Rappresentazione') { - nowhere.splice(0, 1) + //nowhere.splice(0, 1) + nowhere.splice(0, 2) } if (op.trim() == 'OR') { - //nowhere.unshift(JSON.parse(unionop)['union']); - nowhere.splice(1, 0, JSON.parse(unionop)['union']) - idp = 1 + + //nowhere.splice(1, 0, JSON.parse(unionop)['union']) + nowhere.splice(0, 0, JSON.parse(unionop)['union']) + //idp = 1 + idp = 0 } if (op.trim() == 'AND') { - //nowhere.push(JSON.parse(unionop)['group']); - nowhere.splice(1, 0, JSON.parse(unionop)['group']) - idp = 1 + + //nowhere.splice(1, 0, JSON.parse(unionop)['group']) + nowhere.splice(0, 0, JSON.parse(unionop)['group']) + //idp = 1 + idp = 0 } for (var mtoken in tokens) {