aggiornata funzione makeUpGui

This commit is contained in:
Luca Trupiano 2022-10-10 12:56:31 +02:00
parent 3a4bcb3575
commit 4fa1641734
1 changed files with 16 additions and 1 deletions

View File

@ -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;