From b931517565d93ff42b96817f7d8ba656df416e7e Mon Sep 17 00:00:00 2001 From: cesare Date: Mon, 10 Oct 2022 13:12:29 +0200 Subject: [PATCH] overwrite --- js/script_Luk_Q.js | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/js/script_Luk_Q.js b/js/script_Luk_Q.js index 7902327..7ed6785 100644 --- a/js/script_Luk_Q.js +++ b/js/script_Luk_Q.js @@ -856,6 +856,7 @@ $(document).ready(function() { $("#sparqlquery").val(logicExprString); queryJson.EsprLogica = logicExprString.split(' '); queryJson.LogicaGui = guiLogicString.split(' '); + console.log(queryJson.LogicaGui); }; // Funzione di refresh dei collegamenti tra elementi sortable @@ -996,7 +997,7 @@ $(document).ready(function() { $("#cla" + tabID + " .catgram").val(selectedValue); addCatgramSubcla("cla" + tabID,selectedValue); var ks = Object.keys(queryJson["Clausola" + i]); - for (var j = 5; j < ks.length; j++) { +/* for (var j = 5; j < ks.length; j++) { switch ($("#cla" + i + ks[j])[0].type) { case "fieldset": var sval = queryJson["Clausola" + i][ks[j]] @@ -1008,6 +1009,20 @@ $(document).ready(function() { break; default: }; + }; */ + for (var j = 5; j < ks.length; j++) { + var test="cla" + i + ks[j]; + var melement = document.getElementById(test); + switch (melement.type) { + case "fieldset": + var sval = queryJson["Clausola" + i][ks[j]] + $("#cla" + tabID + sval.replace(/\s/g, '')).attr("checked",true); + break; + case "select-one": + melement.value=([queryJson["Clausola" + i][ks[j]]]) + break; + default: + }; }; }; break;