Aggiunta definizione del contesto in ogni clausola, pulizie varie
This commit is contained in:
parent
cc8f7308b3
commit
c22f672602
|
@ -58,35 +58,16 @@ table {
|
|||
opacity: 0.6 !important;
|
||||
}
|
||||
|
||||
#selectable0 .ui-selecting { background: #4abd8c; }
|
||||
#selectable0 .ui-selected { background: #DEE2E6; color: #4abd8c !important; }
|
||||
#selectable0 { list-style-type: none; margin: 0; padding: 0; }
|
||||
|
||||
#selectable1 .ui-selecting { background: #3d6ca9; }
|
||||
#selectable1 .ui-selected { background: #dbe5f2; color: #3d6ca9; }
|
||||
#selectable1 { list-style-type: none; margin: 0; padding: 0; }
|
||||
|
||||
#selectable2 .ui-selecting { background: #4abd8c; }
|
||||
#selectable2 .ui-selected { background: #00968e; color: white; }
|
||||
#selectable2 { list-style-type: none; margin: 0; padding: 0; }
|
||||
|
||||
.ui-selectable .ui-selecting { background: #4abd8c; }
|
||||
.ui-selectable .ui-selected { background: #DEE2E6; color: #4abd8c !important; }
|
||||
.ui-selectable { list-style-type: none; margin: 0; padding: 0; }
|
||||
|
||||
.selCanti {
|
||||
border:6px solid #f8f9fa;
|
||||
border-collapse:collapse;
|
||||
padding:0px;
|
||||
}
|
||||
.selCanti th {
|
||||
border:6px solid #f8f9fa;
|
||||
text-align:center;
|
||||
padding:0px;
|
||||
}
|
||||
.selCanti td {
|
||||
border:6px solid #f8f9fa;
|
||||
text-align:center;
|
||||
padding:0px;
|
||||
background:#DBF5DB;
|
||||
width:20px;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
|
||||
|
|
|
@ -31,8 +31,10 @@
|
|||
<!-- <script src="https://cdn.datatables.net/1.12.1/js/jquery.dataTables.min.js" defer></script> -->
|
||||
<!-- <script type="text/javascript" src="./js/datatables.min.js" defer></script> -->
|
||||
<script type="text/javascript" src="./js/cesareBrowse.js"></script>
|
||||
<script type="text/javascript" src="./js/partext.js"></script>
|
||||
<script type="text/javascript" src="./js/partext.js"></script>
|
||||
<script type="text/javascript" src="./js/utils.js"></script>
|
||||
<script type="module" src="https://hdnlab1.isti.cnr.it/d3search/js/syntgraph.js"></script>
|
||||
<script src="https://hdnlab1.isti.cnr.it/d3search/node_modules/commarcdiag/d3.js"></script>
|
||||
<script type="text/javascript" src="https://bundle.run/sparqljs@3.4.1"></script>
|
||||
<script type="text/javascript" src="./js/lib/jquery.ui.touch-punch.js"></script>
|
||||
<script type="text/javascript" src="./js/lib/peg-0.10.0.min.js"></script>
|
||||
|
@ -414,7 +416,7 @@
|
|||
<div class="collapse" id="collapseOptions">
|
||||
<div class="col-12 p-0">
|
||||
<div class="card card-body bg-lida10 p-2">
|
||||
<div class="form-inline input-group" action="">
|
||||
<div class="form-inline input-group mb-2">
|
||||
<select class="form-control custom-select-sm text-muted bg-light monMe btn-outline-lida4"
|
||||
id="lemma_forma">
|
||||
<option value="forma">La forma</option>
|
||||
|
@ -430,32 +432,32 @@
|
|||
</select>
|
||||
</div>
|
||||
|
||||
<div class="border bg-light well m-0 mt-2" id="contextTableDivS">
|
||||
<div class="border bg-light well m-0" id="contextDiv0">
|
||||
|
||||
<div class="row no-gutters px-2 pt-0 pb-2 border border-lida4 rounded bg-lida10">
|
||||
<div id="contextTable-xX0" class="row no-gutters px-2 pt-0 pb-2 border border-lida4 rounded bg-lida10">
|
||||
<div class="col-12 pb-2 pt-0">
|
||||
<span class="small text-muted align-bottom" >Restringi il contesto di ricerca:</span>
|
||||
</div>
|
||||
<div class="col p-0">
|
||||
<div id="selectable0" class="ui-selectable ui-widget ui-helper-clearfix">
|
||||
<div id="selectable-xX0" class="ui-selectable ui-widget ui-helper-clearfix">
|
||||
<div class="card">
|
||||
<div class="card-header p-1" id="headingOne">
|
||||
<h6 class="mb-0">
|
||||
<div class="row no-gutters justify-content-between">
|
||||
<div class="col-auto flex-fill align-self-center text-muted">
|
||||
<button class="btn btn-sm btn-outline-lida4 bg-light btn-link border rounded py-0 my-1" id="cantica1"
|
||||
data-toggle="collapse" data-target="#collapseIn-1"
|
||||
aria-expanded="true" aria-controls="collapseIn-1"><span class="small text-lida4">Inferno</span></button>
|
||||
<button class="btn btn-sm btn-outline-lida4 bg-light btn-link border rounded py-0 my-1" id="cantica1-xX0"
|
||||
data-toggle="collapse" data-target="#collapseCa1-xX0"
|
||||
aria-expanded="true" aria-controls="collapseCa1-xX0"><span class="small text-lida4">Inferno</span></button>
|
||||
</div>
|
||||
<div class="col-auto pr-1 align-self-center justify-content-end text-right">
|
||||
<button id="plusBtn0-1" class="btn btn-sm btn-outline-lida4 bg-light addClaCont border rounded text-lida4 px-1 py-0"> +> </button>
|
||||
<button id="plusBtn0-xX0" class="btn btn-sm btn-outline-lida4 bg-light addClaCont border rounded text-lida4 px-1 py-0"> +> </button>
|
||||
</div>
|
||||
</div>
|
||||
</h6>
|
||||
</div>
|
||||
|
||||
<div id="collapseIn-1" class="collapse"
|
||||
aria-labelledby="headingOne" data-parent="#selectable0">
|
||||
<div id="collapseCa1-xX0" class="collapse"
|
||||
aria-labelledby="headingOne" data-parent="#selectable-xX0">
|
||||
<div class="card-body py-2">
|
||||
<div class="sel-canti-intro small text-muted pb-1">Seleziona i canti:</div>
|
||||
<span class="sel-canto border small text-muted nowrap" id="0_0"
|
||||
|
@ -534,18 +536,18 @@
|
|||
<h6 class="mb-0">
|
||||
<div class="row no-gutters justify-content-between">
|
||||
<div class="col-auto flex-fill align-self-center text-muted">
|
||||
<button class="btn btn-sm btn-outline-lida4 bg-light btn-link border rounded py-0 my-1" id="cantica2"
|
||||
data-toggle="collapse" data-target="#collapsePu-1"
|
||||
aria-expanded="true" aria-controls="collapsePu-1"><span class="small text-lida4">Purgatorio</span></button>
|
||||
<button class="btn btn-sm btn-outline-lida4 bg-light btn-link border rounded py-0 my-1" id="cantica2-xX0"
|
||||
data-toggle="collapse" data-target="#collapseCa2-xX0"
|
||||
aria-expanded="true" aria-controls="collapseCa2-xX0"><span class="small text-lida4">Purgatorio</span></button>
|
||||
</div>
|
||||
<div class="col-auto pr-1 align-self-center justify-content-end text-right">
|
||||
<button id="plusBtn1-1" class="btn btn-sm btn-outline-lida4 bg-light addClaCont border text-lida4 rounded px-1 py-0"> +> </button>
|
||||
<button id="plusBtn1-xX0" class="btn btn-sm btn-outline-lida4 bg-light addClaCont border text-lida4 rounded px-1 py-0"> +> </button>
|
||||
</div>
|
||||
</div>
|
||||
</h6>
|
||||
</div>
|
||||
<div id="collapsePu-1" class="collapse"
|
||||
aria-labelledby="headingTwo" data-parent="#selectable0">
|
||||
<div id="collapseCa2-xX0" class="collapse"
|
||||
aria-labelledby="headingTwo" data-parent="#selectable-xX0">
|
||||
<div class="card-body py-2">
|
||||
<div class="sel-canti-intro small text-muted pb-1">Seleziona i canti:</div>
|
||||
<span class="sel-canto border small text-muted nowrap" id="1_0"
|
||||
|
@ -622,18 +624,18 @@
|
|||
<h6 class="mb-0">
|
||||
<div class="row no-gutters justify-content-between">
|
||||
<div class="col-auto flex-fill align-self-center text-muted">
|
||||
<button class="btn btn-sm btn-outline-lida4 bg-light btn-link border rounded py-0 my-1" id="cantica3"
|
||||
data-toggle="collapse" data-target="#collapsePa-1"
|
||||
aria-expanded="true" aria-controls="collapsePa-1"><span class="small text-lida4">Paradiso</span></button>
|
||||
<button class="btn btn-sm btn-outline-lida4 bg-light btn-link border rounded py-0 my-1" id="cantica3-xX0"
|
||||
data-toggle="collapse" data-target="#collapseCa3-xX0"
|
||||
aria-expanded="true" aria-controls="collapseCa3-xX0"><span class="small text-lida4">Paradiso</span></button>
|
||||
</div>
|
||||
<div class="col-auto pr-1 align-self-center justify-content-end text-right">
|
||||
<button id="plusBtn2-1" class="btn btn-sm btn-outline-lida4 bg-light addClaCont border rounded text-lida4 px-1 py-0"> +> </button>
|
||||
<button id="plusBtn2-xX0" class="btn btn-sm btn-outline-lida4 bg-light addClaCont border rounded text-lida4 px-1 py-0"> +> </button>
|
||||
</div>
|
||||
</div>
|
||||
</h6>
|
||||
</div>
|
||||
<div id="collapsePa-1" class="collapse"
|
||||
aria-labelledby="headingThree" data-parent="#selectable0">
|
||||
<div id="collapseCa3-xX0" class="collapse"
|
||||
aria-labelledby="headingThree" data-parent="#selectable-xX0">
|
||||
<div class="card-body py-2">
|
||||
<div class="sel-canti-intro small text-muted pb-1">Seleziona i canti:</div>
|
||||
<span class="sel-canto border small text-muted nowrap" id="2_0"
|
||||
|
@ -709,22 +711,18 @@
|
|||
</div>
|
||||
|
||||
<div class="col p-0 ml-2 border bg-light text-muted">
|
||||
|
||||
<div class="row no-gutters p-0 justify-content-end">
|
||||
<div class="col p-2 align-self-start align-items-start justify-content-end text-right position-absolute" style="z-index: 1000">
|
||||
<button id="trashClaCont0" class="btn btn-sm btn-outline-lida4 bg-light trashClaCont border rounded text-lida4 px-1 pb-0" style="z-index: 1000"><ion-icon name="refresh-circle"></ion-icon></button>
|
||||
<button id="trashClaCont-xX0" class="btn btn-sm btn-outline-lida4 bg-light trashClaCont border rounded text-lida4 px-1 pb-0" style="z-index: 1000"><ion-icon name="refresh-circle"></ion-icon></button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row no-gutters p-1 justify-content-start">
|
||||
<div class="col-10 pr-3 pl-1 align-self-start justify-self-start text-muted small wrap" id="contextText0">
|
||||
<div class="col-10 pr-3 pl-1 align-self-start justify-self-start text-muted small wrap" id="contextText-xX0">
|
||||
Tutta l'opera
|
||||
</div>
|
||||
<div class="col-2 m-0 p-0">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -763,11 +761,11 @@
|
|||
<div
|
||||
class="row tab-content border bg-lida10 m-0 p-0"
|
||||
id="cla-TabContent">
|
||||
<div class="col-12">
|
||||
<div class="col-12 pt-2">
|
||||
<span class="small text-muted align-bottom pr-2" id="tipoRicerca">Definisci i filtri modificando le clausole e/o trascinandole nelle condizioni logiche:</span>
|
||||
</div>
|
||||
<div
|
||||
class="col-12 tab-pane fade show active px-1 py-2"
|
||||
class="col-12 tab-pane fade show active p-1 pb-2"
|
||||
id="cla0" role="tabpanel" aria-labelledby="cla0-tab">
|
||||
|
||||
<div
|
||||
|
@ -796,265 +794,6 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class=" p-2 m-2 border bg-light well"
|
||||
id="contextTableDiv0" style="display: none">
|
||||
|
||||
<table id="selectable1"
|
||||
class="table selCanti table-bordered table-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><div class="small text-dark text-right">Cantica\Canto </div></th>
|
||||
<th><div class="small text-dark">1</div></th>
|
||||
<th><div class="small text-dark">2</div></th>
|
||||
<th><div class="small text-dark">3</div></th>
|
||||
<th><div class="small text-dark">4</div></th>
|
||||
<th><div class="small text-dark">5</div></th>
|
||||
<th><div class="small text-dark">6</div></th>
|
||||
<th><div class="small text-dark">7</div></th>
|
||||
<th><div class="small text-dark">8</div></th>
|
||||
<th><div class="small text-dark">9</div></th>
|
||||
<th><div class="small text-dark">10</div></th>
|
||||
<th><div class="small text-dark">11</div></th>
|
||||
<th><div class="small text-dark">12</div></th>
|
||||
<th><div class="small text-dark">13</div></th>
|
||||
<th><div class="small text-dark">14</div></th>
|
||||
<th><div class="small text-dark">15</div></th>
|
||||
<th><div class="small text-dark">16</div></th>
|
||||
<th><div class="small text-dark">17</div></th>
|
||||
<th><div class="small text-dark">18</div></th>
|
||||
<th><div class="small text-dark">19</div></th>
|
||||
<th><div class="small text-dark">20</div></th>
|
||||
<th><div class="small text-dark">21</div></th>
|
||||
<th><div class="small text-dark">22</div></th>
|
||||
<th><div class="small text-dark">23</div></th>
|
||||
<th><div class="small text-dark">24</div></th>
|
||||
<th><div class="small text-dark">25</div></th>
|
||||
<th><div class="small text-dark">26</div></th>
|
||||
<th><div class="small text-dark">27</div></th>
|
||||
<th><div class="small text-dark">28</div></th>
|
||||
<th><div class="small text-dark">29</div></th>
|
||||
<th><div class="small text-dark">30</div></th>
|
||||
<th><div class="small text-dark">31</div></th>
|
||||
<th><div class="small text-dark">32</div></th>
|
||||
<th><div class="small text-dark">33</div></th>
|
||||
<th><div class="small text-dark">34</div></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th><div class="small text-dark text-right">Inferno </div></th>
|
||||
<td class="ui-widget-content" id="0_0"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="0_1"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="0_2"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="0_3"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="0_4"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="0_5"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="0_6"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="0_7"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="0_8"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="0_9"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="0_10"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="0_11"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="0_12"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="0_13"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="0_14"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="0_15"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="0_16"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="0_17"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="0_18"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="0_19"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="0_20"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="0_21"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="0_22"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="0_23"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="0_24"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="0_25"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="0_26"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="0_27"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="0_28"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="0_29"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="0_30"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="0_31"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="0_32"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="0_33"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><div class="small text-dark text-right">Purgatorio </div></th>
|
||||
<td class="ui-widget-content" id="1_0"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="1_1"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="1_2"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="1_3"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="1_4"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="1_5"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="1_6"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="1_7"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="1_8"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="1_9"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="1_10"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="1_11"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="1_12"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="1_13"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="1_14"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="1_15"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="1_16"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="1_17"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="1_18"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="1_19"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="1_20"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="1_21"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="1_22"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="1_23"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="1_24"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="1_25"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="1_26"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="1_27"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="1_28"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="1_29"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="1_30"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="1_31"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="1_32"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><div class="small text-dark text-right">Paradiso </div></th>
|
||||
<td class="ui-widget-content" id="2_0"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="2_1"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="2_2"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="2_3"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="2_4"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="2_5"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="2_6"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="2_7"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="2_8"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="2_9"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="2_10"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="2_11"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="2_12"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="2_13"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="2_14"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="2_15"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="2_16"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="2_17"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="2_18"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="2_19"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="2_20"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="2_21"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="2_22"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="2_23"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="2_24"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="2_25"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="2_26"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="2_27"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="2_28"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="2_29"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="2_30"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="2_31"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
<td class="ui-widget-content" id="2_32"><div
|
||||
class=" px-1 border well"> </div></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="cla-Advanced" style="display: d-flex">
|
||||
|
||||
<div class=" p-1 border bg-light well" id="cla-list">
|
||||
|
@ -1094,11 +833,11 @@
|
|||
|
||||
<!-- TIPO GRAMMATICALE -->
|
||||
<div style="display: none;"
|
||||
class="col-12 tab-pane p-0 pt-3 bg-white border-top"
|
||||
class="col-12 tab-pane px-0 bg-white border-top"
|
||||
id="tipogrammaticaleN" role="tabpanel"
|
||||
aria-labelledby="claN-tab" data-claType="Grammaticale"
|
||||
data-claActive="1">
|
||||
<div class="form-group form-inline input-group p-1 mb-1"
|
||||
<div class="form-group form-inline input-group border-bottom border-lida4 py-2 px-2 m-0"
|
||||
action="">
|
||||
<div class="input-group-prepend">
|
||||
<label class="input-group-text"><ion-icon
|
||||
|
@ -1124,9 +863,9 @@
|
|||
|
||||
<div class="form-group px-1 pb-1 mb-1">
|
||||
<label for="typeGramm0"
|
||||
class="text-muted control-label small">Categoria
|
||||
class="text-muted control-label small pl-1">Categoria
|
||||
grammaticale:</label>
|
||||
<div class="form-inline input-group" action="">
|
||||
<div class="form-inline input-group px-1" action="">
|
||||
<div class="input-group-prepend">
|
||||
<label class="input-group-text"><ion-icon
|
||||
name="options"></ion-icon></label>
|
||||
|
@ -1178,18 +917,17 @@
|
|||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container form-group mr-3 mb-0 p-1 dettaglifiltri">
|
||||
|
||||
</div>
|
||||
<div class="container form-group mr-3 mb-0 p-1 px-2 pb-0 dettaglifiltri"></div>
|
||||
<div class="border bg-light well m-0" id="contextDivN"></div>
|
||||
</div>
|
||||
<!-- FINE GRAMMATICALE -->
|
||||
|
||||
<!-- TIPO SINTATTICO -->
|
||||
<div style="display: none;"
|
||||
class="col-12 tab-pane p-0 pt-3 bg-white border-top" id="tiposintatticoN"
|
||||
class="col-12 tab-pane px-0 bg-white border-top" id="tiposintatticoN"
|
||||
role="tabpanel" aria-labelledby="claN-tab"
|
||||
data-claType="Sintattico" data-claActive="1">
|
||||
<div class="form-group form-inline input-group p-1 mb-1"
|
||||
<div class=" form-group form-inline input-group border-bottom border-lida4 py-2 px-2 m-0"
|
||||
action="">
|
||||
<div class="input-group-prepend">
|
||||
<label class="input-group-text"><ion-icon
|
||||
|
@ -1212,11 +950,11 @@
|
|||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group px-1 pb-1 mb-1">
|
||||
<div class="form-group px-1 pb-0 mb-1">
|
||||
<label for="typeSyntax0"
|
||||
class="text-muted control-label small">Tipo
|
||||
class="text-muted control-label small pl-1">Tipo
|
||||
sintattico:</label>
|
||||
<div class="form-inline input-group" action="">
|
||||
<div class="form-inline input-group px-1" action="">
|
||||
<div class="input-group-prepend">
|
||||
<label class="input-group-text"><ion-icon
|
||||
name="options"></ion-icon></label>
|
||||
|
@ -1823,9 +1561,9 @@
|
|||
</div>
|
||||
<div class="form-group px-1 pb-1 mb-2">
|
||||
<label for="functionSyntax"
|
||||
class="text-muted control-label small">Livello di
|
||||
class="text-muted control-label small pl-1">Livello di
|
||||
subordinazione:</label>
|
||||
<div class="form-inline input-group" action="">
|
||||
<div class="form-inline input-group px-1" action="">
|
||||
<div class="input-group-prepend">
|
||||
<label class="input-group-text"><ion-icon
|
||||
name="options"></ion-icon></label>
|
||||
|
@ -1872,6 +1610,8 @@
|
|||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="border bg-light well m-0" id="contextDivN"></div>
|
||||
</div>
|
||||
<!-- FINE TIPO SINTATTICO -->
|
||||
<div style="display: none;">
|
||||
|
@ -1916,25 +1656,23 @@
|
|||
class="col-auto pr-1 align-self-end align-items-end justify-content-end text-right position-absolute">
|
||||
<button id="claCollapsexX1Xx" class="btn btn-sm btn-link claCollBtn collapsed mr-2 px-4 pb-0 border border-lida4 btn-outline-lida4"
|
||||
data-toggle="collapse"
|
||||
data-target="#collapseCxX1Xx"
|
||||
data-target="#collapseClaxX1Xx"
|
||||
aria-expanded="false"
|
||||
aria-controls="collapseCxX1Xx">
|
||||
aria-controls="collapseClaxX1Xx">
|
||||
<ion-icon name="pencil"></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="collapseCxX1Xx" class="collapse"
|
||||
<div id="collapseClaxX1Xx" class="collapse"
|
||||
aria-labelledby="headingCxX1Xx"
|
||||
data-parent="#sortable0">
|
||||
<div class="card-body p-0 mx-1 mb-1 border border-lida4" id="claBodyxX1Xx" style="background-color: #edf9f3 !important;"></div>
|
||||
<div class="card-body p-0 mx-1 mb-1 border rounded border-lida4" id="claBodyxX1Xx" style="background-color: #edf9f3 !important;"></div>
|
||||
</div>
|
||||
</li>
|
||||
<!-- FINE LI CLAUSOLA -->
|
||||
|
||||
<!-- LI LOGICA
|
||||
<div class=" pb-1 small font-weight-bold text-muted">xX5Xx</div>
|
||||
-->
|
||||
<!-- LI LOGICA -->
|
||||
<li id="condxX4Xx" style="display: none;" class="condLI-xX5Xx mx-0 my-1 p-1 list-group-item align-items-center border text-muted bg-xX6Xx">
|
||||
<ul id="sortablexX4Xx" class="handle list-group ui-sortable">
|
||||
<div class="row ml-0 my-1 pr-2 justify-content-between">
|
||||
|
|
174
js/script_3.3.js
174
js/script_3.3.js
|
@ -12,8 +12,6 @@ var getJsonQuery;
|
|||
|
||||
$(document).ready(function() {
|
||||
|
||||
//$('#multidraggable1').multidraggable();
|
||||
|
||||
$("#dropAdvanced").on('click', function () {
|
||||
queryJson.QueryAvanzata = "1";
|
||||
$("#simpleSearchDiv").removeClass( "d-flex" )
|
||||
|
@ -33,6 +31,7 @@ $(document).ready(function() {
|
|||
$("#collapseAdvanced").collapse('hide');
|
||||
});
|
||||
|
||||
/**
|
||||
$("#copiaTesto").prop("disabled", true);
|
||||
|
||||
// Evento: click sul bottone di copia dei risultati testuali
|
||||
|
@ -41,6 +40,8 @@ $(document).ready(function() {
|
|||
});
|
||||
|
||||
$("#copiaQuery").prop("disabled", true);
|
||||
*/
|
||||
|
||||
|
||||
// Funzioni di gestione del comportamento dei bottoni collapse
|
||||
$('#collapseLogic').on('hidden.bs.collapse', function (e) {
|
||||
|
@ -66,8 +67,8 @@ $(document).ready(function() {
|
|||
})
|
||||
|
||||
$('.collapse').on('hide.bs.collapse', function (e) {
|
||||
if (e.target.id.substr(0,9) == "collapseC") {
|
||||
var claIdNum = e.target.id.substr(9);
|
||||
if (e.target.id.substr(0,11) == "collapseCla") {
|
||||
var claIdNum = e.target.id.substr(11);
|
||||
$("#claCollapse" + claIdNum)[0].removeAttribute("style");
|
||||
$("#claCollapse" + claIdNum).removeClass( "border-bottom-0" );
|
||||
$("#claCollapse" + claIdNum).addClass( "border border-lida4" );
|
||||
|
@ -76,8 +77,8 @@ $(document).ready(function() {
|
|||
})
|
||||
|
||||
$('.collapse').on('show.bs.collapse', function (e) {
|
||||
if (e.target.id.substr(0,9) == "collapseC") {
|
||||
var claIdNum = e.target.id.substr(9);
|
||||
if (e.target.id.substr(0,11) == "collapseCla") {
|
||||
var claIdNum = e.target.id.substr(11);
|
||||
$("#claCollapse" + claIdNum)[0].setAttribute("style", "background-color: #edf9f3 !important;border-bottom-left-radius: 0;border-bottom-right-radius: 0;");
|
||||
$("#claCollapse" + claIdNum).removeClass( "border border-lida4" );
|
||||
$("#claCollapse" + claIdNum).addClass( "border-bottom-0" );
|
||||
|
@ -85,7 +86,7 @@ $(document).ready(function() {
|
|||
};
|
||||
})
|
||||
|
||||
// Evento: click sulsullo switch di ricerca avanzata
|
||||
// Evento: click sullo switch di ricerca avanzata
|
||||
$('#searchToggle').on('change', function() {
|
||||
if ($(this).prop('checked')) {
|
||||
queryJson.QueryAvanzata = "1";
|
||||
|
@ -112,20 +113,22 @@ $(document).ready(function() {
|
|||
handle: ".handle"
|
||||
});
|
||||
|
||||
// Inizializza selectable0 e definisce le funzioni
|
||||
$("#selectable0").selectable({
|
||||
// Inizializza selectable-xX0 e definisce le funzioni
|
||||
$("#selectable-xX0").selectable({
|
||||
filter: ".sel-canto",
|
||||
selected: function(event, ui) {
|
||||
window.context0[ui.selected.id.substring(0,1)][ui.selected.id.substring(2)] = 1;
|
||||
var tmpFocusBtn = "#plusBtn" + ui.selected.id.substring(0,1) + "-1"
|
||||
var tmpFocusBtn = "#plusBtn" + ui.selected.id.substring(0,1) + "-xX" + tabID;
|
||||
$(tmpFocusBtn).focus();
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
// Evento: click sul bottone di copia della query
|
||||
$("#copiaQuery").on("click", function(){
|
||||
$('#sparqlquery').copy2clipboard();
|
||||
});
|
||||
*/
|
||||
|
||||
// Evento: modifica di un campo clausole
|
||||
$("form #lemma_forma,#queryText,#opzioni_testo").on('change', function() {
|
||||
|
@ -149,6 +152,7 @@ $(document).ready(function() {
|
|||
claListLen--;
|
||||
$("#" + claListItemId)[0].remove();
|
||||
delete queryJson["Clausola" + claIdNum];
|
||||
delete window["context" + claIdNum];
|
||||
refreshClaList();
|
||||
refreshSortables();
|
||||
});
|
||||
|
@ -243,22 +247,21 @@ $(document).ready(function() {
|
|||
});
|
||||
|
||||
// Evento: click sull'icona di trash del contesto
|
||||
$('.trashClaCont').on('click', function() {
|
||||
var claIdNum = $(this)[0].id.substring(12);
|
||||
$('#rigaRicerca').on('click', '.trashClaCont', function() {
|
||||
var claIdNum = $(this)[0].id.substring(15);
|
||||
resetContext(claIdNum);
|
||||
});
|
||||
|
||||
// Evento: click sull'icona di add del contesto
|
||||
$('.addClaCont').on('click', function() {
|
||||
var claIdNum = $(this).closest('.ui-selectable').attr('id').substr(10);
|
||||
$('#rigaRicerca').on('click', '.addClaCont', function() {
|
||||
var claIdNum = $(this).closest('.ui-selectable').attr('id').substr(13);
|
||||
var selectedCanti = $(this).closest('.card').find('.ui-selected');
|
||||
if (selectedCanti.length == 0) {
|
||||
$(this).closest('.card').find('.ui-selectee').each(function() {
|
||||
$(this).addClass( "ui-selected" );
|
||||
eval('window.context' + claIdNum + '[$(this).attr("id").substring(0,1)][$(this).attr("id").substring(2)] = 1');
|
||||
window["context" + claIdNum][$(this).attr("id").substring(0,1)][$(this).attr("id").substring(2)] = 1;
|
||||
});
|
||||
};
|
||||
var context = window["context" + claIdNum];
|
||||
parseContext(claIdNum);
|
||||
hideContextCanti(claIdNum);
|
||||
if ($(this).closest('.card').find('span:visible').length == 1) {
|
||||
|
@ -303,29 +306,6 @@ $(document).ready(function() {
|
|||
e.preventDefault();
|
||||
});
|
||||
|
||||
// Evento: click sui bottoni Cerca
|
||||
/**
|
||||
|
||||
$("form #searchcomm,#searchcomm2").on('click', function(e) {
|
||||
e.preventDefault();
|
||||
var qText = $("form #queryText")[0].value;
|
||||
if (qText == "" && logicExprString == "") {
|
||||
alert("Inserire un termine di ricerca od una clausola attiva!");
|
||||
return false;
|
||||
}
|
||||
const sparqlGenerator = sparqljs.Generator;
|
||||
jsonQuery = buildSQ(queryJson);
|
||||
//queryFields = [];
|
||||
//for (var i in jsonQuery.variables) {
|
||||
// queryFields.push(jsonQuery.variables[i].variable.value);
|
||||
//}
|
||||
console.log(jsonQuery);
|
||||
//execQuery = new sparqlGenerator().stringify(jsonQuery);
|
||||
//executeQuery();
|
||||
return false;
|
||||
});
|
||||
*/
|
||||
|
||||
// Evento: click sul checkbox di Ricerca avanzata
|
||||
$('#cla-TabContent').on('click', '#advanSW', function() {
|
||||
if ($(this).prop('checked')) {
|
||||
|
@ -337,8 +317,9 @@ $(document).ready(function() {
|
|||
//resetAdvGui();
|
||||
}
|
||||
});
|
||||
|
||||
// Evento: click sul checkbox di Definisci contesto
|
||||
|
||||
/**
|
||||
// Evento: click sul checkbox di Definisci contesto NON UTILIZZATA
|
||||
$('#cla-TabContent').on('click', '#contextSW', function() {
|
||||
if ($(this).prop('checked')) {
|
||||
$("#contextTableDiv0").attr('style', "display: flex;");
|
||||
|
@ -348,6 +329,7 @@ $(document).ready(function() {
|
|||
//queryJson.QueryAvanzata = "0";
|
||||
}
|
||||
});
|
||||
*/
|
||||
|
||||
// Evento: click sul bottone di reset semplice
|
||||
$('#cleanresult').on('click', function() {
|
||||
|
@ -524,24 +506,24 @@ $(document).ready(function() {
|
|||
var condLIplaceholderPart1 = '<li id="placeholderSort';
|
||||
var condLIplaceholderPart2 = '" class="mx-0 my-1 p-1 pl-3 list-group-item align-items-center border text-muted small bg-light ui-state-disabled ui-state-disabled-opacity-06">';
|
||||
|
||||
// Variabili funzionali
|
||||
// Variabili e costanti funzionali
|
||||
var tabID = 0;
|
||||
var claListLen = 0;
|
||||
var condListLen = 0;
|
||||
var logicExprString = ``;
|
||||
var guiLogicString = ``;
|
||||
var execQuery = ``;
|
||||
var queryFields = []; // Contiene le intestazioni di colonna della tabella dei risultati
|
||||
var contextE = [[],[],[]];
|
||||
var jsonContext0 = JSON.stringify(contextE);
|
||||
window.context0 = [[],[],[]];
|
||||
var canticheList = ["Inferno","Purgatorio","Paradiso"];
|
||||
const cc0 = new Array(34).fill(0);
|
||||
const cc1 = new Array(33).fill(0);
|
||||
const cc2 = new Array(33).fill(0);
|
||||
const contextEmpty = [cc0,cc1,cc2];
|
||||
const canticheList = ["Inferno","Purgatorio","Paradiso"];
|
||||
var queryJson = JSON.parse('{"EsprLogica":"", "LogicaGui":"", "QueryAvanzata": "0"}');
|
||||
const newGramJsonText = '{"queryText": "", "lemma_forma": "forma", "opzioni_testo": "parola", "TipoClausola": "Grammaticale", "Attiva": "1", "typeGramm0": "all"}';
|
||||
const newSyntJsonText = '{"queryText": "", "lemma_forma": "forma", "opzioni_testo": "parola", "TipoClausola": "Sintattico", "Attiva": "1", "typeSyntax0": ".+", "functionSyntax": ".+"}';
|
||||
queryJson.LiDaVersion = "1.0";
|
||||
queryJson.Clausola0 = JSON.parse('{"queryText": "", "lemma_forma": "lemma", "opzioni_testo": "parola", "TipoClausola": "0", "Attiva": "0"}');
|
||||
queryJson.Clausola0.contesto = context0;
|
||||
queryJson.Clausola1 = JSON.parse('{"queryText": "", "lemma_forma": "lemma", "opzioni_testo": "parola", "TipoClausola": "0", "Attiva": "0"}');
|
||||
queryJson.Clausola1.contesto = context0;
|
||||
queryJson.Clausola0.contesto = JSON.stringify(contextEmpty);
|
||||
window.context0 = JSON.parse(JSON.stringify(contextEmpty));
|
||||
const myEngine = new Comunica.QueryEngine();
|
||||
const sparqlEndpoint = "https://hdnlab1.isti.cnr.it/fuseki/commediaontosintgra/query";
|
||||
const jsonReplacer = (key, value) =>
|
||||
|
@ -553,6 +535,7 @@ $(document).ready(function() {
|
|||
return queryJson;
|
||||
}
|
||||
|
||||
/**
|
||||
async function executeQuery(){
|
||||
$("#loader").show();
|
||||
bindingsStream = await myEngine.queryBindings(execQuery, { sources: [ { type: 'sparql', value: sparqlEndpoint }, ], });
|
||||
|
@ -618,10 +601,10 @@ $(document).ready(function() {
|
|||
$("#loader").hide();
|
||||
};
|
||||
};
|
||||
*/
|
||||
|
||||
// Funzione di creazione del tab delle clausole grammaticali
|
||||
function addGramCla(active,tabID){
|
||||
window["context" + tabID] = [[],[],[]]; // ricordarsi il delete
|
||||
if (active > 0) {
|
||||
var checkInsert = ' checked="checked"';
|
||||
} else {
|
||||
|
@ -630,18 +613,20 @@ $(document).ready(function() {
|
|||
var sortableId = "#sortable0";
|
||||
var claText = "Categoria grammaticale: <br>";
|
||||
addLIitem(sortableId,tabID,claText,checkInsert);
|
||||
var clone = document.getElementById("tipogrammaticaleN").cloneNode(true);
|
||||
clone.setAttribute("id","cla" + tabID);
|
||||
clone.setAttribute("data-claActive", active);
|
||||
clone.setAttribute("aria-labelledby","cla" + tabID + "-tab");
|
||||
clone.setAttribute("style", "background-color: #edf9f3 !important;");
|
||||
//clone.removeAttribute("style");
|
||||
$('#claBody' + tabID).append(clone);
|
||||
var claClone = document.getElementById("tipogrammaticaleN").cloneNode(true);
|
||||
claClone.setAttribute("id","cla" + tabID);
|
||||
claClone.setAttribute("data-claActive", active);
|
||||
claClone.setAttribute("aria-labelledby","cla" + tabID + "-tab");
|
||||
claClone.setAttribute("style", "background-color: #edf9f3 !important;");
|
||||
$('#claBody' + tabID).append(claClone);
|
||||
// se non cambio l'id della select react non rileva l'evento onchange:
|
||||
$('#cla' + tabID + " #grammtypesN").attr("id","grammtypes" + tabID);
|
||||
$('#cla' + tabID + " #lemma_formaN").attr("id","lemma_forma" + tabID);
|
||||
$('#cla' + tabID + " #queryTextN").attr("id","queryText" + tabID);
|
||||
$('#cla' + tabID + " #opzioni_testoN").attr("id","opzioni_testo" + tabID);
|
||||
$('#cla' + tabID + " #contextDivN").attr("id","contextDiv" + tabID);
|
||||
queryJson["Clausola" + tabID] = JSON.parse(newGramJsonText);
|
||||
addClaContext(tabID);
|
||||
}
|
||||
|
||||
// Funzione di creazione delle subclausole grammaticali basate sul valore scelto
|
||||
|
@ -679,8 +664,8 @@ $(document).ready(function() {
|
|||
input2.attr('value', vals[1]);
|
||||
input1.attr('name', tabPaneId + keys[key]);
|
||||
input2.attr('name', tabPaneId + keys[key]);
|
||||
label1.attr('class', 'custom-control-label form-control-sm custom-control-inline m-0 pl-1');
|
||||
label2.attr('class', 'custom-control-label form-control-sm custom-control-inline m-0 pl-1');
|
||||
label1.attr('class', 'custom-control-label form-control-sm custom-control-inline m-0 pl-1 text-muted');
|
||||
label2.attr('class', 'custom-control-label form-control-sm custom-control-inline m-0 pl-1 text-muted');
|
||||
label1.attr('for', tabPaneId + vals[0].replace(/\s/g, ''));
|
||||
label2.attr('for', tabPaneId + vals[1].replace(/\s/g, ''));
|
||||
label1.append(vals[0]);
|
||||
|
@ -713,7 +698,7 @@ $(document).ready(function() {
|
|||
input1.attr('id', tabPaneId + vals[0].replace(/\s/g, ''));
|
||||
input1.attr('value', vals[0]);
|
||||
input1.attr('name', keys[key]);
|
||||
label1.attr('class', 'custom-control-label form-control-sm custom-control-inline m-0 pl-1');
|
||||
label1.attr('class', 'custom-control-label form-control-sm custom-control-inline m-0 pl-1 text-muted');
|
||||
label1.attr('for', tabPaneId + vals[0].replace(/\s/g, ''));
|
||||
label1.append(vals[0]);
|
||||
|
||||
|
@ -760,16 +745,18 @@ $(document).ready(function() {
|
|||
var sortableId = "#sortable0";
|
||||
var claText = "Tipo sintattico: <br>";
|
||||
addLIitem(sortableId,tabID,claText,checkInsert);
|
||||
var clone = document.getElementById("tiposintatticoN").cloneNode(true);
|
||||
clone.setAttribute("id","cla" + tabID);
|
||||
clone.setAttribute("data-claActive",active);
|
||||
clone.setAttribute("aria-labelledby","cla" + tabID + "-tab");
|
||||
clone.setAttribute("style", "background-color: #edf9f3 !important;");
|
||||
//clone.removeAttribute("style");
|
||||
$('#claBody' + tabID).append(clone);
|
||||
var claClone = document.getElementById("tiposintatticoN").cloneNode(true);
|
||||
claClone.setAttribute("id","cla" + tabID);
|
||||
claClone.setAttribute("data-claActive",active);
|
||||
claClone.setAttribute("aria-labelledby","cla" + tabID + "-tab");
|
||||
claClone.setAttribute("style", "background-color: #edf9f3 !important;");
|
||||
$('#claBody' + tabID).append(claClone);
|
||||
$('#cla' + tabID + " #lemma_formaN").attr("id","lemma_forma" + tabID);
|
||||
$('#cla' + tabID + " #queryTextN").attr("id","queryText" + tabID);
|
||||
$('#cla' + tabID + " #opzioni_testoN").attr("id","opzioni_testo" + tabID);
|
||||
$('#cla' + tabID + " #contextDivN").attr("id","contextDiv" + tabID);
|
||||
queryJson["Clausola" + tabID] = JSON.parse(newSyntJsonText);
|
||||
addClaContext(tabID);
|
||||
}
|
||||
|
||||
// Funzione di creazione del tab delle clausole metafore
|
||||
|
@ -785,6 +772,24 @@ $(document).ready(function() {
|
|||
addLIitem(sortableId,tabID,claText,checkInsert);
|
||||
}
|
||||
|
||||
// Funzione di creazione della parte di definizione del contesto delle clausole
|
||||
function addClaContext(tabID){
|
||||
var contClone = document.getElementById("contextTable-xX0").cloneNode(true);
|
||||
contClone.setAttribute("style", "background-color: #edf9f3 !important;");
|
||||
contClone.setAttribute("class","row no-gutters px-2 pt-0 pb-2 border-top border-lida4");
|
||||
contClone = contClone.outerHTML.replace(/xX0/g, "xX" + tabID)
|
||||
$("#contextDiv" + tabID).append($(contClone)[0]);
|
||||
resetContext(tabID);
|
||||
$("#selectable-xX" + tabID).selectable({
|
||||
filter: ".sel-canto",
|
||||
selected: function(event, ui) {
|
||||
window["context" + tabID][ui.selected.id.substring(0,1)][ui.selected.id.substring(2)] = 1;
|
||||
var tmpFocusBtn = "#plusBtn" + ui.selected.id.substring(0,1) + "-xX" + tabID;
|
||||
$(tmpFocusBtn).focus();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
// Funzione di creazione del LI delle condizioni logiche
|
||||
function addLogicCond(condtype,sortableId){
|
||||
condListLen++;
|
||||
|
@ -836,6 +841,7 @@ $(document).ready(function() {
|
|||
var claActive = 1
|
||||
};
|
||||
queryJson.Clausola0 = JSON.parse('{"queryText": "' + qText + '", "lemma_forma": "' + l_f + '", "opzioni_testo": "' + optText + '", "TipoClausola": "0", "Attiva": "' + claActive + '"}');
|
||||
queryJson.Clausola0.contesto = JSON.stringify(window.context0);
|
||||
var tabsContent = $("#sortable0").find(".claLI");
|
||||
if ($(tabsContent).length) {
|
||||
if ($("#li-cla0")[0]) {
|
||||
|
@ -935,6 +941,7 @@ $(document).ready(function() {
|
|||
addLIitem(sortableId,claIdNum,claText,checkInsert);
|
||||
};
|
||||
queryJson["Clausola" + claIdNum] = JSON.parse(jsonTextToParse + '}');
|
||||
queryJson["Clausola" + claIdNum].contesto = JSON.stringify(window["context" + claIdNum]);
|
||||
};
|
||||
|
||||
// Funzione di refresh dei placeholders e attivazione/disattivazione bottoni nelle liste sortable
|
||||
|
@ -1018,7 +1025,6 @@ $(document).ready(function() {
|
|||
});
|
||||
logicExprString = parseCond("#sortable0", "AND", 0);
|
||||
guiLogicString = parseCond("#sortable0", "AND", 1);
|
||||
//$("#sparqlquery").val(logicExprString);
|
||||
queryJson.EsprLogica = logicExprString.split(' ');
|
||||
queryJson.LogicaGui = guiLogicString.split(' ');
|
||||
};
|
||||
|
@ -1085,12 +1091,13 @@ $(document).ready(function() {
|
|||
};
|
||||
|
||||
function hideContextCanti(claIdNum) {
|
||||
$('#selectable' + claIdNum + " .ui-selected").each(function() {
|
||||
$('#selectable-xX' + claIdNum + " .ui-selected").each(function() {
|
||||
$(this).attr('style', "display: none;");
|
||||
$(this).removeClass( "ui-selected" )
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
$.fn.copy2clipboard = function() {
|
||||
$('div[id^="msgCopiati"]').remove();
|
||||
this.select();
|
||||
|
@ -1099,6 +1106,7 @@ $(document).ready(function() {
|
|||
document.getSelection().removeAllRanges();
|
||||
$(this).after('<div class="mt-2 text-lida3" id="msgCopiati">Copiati nella clipboard</div>');
|
||||
};
|
||||
*/
|
||||
|
||||
function makeUpGui(queryJson) {
|
||||
//$("#risultatitesto").val(queryJson["LogicaGui"]);
|
||||
|
@ -1222,17 +1230,17 @@ $(document).ready(function() {
|
|||
};
|
||||
|
||||
function resetContext(claIdNum) {
|
||||
$('#selectable' + claIdNum + " .ui-selectee").each(function() {
|
||||
$('#selectable-xX' + claIdNum + " .ui-selectee").each(function() {
|
||||
$(this).attr('style', "line-height: 1.2em");
|
||||
});
|
||||
$('#selectable' + claIdNum + " .ui-selected").removeClass( "ui-selected" )
|
||||
$('#selectable' + claIdNum + ' .sel-canti-intro').each(function() {
|
||||
$('#selectable-xX' + claIdNum + " .ui-selected").removeClass( "ui-selected" )
|
||||
$('#selectable-xX' + claIdNum + ' .sel-canti-intro').each(function() {
|
||||
$(this).text("Seleziona i canti:")
|
||||
});;
|
||||
$("#contextText" + claIdNum).html("Tutta l'opera");
|
||||
window["context" + claIdNum] = [[],[],[]];
|
||||
eval("queryJson.Clausola" + claIdNum + ".contesto = jsonContext0");
|
||||
$('#selectable' + claIdNum + " .show").removeClass("show");
|
||||
$("#contextText-xX" + claIdNum).html("Tutta l'opera");
|
||||
window["context" + claIdNum] = JSON.parse(JSON.stringify(contextEmpty));
|
||||
queryJson["Clausola" + claIdNum].contesto = JSON.stringify(window["context" + claIdNum]);
|
||||
$('#selectable-xX' + claIdNum + " .show").removeClass("show");
|
||||
};
|
||||
|
||||
function resetAdvGui() {
|
||||
|
@ -1242,6 +1250,7 @@ $(document).ready(function() {
|
|||
$(tabsContent).each(function(){
|
||||
claIdNum = $(this)[0].id.substring(3);
|
||||
delete queryJson["Clausola" + claIdNum];
|
||||
delete window["context" + claIdNum];
|
||||
$(this).remove();
|
||||
});
|
||||
};
|
||||
|
@ -1254,7 +1263,7 @@ $(document).ready(function() {
|
|||
function parseContext(claIdNum) {
|
||||
var context = window["context" + claIdNum];
|
||||
var jsonContext = JSON.stringify(context, jsonReplacer);
|
||||
eval("queryJson.Clausola" + claIdNum + ".contesto = jsonContext");
|
||||
queryJson["Clausola" + claIdNum].contesto = jsonContext;
|
||||
var contextStringParts = ["","",""];
|
||||
var contextString = [];
|
||||
var rangeHolderS = 0;
|
||||
|
@ -1295,15 +1304,12 @@ $(document).ready(function() {
|
|||
contextString.push(contextStringParts[i]);
|
||||
}
|
||||
if (contextString.toString() != "") {
|
||||
$("#contextText" + claIdNum).html(contextString.toString());
|
||||
$("#contextText-xX" + claIdNum).html(contextString.toString());
|
||||
} else {
|
||||
$("#contextText" + claIdNum).html("Tutta l'opera");
|
||||
$("#contextText-xX" + claIdNum).html("Tutta l'opera");
|
||||
}
|
||||
//return contextString.toString();
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue