From edf5f8c11c20e1c4e49539a197b6cd5b92bc9640 Mon Sep 17 00:00:00 2001 From: Luca Trupiano Date: Mon, 21 Nov 2022 10:25:31 +0100 Subject: [PATCH] spostate clausole a dx, inizio adattamento clausole --- index_2.0.html | 151 +++++++++++++++++++++++------------------------ js/script_2.0.js | 40 +++++++++---- 2 files changed, 102 insertions(+), 89 deletions(-) diff --git a/index_2.0.html b/index_2.0.html index f4c258e..95ccd81 100644 --- a/index_2.0.html +++ b/index_2.0.html @@ -76,6 +76,15 @@ Risultati in formato... + @@ -84,11 +93,11 @@
-
-


+
+

-
+
-
+
-
+
- + -
- - - -
+
+
+
+
+ +
+ +
+
-
+
+ - +
@@ -682,10 +690,10 @@
Definisci i filtri usando le clausole e le condizioni logiche:
-
+
AND
    -
  • Nessuna clausola aggiunta.
  • +
  • Nessuna clausola aggiunta.
@@ -707,21 +715,21 @@
- - +
- +
- @@ -772,21 +780,21 @@
- - +
- +
-
- +
- @@ -1331,18 +1339,9 @@
-
- - -
- -
-
-
-
diff --git a/js/script_2.0.js b/js/script_2.0.js index 5bc90c3..9060cf7 100644 --- a/js/script_2.0.js +++ b/js/script_2.0.js @@ -10,16 +10,26 @@ require("../node_modules/bootstrap/dist/js/bootstrap.bundle.min.js"); $(document).ready(function() { - $("#advanSW").on('change', function() { - if ($(this).prop('checked')) { + + //$('#multidraggable1').multidraggable(); + $("#dropAdvanced").on('click', function () { + $("#simpleSearchDiv").removeClass( "d-flex" ) $("#simpleSearchDiv").attr('style', "display: none;"); $("#collapseOptions").collapse('hide'); + $("#collapseAdvanced").collapse('show'); + $("#advancedSearchDiv").addClass( "d-flex" ) $("#advancedSearchDiv").attr('style', "display: flex;"); - } else { - $("#simpleSearchDiv").attr('style', "display: flex;"); + //$("#tipoRicerca").html("Ricerca Avanzata"); + }); + + $("#dropSimple").on('click', function () { + $("#advancedSearchDiv").removeClass( "d-flex" ) $("#advancedSearchDiv").attr('style', "display: none;"); - } - }); + $("#simpleSearchDiv").addClass( "d-flex" ) + $("#simpleSearchDiv").attr('style', "display: flex;"); + $("#collapseAdvanced").collapse('hide'); + //$("#tipoRicerca").html("Ricerca Semplice"); + }); $("#copiaTesto").prop("disabled", true); @@ -178,10 +188,14 @@ $(document).ready(function() { $('#cla' + tabID + '-tab').tab('show'); break; case "andCond": - addLogicCond("AND","#sortable0") + addLogicCond("AND","#sortable0"); + refreshClaList(); + $('#cla0-tab').tab('show'); break; case "orCond": - addLogicCond("OR","#sortable0") + addLogicCond("OR","#sortable0"); + refreshClaList(); + $('#cla0-tab').tab('show'); break; default: }; @@ -452,10 +466,10 @@ $(document).ready(function() { var iconReset = '
'; var iconCloseCond = '
' + iconClose + '
'; var iconCheckAndClose = '
' + iconCheck + '  ' + iconClose + '
'; - var emptyClaList = '
  • Nessuna clausola aggiunta.
  • '; + var emptyClaList = '
  • Nessuna clausola aggiunta.
  • '; var claLIpart1 = '
  • \ + var claLIpart2 = '" class="claLI ml-4 my-1 p-1 list-group-item align-items-center border text-muted bg-white">
    \
    '; var claLIpart3 = '
    \
    ' + iconEdit + '
    ' + iconClose + '
    \ @@ -469,7 +483,7 @@ $(document).ready(function() { var condLIplaceholderText1d = 'Trascina qui almeno 1 clausola o condizione, oppure attiva le clausole inattive'; var condLIplaceholderText2d = 'Trascina qui almeno 2 clausole o condizioni, oppure attiva le clausole inattive'; var condLIplaceholderPart1 = '
  • '; + var condLIplaceholderPart2 = '" class="p-1 ml-4 mb-2 mt-1 list-group-item align-items-center border text-muted small bg-light ui-state-disabled ui-state-disabled-opacity-06">'; var condLIpart1 = '
    • AND
      ' + iconCloseCond + '
      ' + condLIplaceholderPart1; @@ -835,7 +849,7 @@ $(document).ready(function() { switch (claType) { case "Grammaticale": var gramSelect = $("#" + claId).find(".catgram"); - claText = len + ". Categoria grammaticale: " + gramSelect[0].options[gramSelect[0].selectedIndex].text + '
      '; + claText = '' + len + ". Categoria grammaticale: " + gramSelect[0].options[gramSelect[0].selectedIndex].text + '
      '; jsonTextToParse = jsonTextToParse + ', "' + gramSelect.attr('name') + '": "' + gramSelect[0].options[gramSelect[0].selectedIndex].value + '"'; var claSubParList = $("#" + claId).children(".dettaglifiltri").find("select, fieldset"); claSubParList.each(function(){ @@ -857,7 +871,7 @@ $(document).ready(function() { case "Sintattico": var syntSelect = $("#" + claId).find("#synttypes"); ; var funcSelect = $("#" + claId).find("#syntfunc"); - claText = len + ". Tipo sintattico: " + syntSelect[0].options[syntSelect[0].selectedIndex].text + ';
      Livello di subordinazione: ' + funcSelect[0].options[funcSelect[0].selectedIndex].text; + claText = '' + len + ". Tipo sintattico: " + syntSelect[0].options[syntSelect[0].selectedIndex].text + ';
      Livello di subordinazione: ' + funcSelect[0].options[funcSelect[0].selectedIndex].text; jsonTextToParse = jsonTextToParse + ', "' + syntSelect.attr('name') + '": "' + syntSelect[0].options[syntSelect[0].selectedIndex].value + '", "' + funcSelect.attr('name') + '": "' + funcSelect[0].options[funcSelect[0].selectedIndex].value + '"'; break; default: