Modifiche html per le clausole, aggiustato JSON della query
This commit is contained in:
parent
f2526ba967
commit
e02ee97881
146
index_2.0.html
146
index_2.0.html
|
@ -95,7 +95,7 @@
|
||||||
<div class="row py-2">
|
<div class="row py-2">
|
||||||
<div class="col-2 fixed-top my-3" style="z-index: 1000">
|
<div class="col-2 fixed-top my-3" style="z-index: 1000">
|
||||||
<br><br>
|
<br><br>
|
||||||
<div id="accordion">
|
<div id="accordionNav">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header px-1" id="headingOne">
|
<div class="card-header px-1" id="headingOne">
|
||||||
<h6 class="mb-0">
|
<h6 class="mb-0">
|
||||||
|
@ -106,7 +106,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="collapseOne" class="collapse show"
|
<div id="collapseOne" class="collapse show"
|
||||||
aria-labelledby="headingOne" data-parent="#accordion">
|
aria-labelledby="headingOne" data-parent="#accordionNav">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<span class="navig-canto small text-muted nowrap" name="InfernoCanto 1" href="#" style="line-height: 1.2em">1</span>
|
<span class="navig-canto small text-muted nowrap" name="InfernoCanto 1" href="#" style="line-height: 1.2em">1</span>
|
||||||
<span class="navig-canto small text-muted nowrap" name="InfernoCanto 2" href="#" style="line-height: 1.2em">2</span>
|
<span class="navig-canto small text-muted nowrap" name="InfernoCanto 2" href="#" style="line-height: 1.2em">2</span>
|
||||||
|
@ -153,7 +153,7 @@
|
||||||
aria-controls="collapseTwo">Purgatorio</button>
|
aria-controls="collapseTwo">Purgatorio</button>
|
||||||
</h6>
|
</h6>
|
||||||
</div>
|
</div>
|
||||||
<div id="collapseTwo" class="collapse" aria-labelledby="headingTwo" data-parent="#accordion">
|
<div id="collapseTwo" class="collapse" aria-labelledby="headingTwo" data-parent="#accordionNav">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<span class="navig-canto small text-muted nowrap" name="PurgatorioCanto 1" href="#" style="line-height: 1.2em">1</span>
|
<span class="navig-canto small text-muted nowrap" name="PurgatorioCanto 1" href="#" style="line-height: 1.2em">1</span>
|
||||||
<span class="navig-canto small text-muted nowrap" name="PurgatorioCanto 2" href="#" style="line-height: 1.2em">2</span>
|
<span class="navig-canto small text-muted nowrap" name="PurgatorioCanto 2" href="#" style="line-height: 1.2em">2</span>
|
||||||
|
@ -199,7 +199,7 @@
|
||||||
aria-controls="collapseThree">Paradiso</button>
|
aria-controls="collapseThree">Paradiso</button>
|
||||||
</h6>
|
</h6>
|
||||||
</div>
|
</div>
|
||||||
<div id="collapseThree" class="collapse" aria-labelledby="headingThree" data-parent="#accordion">
|
<div id="collapseThree" class="collapse" aria-labelledby="headingThree" data-parent="#accordionNav">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<span class="navig-canto small text-muted nowrap" name="ParadisoCanto 1" href="#" style="line-height: 1.2em">1</span>
|
<span class="navig-canto small text-muted nowrap" name="ParadisoCanto 1" href="#" style="line-height: 1.2em">1</span>
|
||||||
<span class="navig-canto small text-muted nowrap" name="ParadisoCanto 2" href="#" style="line-height: 1.2em">2</span>
|
<span class="navig-canto small text-muted nowrap" name="ParadisoCanto 2" href="#" style="line-height: 1.2em">2</span>
|
||||||
|
@ -245,7 +245,7 @@
|
||||||
<div class="col-2"> </div>
|
<div class="col-2"> </div>
|
||||||
|
|
||||||
<div class="col-10 pl-0 mt-2">
|
<div class="col-10 pl-0 mt-2">
|
||||||
|
<form>
|
||||||
<div class="row bg-lida10 border mx-0 p-2 d-flex justify-content-end">
|
<div class="row bg-lida10 border mx-0 p-2 d-flex justify-content-end">
|
||||||
<div class="col-2 d-flex p-0">
|
<div class="col-2 d-flex p-0">
|
||||||
</div>
|
</div>
|
||||||
|
@ -260,7 +260,7 @@
|
||||||
<button class="btn btn-sm btn-outline-lida4 mr-2" type="button" data-toggle="collapse" data-target="#collapseOptions" aria-expanded="false" aria-controls="collapseExample">
|
<button class="btn btn-sm btn-outline-lida4 mr-2" type="button" data-toggle="collapse" data-target="#collapseOptions" aria-expanded="false" aria-controls="collapseExample">
|
||||||
Opzioni
|
Opzioni
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-sm btn-outline-lida4" type="submit" id='cleanresult' aria-expanded="false" aria-controls="collapseExample">
|
<button class="btn btn-sm btn-outline-lida4" type="reset" id='cleanresult' aria-expanded="false" aria-controls="collapseExample">
|
||||||
Reset
|
Reset
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -285,7 +285,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<button class="btn btn-sm btn-lida4 mr-2" type="submit" id='searchcomm2'>Cerca</button>
|
<button class="btn btn-sm btn-lida4 mr-2" type="submit" id='searchcomm2'>Cerca</button>
|
||||||
<button class="btn btn-sm btn-outline-lida4" type="submit" id='cleanresult2' aria-expanded="false" aria-controls="collapseExample">
|
<button class="btn btn-sm btn-outline-lida4" type="reset" id='cleanresult2' aria-expanded="false" aria-controls="collapseExample">
|
||||||
Reset
|
Reset
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -306,18 +306,17 @@
|
||||||
<div class="collapse" id="collapseOptions">
|
<div class="collapse" id="collapseOptions">
|
||||||
<div class="card card-body bg-lida10 p-2">
|
<div class="card card-body bg-lida10 p-2">
|
||||||
<div class="form-inline input-group" action="">
|
<div class="form-inline input-group" action="">
|
||||||
<select class="form-control custom-select custom-select-sm bg-light" id="lemma_forma">
|
<select class="form-control custom-select-sm bg-light" id="lemma_forma">
|
||||||
<option value="forma">La Forma</option>
|
<option value="forma">La forma</option>
|
||||||
<option value="lemma">Il Lemma</option>
|
<option value="lemma">Il lemma</option>
|
||||||
<option value="testo">Il Testo</option>
|
<option value="testo">Il testo</option>
|
||||||
</select>
|
</select>
|
||||||
<select class="form-control custom-select custom-select-sm bg-light ml-2" id="opzioni_testo">
|
<select class="form-control custom-select-sm bg-light ml-2" id="opzioni_testo">
|
||||||
<option value="opzionetesto">Come Parola</option>
|
<option value="parola">come Parola</option>
|
||||||
<option value="opzionetesto">Come Sottostringa</option>
|
<option value="sottostringa">come Sottostringa</option>
|
||||||
<option value="opzionetesto">Come Prefisso</option>
|
<option value="prefisso">come Prefisso</option>
|
||||||
<option value="opzionetesto">Come Suffisso</option>
|
<option value="suffisso">come Suffisso</option>
|
||||||
<option value="opzionetesto">Come Espressione regolare</option>
|
<option value="regexp">come Espressione regolare</option>
|
||||||
<option value="opzionetesto">Tutte le occorrenze</option>
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -490,7 +489,6 @@
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<form>
|
|
||||||
<div class="row tab-content border-right border-left border-bottom m-0" id="cla-TabContent">
|
<div class="row tab-content border-right border-left border-bottom m-0" id="cla-TabContent">
|
||||||
<div class="col-12 tab-pane fade show active px-1 py-2 bg-white" id="cla0" role="tabpanel" aria-labelledby="cla0-tab">
|
<div class="col-12 tab-pane fade show active px-1 py-2 bg-white" id="cla0" role="tabpanel" aria-labelledby="cla0-tab">
|
||||||
|
|
||||||
|
@ -499,11 +497,11 @@
|
||||||
<label class="input-group-text"><ion-icon name="document-text"></ion-icon></label>
|
<label class="input-group-text"><ion-icon name="document-text"></ion-icon></label>
|
||||||
</div>
|
</div>
|
||||||
<select class="form-control custom-select-sm" id="lemma_forma">
|
<select class="form-control custom-select-sm" id="lemma_forma">
|
||||||
<option value="forma">la forma</option>
|
<option value="forma">La forma</option>
|
||||||
<option value="lemma">il lemma</option>
|
<option value="lemma">Il lemma</option>
|
||||||
<option disabled value="testo">il testo</option>
|
<option disabled value="testo">Il testo</option>
|
||||||
</select>
|
</select>
|
||||||
<input type="text" class="form-control-sm" id="queryText" placeholder="stelle" aria-describedby="name-desc" name="query">
|
<input type="text" class="form-control-sm" id="queryText" placeholder="inserisci un termine" aria-describedby="name-desc" name="query">
|
||||||
<div class="btn-group pl-2" role="group" aria-label="Bottone ricerca">
|
<div class="btn-group pl-2" role="group" aria-label="Bottone ricerca">
|
||||||
<label class="input-group-text"><ion-icon name="search-circle"></ion-icon></label>
|
<label class="input-group-text"><ion-icon name="search-circle"></ion-icon></label>
|
||||||
<button type="submit" class="btn btn-outline-primary">Cerca</button>
|
<button type="submit" class="btn btn-outline-primary">Cerca</button>
|
||||||
|
@ -684,7 +682,7 @@
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="cla-Advanced" style="display: block">
|
<div id="cla-Advanced" style="display: block">
|
||||||
|
|
||||||
<div class="small text-muted p-1">
|
<div class="small text-muted p-1">
|
||||||
|
@ -716,11 +714,19 @@
|
||||||
<label class="input-group-text"><ion-icon name="document-text"></ion-icon></label>
|
<label class="input-group-text"><ion-icon name="document-text"></ion-icon></label>
|
||||||
</div>
|
</div>
|
||||||
<select class="form-control custom-select-sm" id="lemma_formaN">
|
<select class="form-control custom-select-sm" id="lemma_formaN">
|
||||||
<option value="forma">la forma</option>
|
<option value="forma">La forma</option>
|
||||||
<option value="lemma">il lemma</option>
|
<option value="lemma">Il lemma</option>
|
||||||
<option disabled value="testo">il testo</option>
|
<option disabled value="testo">Il testo</option>
|
||||||
</select>
|
</select>
|
||||||
<input type="text" class="form-control form-control-sm" id="queryTextN" placeholder="stelle" aria-describedby="name-desc" name="query">
|
<input type="text" class="form-control form-control-sm" id="queryTextN" placeholder="inserisci un termine" aria-describedby="name-desc" name="query">
|
||||||
|
<select class="form-control custom-select-sm" id="opzioni_testoN">
|
||||||
|
<option value="parola">come Parola</option>
|
||||||
|
<option value="sottostringa">come Sottostringa</option>
|
||||||
|
<option value="prefisso">come Prefisso</option>
|
||||||
|
<option value="suffisso">come Suffisso</option>
|
||||||
|
<option value="regexp">come Espressione regolare</option>
|
||||||
|
</select>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group px-1 pb-1 mb-1">
|
<div class="form-group px-1 pb-1 mb-1">
|
||||||
|
@ -781,11 +787,18 @@
|
||||||
<label class="input-group-text"><ion-icon name="document-text"></ion-icon></label>
|
<label class="input-group-text"><ion-icon name="document-text"></ion-icon></label>
|
||||||
</div>
|
</div>
|
||||||
<select class="form-control custom-select-sm" id="lemma_formaN">
|
<select class="form-control custom-select-sm" id="lemma_formaN">
|
||||||
<option value="forma">la forma</option>
|
<option value="forma">La forma</option>
|
||||||
<option value="lemma">il lemma</option>
|
<option value="lemma">Il lemma</option>
|
||||||
<option disabled value="testo">il testo</option>
|
<option disabled value="testo">Il testo</option>
|
||||||
|
</select>
|
||||||
|
<input type="text" class="form-control form-control-sm" id="queryTextN" placeholder="inserisci un termine" aria-describedby="name-desc" name="query">
|
||||||
|
<select class="form-control custom-select-sm" id="opzioni_testoN">
|
||||||
|
<option value="parola">come Parola</option>
|
||||||
|
<option value="sottostringa">come Sottostringa</option>
|
||||||
|
<option value="prefisso">come Prefisso</option>
|
||||||
|
<option value="suffisso">come Suffisso</option>
|
||||||
|
<option value="regexp">come Espressione regolare</option>
|
||||||
</select>
|
</select>
|
||||||
<input type="text" class="form-control form-control-sm" id="queryTextN" placeholder="stelle" aria-describedby="name-desc" name="query">
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group px-1 pb-1 mb-1">
|
<div class="form-group px-1 pb-1 mb-1">
|
||||||
|
@ -1263,75 +1276,6 @@
|
||||||
</div>
|
</div>
|
||||||
<!-- FINE TIPO SINTATTICO -->
|
<!-- FINE TIPO SINTATTICO -->
|
||||||
|
|
||||||
|
|
||||||
<!-- CONDIZIONE GRAMMATICALE -->
|
|
||||||
|
|
||||||
<div style="display: none;">
|
|
||||||
<table id="gramm_table">
|
|
||||||
<tr id="">
|
|
||||||
<td class="pa3">
|
|
||||||
<fieldset id="lemma_forma" class="bn">
|
|
||||||
<div class="custom-control custom-radio custom-control-inline">
|
|
||||||
<input class="custom-control-input" type="radio" id="lemma" value="lemma"
|
|
||||||
name="oggetto"> <label for="lemma" class="custom-control-label">Lemma</label>
|
|
||||||
</div>
|
|
||||||
<div class="custom-control custom-radio custom-control-inline">
|
|
||||||
<input class="custom-control-input" type="radio" id="forma" value="forma"
|
|
||||||
name="oggetto"> <label for="forma" class="custom-control-label">Forma</label>
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
||||||
</td>
|
|
||||||
<td class="pa3"><input id="name"
|
|
||||||
class="input-reset ba b--black-20 pa2 mb2 db w-100" type="text"
|
|
||||||
aria-describedby="name-desc" name="query" value=""></td>
|
|
||||||
|
|
||||||
<!-- ??? non viene usata -->
|
|
||||||
<td class="pa3"><select id="types"
|
|
||||||
class="form-control custom-select" name="tipo"
|
|
||||||
title="Tipo di ricerca">
|
|
||||||
<option value="parola" onclick="">Parola</option>
|
|
||||||
<option value="sottostringa" onclick="">Sottostringa</option>
|
|
||||||
<option value="prefisso" onclick="">Prefisso</option>
|
|
||||||
<option value="suffisso" onclick="">Suffisso</option>
|
|
||||||
<option value="espressione" onclick="">Espressione regolare</option>
|
|
||||||
<option value="occorrenze" onclick="">Tutte le occorrenze</option>
|
|
||||||
</select></td>
|
|
||||||
<td class="pa3"><select id="types"
|
|
||||||
class="form-control custom-select"
|
|
||||||
name="categoria" onchange="" title="Macro categoria">
|
|
||||||
<option value="all">Tutte le categorie</option>
|
|
||||||
<optgroup label="Volgare">
|
|
||||||
<option value="verbovolgare">Verbo volgare</option>
|
|
||||||
<option value="sostantivovolgare">Sostantivo volgare</option>
|
|
||||||
<option value="aggettivovolgare">Aggettivo volgare</option>
|
|
||||||
<option value="pronomevolgare">Pronome volgare</option>
|
|
||||||
<option value="articolovolgare">Articolo volgare</option>
|
|
||||||
<option value="avverbiovolgare">Avverbio volgare</option>
|
|
||||||
<option value="preposizionevolgare">Preposizione volgare</option>
|
|
||||||
<option value="congiunzionevolgare">Congiunzione volgare</option>
|
|
||||||
<option value="interiezionevolgare">Interiezione volgare</option>
|
|
||||||
<option value="onomasticavolgare">Onomastica volgare</option>
|
|
||||||
<option value="citazionevolgare">Citazione volgare</option>
|
|
||||||
</optgroup>
|
|
||||||
<optgroup label="Latino">
|
|
||||||
<option value="verbo_latino_v">Verbo latino</option>
|
|
||||||
<option value="sostantivo_latino_s">Sostantivo latino</option>
|
|
||||||
<option value="aggettivo_latino_a">Aggettivo latino</option>
|
|
||||||
<option value="pronome_latino_p">Pronome latino</option>
|
|
||||||
<option value="avverbio_latino_r">Avverbio latino</option>
|
|
||||||
<option value="preposizione_latino_e">Preposizione latino</option>
|
|
||||||
<option value="congiunzione_latino_c">Congiunzione latino</option>
|
|
||||||
<option value="interiezione_latino_i">Interiezione latino</option>
|
|
||||||
<option value="enclitica_latino_9">Enclitica latino</option>
|
|
||||||
<option value="citazione_latino_zi">Citazione latino</option>
|
|
||||||
<option value="simbolo_latino_yy">Simbolo latino</option>
|
|
||||||
</optgroup>
|
|
||||||
</select></td>
|
|
||||||
<td><input class="delete-record" type="submit" value="Rimuovi" data-id="0"></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- FINE MODELLI CLAUSOLE -->
|
<!-- FINE MODELLI CLAUSOLE -->
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -13,6 +13,7 @@ $(document).ready(function() {
|
||||||
|
|
||||||
//$('#multidraggable1').multidraggable();
|
//$('#multidraggable1').multidraggable();
|
||||||
$("#dropAdvanced").on('click', function () {
|
$("#dropAdvanced").on('click', function () {
|
||||||
|
queryJson.QueryAvanzata = "1";
|
||||||
$("#simpleSearchDiv").removeClass( "d-flex" )
|
$("#simpleSearchDiv").removeClass( "d-flex" )
|
||||||
$("#simpleSearchDiv").attr('style', "display: none;");
|
$("#simpleSearchDiv").attr('style', "display: none;");
|
||||||
$("#collapseOptions").collapse('hide');
|
$("#collapseOptions").collapse('hide');
|
||||||
|
@ -23,6 +24,7 @@ $(document).ready(function() {
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#dropSimple").on('click', function () {
|
$("#dropSimple").on('click', function () {
|
||||||
|
queryJson.QueryAvanzata = "0";
|
||||||
$("#advancedSearchDiv").removeClass( "d-flex" )
|
$("#advancedSearchDiv").removeClass( "d-flex" )
|
||||||
$("#advancedSearchDiv").attr('style', "display: none;");
|
$("#advancedSearchDiv").attr('style', "display: none;");
|
||||||
$("#simpleSearchDiv").addClass( "d-flex" )
|
$("#simpleSearchDiv").addClass( "d-flex" )
|
||||||
|
@ -471,7 +473,7 @@ $(document).ready(function() {
|
||||||
var claLIpart1 = '<li id="'
|
var claLIpart1 = '<li id="'
|
||||||
var claLIpart2 = '" class="claLI mx-0 my-1 p-1 list-group-item align-items-center border text-muted bg-white"> \
|
var claLIpart2 = '" class="claLI mx-0 my-1 p-1 list-group-item align-items-center border text-muted bg-white"> \
|
||||||
<div class="handle container-fluid p-0"><div class="row no-gutters flex-nowrap align-items-start"><div class="col-md-auto pl-0 pr-1 align-self-start"> \
|
<div class="handle container-fluid p-0"><div class="row no-gutters flex-nowrap align-items-start"><div class="col-md-auto pl-0 pr-1 align-self-start"> \
|
||||||
<span class="ui-icon ui-icon-arrowthick-2-n-s"></span></div><div class="col-md-auto pl-0 pr-2 flex-grow-1 align-self-start"><span class="small pl-1">';
|
<span class="ui-icon ui-icon-arrowthick-2-n-s"></span></div><div class="col-md-auto pl-0 pr-2 flex-grow-1 align-self-start"><span class="small pl-1 clatext">';
|
||||||
var claLIpart3 = '</span></div><div class="col-md-auto px-0 align-self-start justify-content-end"><div class="row no-gutters justify-content-end"> \
|
var claLIpart3 = '</span></div><div class="col-md-auto px-0 align-self-start justify-content-end"><div class="row no-gutters justify-content-end"> \
|
||||||
<div class="col-auto pb-0 pl-2 pr-1 pt-1 align-top flex-grow-1 align-self-end justify-content-end text-right bd-highlight text-primary editCla">' + iconEdit + '</div> \
|
<div class="col-auto pb-0 pl-2 pr-1 pt-1 align-top flex-grow-1 align-self-end justify-content-end text-right bd-highlight text-primary editCla">' + iconEdit + '</div> \
|
||||||
<div class="col-auto pb-0 pl-1 pr-2 pt-1 align-top align-self-end justify-content-end text-right bd-highlight text-primary removeClaInList">' + iconClose + '</div></div> \
|
<div class="col-auto pb-0 pl-1 pr-2 pt-1 align-top align-self-end justify-content-end text-right bd-highlight text-primary removeClaInList">' + iconClose + '</div></div> \
|
||||||
|
@ -479,21 +481,13 @@ $(document).ready(function() {
|
||||||
<input type="checkbox" class="custom-control-input claAct" name="cla-attiva" aria-label="attiva" id="actiClaSW';
|
<input type="checkbox" class="custom-control-input claAct" name="cla-attiva" aria-label="attiva" id="actiClaSW';
|
||||||
var claLIpart4 = '><label class="custom-control-label form-control-sm p-0" for="actiClaSW';
|
var claLIpart4 = '><label class="custom-control-label form-control-sm p-0" for="actiClaSW';
|
||||||
var claLIpart5 = '"></label></div></div></div></div></div></div></li>';
|
var claLIpart5 = '"></label></div></div></div></div></div></div></li>';
|
||||||
var claLIpart2o = '" class="claLI ml-3 my-1 p-1 list-group-item align-items-center border text-muted bg-white"><div class="handle container-fluid"><div class="row"><div class="col-md-auto flex-grow-1 px-0 pr-2 align-self-start"> \
|
|
||||||
<div class="bd-highlight text-primary"><span class="ui-icon ui-icon-arrowthick-2-n-s"></span></div><div class="p-1 bd-highlight clatext">';
|
|
||||||
var claLIpart3o = '</div></div><div class="col px-0 pl-2 border-left align-self-end"><div class="row"><div class="col-md-12 px-0 float-right"><div class="d-flex px-3 flex-nowrap float-right"> \
|
|
||||||
<div class="p-1 align-top bd-highlight text-primary editCla">' + iconEdit + '</div><div class="p-1 align-top bd-highlight text-primary removeClaInList">' + iconClose + '</div> \
|
|
||||||
</div></div></div><div class="row"><div class="col-md-12 px-2 float-right"><div class="custom-control custom-switch p-1 text-right bd-highlight"> \
|
|
||||||
<input type="checkbox" class="custom-control-input claAct" name="cla-attiva" aria-label="attiva" id="actiClaSW';
|
|
||||||
var claLIpart4o = '><label class="custom-control-label form-control-sm" for="actiClaSW';
|
|
||||||
var claLIpart5o = '"></label></div></div></div></div></div></div></li>';
|
|
||||||
|
|
||||||
var condLIplaceholderText1 = 'Trascina qui almeno 1 clausola o condizione';
|
var condLIplaceholderText1 = 'Trascina qui almeno 1 clausola o condizione';
|
||||||
var condLIplaceholderText2 = 'Trascina qui almeno 2 clausole o condizioni';
|
var condLIplaceholderText2 = 'Trascina qui almeno 2 clausole o condizioni';
|
||||||
var condLIplaceholderText1d = 'Trascina qui almeno 1 clausola o condizione, oppure attiva le clausole inattive';
|
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 condLIplaceholderText2d = 'Trascina qui almeno 2 clausole o condizioni, oppure attiva le clausole inattive';
|
||||||
var condLIplaceholderPart1 = '<li id="placeholderSort';
|
var condLIplaceholderPart1 = '<li id="placeholderSort';
|
||||||
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 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">';
|
||||||
var condLIpart1 = '<li id="cond';
|
var condLIpart1 = '<li id="cond';
|
||||||
var condLIpart2and = '" class="condLIand mx-0 my-1 p-1 list-group-item align-items-center border text-muted bg-lida10"><ul id="sortable';
|
var condLIpart2and = '" class="condLIand mx-0 my-1 p-1 list-group-item align-items-center border text-muted bg-lida10"><ul id="sortable';
|
||||||
var condLIpart3and = '" class="handle list-group ui-sortable"><div class="row ml-1 pr-2 justify-content-between"><div class=" pb-1 small font-weight-bold text-muted">AND</div>' + iconCloseCond + '</div>' + condLIplaceholderPart1;
|
var condLIpart3and = '" class="handle list-group ui-sortable"><div class="row ml-1 pr-2 justify-content-between"><div class=" pb-1 small font-weight-bold text-muted">AND</div>' + iconCloseCond + '</div>' + condLIplaceholderPart1;
|
||||||
|
@ -515,7 +509,7 @@ $(document).ready(function() {
|
||||||
var canticheList = ["Inferno","Purgatorio","Paradiso"];
|
var canticheList = ["Inferno","Purgatorio","Paradiso"];
|
||||||
var queryJson = JSON.parse('{"EsprLogica":"", "LogicaGui":"", "QueryAvanzata": "0"}');
|
var queryJson = JSON.parse('{"EsprLogica":"", "LogicaGui":"", "QueryAvanzata": "0"}');
|
||||||
queryJson.LiDaVersion = "1.0";
|
queryJson.LiDaVersion = "1.0";
|
||||||
queryJson.Clausola0 = JSON.parse('{"queryText": "", "lemma_forma": "lemma", "TipoClausola": "0", "Attiva": "0"}');
|
queryJson.Clausola0 = JSON.parse('{"queryText": "", "lemma_forma": "lemma", "opzioni_testo": "parola", "TipoClausola": "0", "Attiva": "0"}');
|
||||||
|
|
||||||
const myEngine = new Comunica.QueryEngine();
|
const myEngine = new Comunica.QueryEngine();
|
||||||
const sparqlEndpoint = "https://hdnlab1.isti.cnr.it/fuseki/commediaontosintgra/query";
|
const sparqlEndpoint = "https://hdnlab1.isti.cnr.it/fuseki/commediaontosintgra/query";
|
||||||
|
@ -602,6 +596,7 @@ $(document).ready(function() {
|
||||||
$('#cla' + tabID + " #grammtypes").attr("id","grammtypes" + tabID);
|
$('#cla' + tabID + " #grammtypes").attr("id","grammtypes" + tabID);
|
||||||
$('#cla' + tabID + " #lemma_formaN").attr("id","lemma_forma" + tabID);
|
$('#cla' + tabID + " #lemma_formaN").attr("id","lemma_forma" + tabID);
|
||||||
$('#cla' + tabID + " #queryTextN").attr("id","queryText" + tabID);
|
$('#cla' + tabID + " #queryTextN").attr("id","queryText" + tabID);
|
||||||
|
$('#cla' + tabID + " #opzioni_testoN").attr("id","opzioni_testo" + tabID);
|
||||||
claListLen++;
|
claListLen++;
|
||||||
$('#tab-list').append($('<li class="nav-item" role="presentation"><a class="nav-link" id="cla' + tabID + '-tab" data-toggle="tab" href="#cla' + tabID + '" role="tab" aria-controls="cla' + tabID + '" aria-selected="false" data-claType="Grammaticale"><span class="small font-weight-bold text-lida9">' + iconFilter + ' ' + claListLen + '. Grammaticale</span></a></li>'));
|
$('#tab-list').append($('<li class="nav-item" role="presentation"><a class="nav-link" id="cla' + tabID + '-tab" data-toggle="tab" href="#cla' + tabID + '" role="tab" aria-controls="cla' + tabID + '" aria-selected="false" data-claType="Grammaticale"><span class="small font-weight-bold text-lida9">' + iconFilter + ' ' + claListLen + '. Grammaticale</span></a></li>'));
|
||||||
}
|
}
|
||||||
|
@ -689,7 +684,7 @@ $(document).ready(function() {
|
||||||
default:
|
default:
|
||||||
var element = $('<div />');
|
var element = $('<div />');
|
||||||
element.attr('class', ' form-group px-0 pb-1 m-0');
|
element.attr('class', ' form-group px-0 pb-1 m-0');
|
||||||
var select = $('<select class="form-control custom-select custom-select-sm"/>');
|
var select = $('<select class="form-control custom-select-sm"/>');
|
||||||
select.attr('id', tabPaneId + keys[key].replace(/\s/g, ''));
|
select.attr('id', tabPaneId + keys[key].replace(/\s/g, ''));
|
||||||
select.attr('title', keys[key]);
|
select.attr('title', keys[key]);
|
||||||
select.attr('name', keys[key]);
|
select.attr('name', keys[key]);
|
||||||
|
@ -722,10 +717,9 @@ $(document).ready(function() {
|
||||||
$('#cla-TabContent').append(clone);
|
$('#cla-TabContent').append(clone);
|
||||||
$('#cla' + tabID + " #lemma_formaN").attr("id","lemma_forma" + tabID);
|
$('#cla' + tabID + " #lemma_formaN").attr("id","lemma_forma" + tabID);
|
||||||
$('#cla' + tabID + " #queryTextN").attr("id","queryText" + tabID);
|
$('#cla' + tabID + " #queryTextN").attr("id","queryText" + tabID);
|
||||||
|
$('#cla' + tabID + " #opzioni_testoN").attr("id","opzioni_testo" + tabID);
|
||||||
var l_f = $("form #lemma_forma")[0].options[$("form #lemma_forma")[0].selectedIndex].value;
|
var l_f = $("form #lemma_forma")[0].options[$("form #lemma_forma")[0].selectedIndex].value;
|
||||||
var qText = $("form #queryText")[0].value;
|
var qText = $("form #queryText")[0].value;
|
||||||
|
|
||||||
console.log();
|
|
||||||
claListLen++;
|
claListLen++;
|
||||||
$('#tab-list').append($('<li class="nav-item" role="presentation"><a class="nav-link" id="cla' + tabID + '-tab" data-toggle="tab" href="#cla' + tabID + '" role="tab" aria-controls="cla' + tabID + '" aria-selected="false" data-claType="Sintattico"><span class="small font-weight-bold text-lida3">' + iconFilter + ' ' + claListLen + '. Sintattico</span></a></li>'));
|
$('#tab-list').append($('<li class="nav-item" role="presentation"><a class="nav-link" id="cla' + tabID + '-tab" data-toggle="tab" href="#cla' + tabID + '" role="tab" aria-controls="cla' + tabID + '" aria-selected="false" data-claType="Sintattico"><span class="small font-weight-bold text-lida3">' + iconFilter + ' ' + claListLen + '. Sintattico</span></a></li>'));
|
||||||
}
|
}
|
||||||
|
@ -814,12 +808,13 @@ $(document).ready(function() {
|
||||||
function refreshClaList(){
|
function refreshClaList(){
|
||||||
var l_f = $("form #lemma_forma")[0].options[$("form #lemma_forma")[0].selectedIndex].value;
|
var l_f = $("form #lemma_forma")[0].options[$("form #lemma_forma")[0].selectedIndex].value;
|
||||||
var qText = $("form #queryText")[0].value;
|
var qText = $("form #queryText")[0].value;
|
||||||
|
var optText = $("form #opzioni_testo")[0].value;
|
||||||
if (qText == "") { //disattivo clausola 0 se il testo e' vuoto
|
if (qText == "") { //disattivo clausola 0 se il testo e' vuoto
|
||||||
var claActive = 0
|
var claActive = 0
|
||||||
} else {
|
} else {
|
||||||
var claActive = 1
|
var claActive = 1
|
||||||
};
|
};
|
||||||
queryJson.Clausola0 = JSON.parse('{"queryText": "' + qText + '", "lemma_forma": "' + l_f + '", "TipoClausola": "0", "Attiva": "' + claActive + '"}');
|
queryJson.Clausola0 = JSON.parse('{"queryText": "' + qText + '", "lemma_forma": "' + l_f + '", "opzioni_testo": "' + optText + '", "TipoClausola": "0", "Attiva": "' + claActive + '"}');
|
||||||
var tabsContent=$("#cla-TabContent").find(".tab-pane:not(:first)");
|
var tabsContent=$("#cla-TabContent").find(".tab-pane:not(:first)");
|
||||||
var len=0;
|
var len=0;
|
||||||
if ($(tabsContent).length) {
|
if ($(tabsContent).length) {
|
||||||
|
@ -841,32 +836,41 @@ $(document).ready(function() {
|
||||||
}
|
}
|
||||||
tabID = 0;
|
tabID = 0;
|
||||||
};
|
};
|
||||||
|
console.log(queryJson);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Funzione di creazione del LI nella lista delle clausole nel tab principale
|
// Funzione di creazione del LI nella lista delle clausole nel tab principale, aggiunta della clausola nel JSON
|
||||||
function createClaListItem(len, claId, sortableNum){
|
function createClaListItem(len, claId, sortableNum){
|
||||||
var claText = '';
|
var claText = '';
|
||||||
|
var termText = '';
|
||||||
var checkInsert = '"';
|
var checkInsert = '"';
|
||||||
var claListItemID = "H-" + claId;
|
var claListItemID = "H-" + claId;
|
||||||
|
var Id = claId.substr(3);
|
||||||
var claType = $("#" + claId).attr('data-claType');
|
var claType = $("#" + claId).attr('data-claType');
|
||||||
var claActive = $("#" + claId).attr('data-claActive');
|
var claActive = $("#" + claId).attr('data-claActive');
|
||||||
if (claActive > 0) {
|
if (claActive > 0) {
|
||||||
checkInsert = '" checked="checked"';
|
checkInsert = '" checked="checked"';
|
||||||
};
|
};
|
||||||
var l_f = $("form #lemma_forma")[0].options[$("form #lemma_forma")[0].selectedIndex].value;
|
var l_f = $("form #lemma_forma" + Id)[0].options[$("form #lemma_forma" + Id)[0].selectedIndex].value;
|
||||||
var qText = $("form #queryText")[0].value;
|
var l_f_t = $("form #lemma_forma" + Id)[0].options[$("form #lemma_forma" + Id)[0].selectedIndex].text;
|
||||||
var jsonTextToParse = '{"queryText": "' + qText + '", "lemma_forma": "' + l_f + '", "TipoClausola": "' + claType + '", "Attiva": "' + claActive + '"';
|
var qText = $("form #queryText" + Id)[0].value;
|
||||||
|
var optText = $("form #opzioni_testo" + Id)[0].value;
|
||||||
|
var optText_t = $("form #opzioni_testo" + Id)[0].options[$("form #opzioni_testo" + Id)[0].selectedIndex].text;
|
||||||
|
if (qText != "") {
|
||||||
|
termText = l_f_t + ' <span class="text-dark font-weight-bold">' + qText + '</span> ' + optText_t + '.<br>';
|
||||||
|
};
|
||||||
|
var jsonTextToParse = '{"queryText": "' + qText + '", "lemma_forma": "' + l_f + '", "opzioni_testo": "' + optText + '", "TipoClausola": "' + claType + '", "Attiva": "' + claActive + '"';
|
||||||
switch (claType) {
|
switch (claType) {
|
||||||
case "Grammaticale":
|
case "Grammaticale":
|
||||||
var gramSelect = $("#" + claId).find(".catgram");
|
var gramSelect = $("#" + claId).find(".catgram");
|
||||||
//claText = '<span class="small">' + len + ". Categoria grammaticale: " + gramSelect[0].options[gramSelect[0].selectedIndex].text + '<br>';
|
//claText = '<span class="small">' + len + ". Categoria grammaticale: " + gramSelect[0].options[gramSelect[0].selectedIndex].text + '<br>';
|
||||||
claText = len + ". Categoria grammaticale: " + gramSelect[0].options[gramSelect[0].selectedIndex].text + '<br>';
|
claText = len + ". " + termText + "Categoria grammaticale: " + gramSelect[0].options[gramSelect[0].selectedIndex].text + ';<br>';
|
||||||
jsonTextToParse = jsonTextToParse + ', "' + gramSelect.attr('name') + '": "' + gramSelect[0].options[gramSelect[0].selectedIndex].value + '"';
|
jsonTextToParse = jsonTextToParse + ', "' + gramSelect.attr('name') + '": "' + gramSelect[0].options[gramSelect[0].selectedIndex].value + '"';
|
||||||
var claSubParList = $("#" + claId).children(".dettaglifiltri").find("select, fieldset");
|
var claSubParList = $("#" + claId).children(".dettaglifiltri").find("select, fieldset");
|
||||||
claSubParList.each(function(){
|
claSubParList.each(function(){
|
||||||
var claSubParType = $(this)[0].type;
|
var claSubParType = $(this)[0].type;
|
||||||
if (claSubParType == "fieldset" && $(this).find(":checked").length) {
|
if (claSubParType == "fieldset" && $(this).find(":checked").length) {
|
||||||
var claSubParName = $(this).find(":checked")[0].name
|
var claSubParName = $(this).find(":checked")[0].name;
|
||||||
if (claSubParName.startsWith(claId)) {
|
if (claSubParName.startsWith(claId)) {
|
||||||
claSubParName = claSubParName.replace(claId,'');
|
claSubParName = claSubParName.replace(claId,'');
|
||||||
}
|
}
|
||||||
|
@ -883,7 +887,7 @@ $(document).ready(function() {
|
||||||
var syntSelect = $("#" + claId).find("#synttypes");
|
var syntSelect = $("#" + claId).find("#synttypes");
|
||||||
var funcSelect = $("#" + claId).find("#syntfunc");
|
var funcSelect = $("#" + claId).find("#syntfunc");
|
||||||
//claText = '<span class="small mx-1">' + len + ". Tipo sintattico: " + syntSelect[0].options[syntSelect[0].selectedIndex].text + ';<br>Livello di subordinazione: ' + funcSelect[0].options[funcSelect[0].selectedIndex].text;
|
//claText = '<span class="small mx-1">' + len + ". Tipo sintattico: " + syntSelect[0].options[syntSelect[0].selectedIndex].text + ';<br>Livello di subordinazione: ' + funcSelect[0].options[funcSelect[0].selectedIndex].text;
|
||||||
claText = len + ". Tipo sintattico: " + syntSelect[0].options[syntSelect[0].selectedIndex].text + ';<div class="col-md-12"></div>Livello di subordinazione: ' + funcSelect[0].options[funcSelect[0].selectedIndex].text;
|
claText = len + ". " + termText + "Tipo sintattico: " + syntSelect[0].options[syntSelect[0].selectedIndex].text + ';<div class="col-md-12"></div>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 + '"';
|
jsonTextToParse = jsonTextToParse + ', "' + syntSelect.attr('name') + '": "' + syntSelect[0].options[syntSelect[0].selectedIndex].value + '", "' + funcSelect.attr('name') + '": "' + funcSelect[0].options[funcSelect[0].selectedIndex].value + '"';
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -897,7 +901,7 @@ $(document).ready(function() {
|
||||||
$(sortableNum).append(LItext);
|
$(sortableNum).append(LItext);
|
||||||
};
|
};
|
||||||
queryJson["Clausola" + len] = JSON.parse(jsonTextToParse + '}');
|
queryJson["Clausola" + len] = JSON.parse(jsonTextToParse + '}');
|
||||||
}
|
};
|
||||||
|
|
||||||
// Funzione di refresh dei placeholders e attivazione/disattivazione bottoni nelle liste sortable
|
// Funzione di refresh dei placeholders e attivazione/disattivazione bottoni nelle liste sortable
|
||||||
function refreshSortables(){
|
function refreshSortables(){
|
||||||
|
@ -1074,6 +1078,7 @@ $(document).ready(function() {
|
||||||
if (queryJson["Clausola0"].Attiva) {
|
if (queryJson["Clausola0"].Attiva) {
|
||||||
$("#cla0 #lemma_forma").val(queryJson["Clausola0"].lemma_forma);
|
$("#cla0 #lemma_forma").val(queryJson["Clausola0"].lemma_forma);
|
||||||
$("#cla0 #queryText").val(queryJson["Clausola0"].queryText);
|
$("#cla0 #queryText").val(queryJson["Clausola0"].queryText);
|
||||||
|
$("#cla0 #opzioni_testo").val(queryJson["Clausola0"].opzioni_testo);
|
||||||
};
|
};
|
||||||
// Generazione lista clausole e condizioni con elementi padre:
|
// Generazione lista clausole e condizioni con elementi padre:
|
||||||
guiLogicString = queryJson.LogicaGui;
|
guiLogicString = queryJson.LogicaGui;
|
||||||
|
|
Loading…
Reference in New Issue