From e1479209736f1c91784bf7deea72cc9f4f51f3c5 Mon Sep 17 00:00:00 2001 From: Luca Trupiano Date: Thu, 6 Oct 2022 13:26:18 +0200 Subject: [PATCH] cambiata notazione espressione logica nel json + WIP carica query --- js/script_Luk_Q.js | 349 ++++++++++++++++++++++++--------------------- 1 file changed, 189 insertions(+), 160 deletions(-) diff --git a/js/script_Luk_Q.js b/js/script_Luk_Q.js index 59adf19..4a1c276 100644 --- a/js/script_Luk_Q.js +++ b/js/script_Luk_Q.js @@ -108,23 +108,23 @@ $(document).ready(function() { var addClaN = $(this).attr('id'); switch (addClaN) { case "Grammaticale": - addGramCla(); + addGramCla(1); $('#cla' + tabID + '-tab').tab('show'); break; case "Sintattico": - addSyntCla(); + addSyntCla(1); $('#cla' + tabID + '-tab').tab('show'); break; case "Metafore": - addMetaCla(); + addMetaCla(0); $('#cla' + tabID + '-tab').tab('show'); break; case "Dialoghi": - addDialCla(); + addDialCla(0); $('#cla' + tabID + '-tab').tab('show'); break; case "Struttura": - addStruCla(); + addStruCla(0); $('#cla' + tabID + '-tab').tab('show'); break; case "andCond": @@ -163,7 +163,7 @@ $(document).ready(function() { }); // Evento: click sull'icona di refresh dei radio button - $('#cla-TabContent').on('click', '.radioRefresh', function() { + $('#cla-TabContent').on('click', '.radioReset', function() { fSet = $(this).siblings('fieldset'); if (fSet.find(":checked").length) { radioChecked = fSet.find(":checked")[0]; @@ -199,112 +199,9 @@ $(document).ready(function() { // Evento: SCELTA CATEGORIA GRAMMATICALE $('#cla-TabContent').on('change', 'select.catgram', function(e) { e.preventDefault(); - var tabPaneId = ($(this).closest('.tab-pane').attr("id")); - var dettagliBox = $(this).parent().parent().siblings(".dettaglifiltri"); - - dettagliBox.html(""); - var containerid = 'dettaglio_' + $(this).parent().parent().parent().attr("id") - - if (Object.keys(categorie).includes($(this).val())) { - var filtro = categorie[$(this).val()] - var keys = Object.keys(categorieJson[filtro]) - for (var key in keys) { - var vals = categorieJson[filtro][keys[key]] - switch (vals.length) { - case 2: - var element = $('
'); - element.attr('class', ' d-flex flex-nowrap pr-2 mb-1 col-8 form-group form-control justify-content-between'); - var rbfieldset = $('
'); - var flexdiv1 = $('
'); - var flexdiv2 = $('
'); - var input1 = $(''); - var input2 = $(''); - var label1 = $('