Corretti piccoli bug e particolari html,

bottone di reset avanzato funzionante
This commit is contained in:
Luca Trupiano 2022-12-13 17:33:45 +01:00
parent a672244132
commit fcb47adccc
2 changed files with 34 additions and 32 deletions

View File

@ -367,7 +367,7 @@
</div>
<button class="btn btn-sm btn-lida4 mr-2" type="submit"
id='searchcomm'>Cerca</button>
<button class="btn btn-sm btn-outline-lida4" type="reset"
<button class="btn btn-sm btn-outline-lida4" type="pippo"
id='cleanresult' aria-expanded="false"
aria-controls="collapseExample">Reset</button>
</div>
@ -384,7 +384,7 @@
<button class="btn btn-sm btn-lida4 mr-2" type="submit"
id='searchcomm2'>Cerca</button>
<button class="btn btn-sm btn-outline-lida4" type="reset"
<button class="btn btn-sm btn-outline-lida4" type="pippo"
id='cleanresult2' aria-expanded="false"
aria-controls="collapseExample">Reset</button>
</div>
@ -694,31 +694,31 @@
<div class="col-12 justify-content-between d-sm-inline bg-lida10 p-2">
<div class="btn-group dropright p-2" role="group">
<div class="btn-group dropdown p-2" role="group">
<button id="btnGroupDrop1" type="button"
class="btn btn-sm btn-outline-danger dropdown-toggle"
class="btn btn-sm btn-outline-lida4 bg-light dropdown-toggle"
data-toggle="dropdown" aria-haspopup="true"
aria-expanded="false">Aggiungi clausola di tipo:</button>
<div class="dropdown-menu" aria-labelledby="btnGroupDrop1">
<a class="dropdown-item" id="Grammaticale" href="#"><span
class="text-lida9">Categoria grammaticale</span></a> <a
class="text-muted">Categoria grammaticale</span></a> <a
class="dropdown-item" id="Sintattico" href="#"><span
class="text-lida3">Tipo sintattico</span></a> <a
class="text-muted">Tipo sintattico</span></a> <a
class="dropdown-item" id="Metafore" href="#"><span
class="text-lida5">Metafore</span></a>
class="text-muted">Metafore</span></a>
</div>
</div>
<div class="btn-group dropright p-2" role="group">
<div class="btn-group dropdown p-2" role="group">
<button id="btnGroupDrop2" type="button"
class="btn btn-sm btn-outline-danger dropdown-toggle"
class="btn btn-sm btn-outline-lida4 bg-light dropdown-toggle"
data-toggle="dropdown" aria-haspopup="true"
aria-expanded="false">Aggiungi condizione logica:</button>
<div class="dropdown-menu" aria-labelledby="btnGroupDrop2"
style="">
<a class="dropdown-item" id="andCond" href="#"><span
class="text-muted bg-lida10">AND</span></a> <a
class="text-muted">AND</span></a> <a
class="dropdown-item" id="orCond" href="#"><span
class="text-muted bg-lida11">OR</span></a>
class="text-muted">OR</span></a>
</div>
</div>
</div>
@ -1062,7 +1062,7 @@
<!-- TIPO GRAMMATICALE -->
<div style="display: none;"
class="col-12 tab-pane p-2 bg-white border-top"
class="col-12 tab-pane p-0 pt-3 bg-white border-top"
id="tipogrammaticaleN" role="tabpanel"
aria-labelledby="claN-tab" data-claType="Grammaticale"
data-claActive="1">
@ -1154,7 +1154,7 @@
<!-- TIPO SINTATTICO -->
<div style="display: none;"
class="col-12 tab-pane p-2 bg-white border-top" id="tiposintatticoN"
class="col-12 tab-pane p-0 pt-3 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"
@ -1789,7 +1789,7 @@
</select>
</div>
</div>
<div class="form-group px-1 pb-1 mb-1">
<div class="form-group px-1 pb-1 mb-2">
<label for="functionSyntax"
class="text-muted control-label small">Livello di
subordinazione:</label>
@ -1861,8 +1861,9 @@
class="col-md-auto px-0 align-self-start justify-content-end">
<div class="row no-gutters justify-content-end">
<div
class="card-header 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"
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"
id="headingCxX1Xx">
<button class="btn btn-sm btn-link collapsed p-0"
data-toggle="collapse"
data-target="#collapseCxX1Xx"
@ -1879,14 +1880,16 @@
</div>
<div class="row no-gutters align-items-end">
<div class="col align-self-end p-0">
<div
class="custom-control custom-control-sm custom-switch p-0 align-self-end text-right">
class="custom-control custom-control-sm custom-control-sm custom-switch p-0 align-self-end text-right">
<input type="checkbox"
class="custom-control-input claAct"
name="cla-attiva" aria-label="attiva"
id="actiClaSWxX3Xx"><label
class="custom-control-label form-control-sm p-0" for="actiClaSWxX1Xx"></label>
</div>
</div>
</div>
</div>
@ -1895,7 +1898,7 @@
<div id="collapseCxX1Xx" class="collapse"
aria-labelledby="headingCxX1Xx"
data-parent="#sortable0">
<div class="card-body" id="claBodyxX1Xx"></div>
<div class="card-body p-0" id="claBodyxX1Xx"></div>
</div>
</li>
<!-- FINE LI CLAUSOLA -->

View File

@ -42,6 +42,7 @@ $(document).ready(function() {
$("#copiaQuery").prop("disabled", true);
// Funzioni di gestione del comportamento dei bottoni collapse
$('#collapseLogic').on('hidden.bs.collapse', function (e) {
if (e.target.id == "collapseLogic") {
$("#showLogic").html('<span class="small">Mostra pannello</span>');
@ -91,41 +92,32 @@ $(document).ready(function() {
// Inizializza selectableS e definisce le funzioni
$("#selectableS").selectable({
filter: "td",
//appendTo: "#someElem",
selected: function(event, ui) {
contextS[ui.selected.id.substring(0,1)][ui.selected.id.substring(2)] = 1;
//console.log(ui.selected.id.substring(0,1) + " + " + ui.selected.id.substring(2));
},
unselected: function(event, ui) {
contextS[ui.unselected.id.substring(0,1)][ui.unselected.id.substring(2)] = 0;
//console.log(ui.unselected.id.substring(0,1) + " - " + ui.unselected.id.substring(2));
},
stop: function(event, ui) {
//console.log(context0);
parseContext(contextS);
//$("#risultatitesto").val(parseContext(context0));
}
});
// Inizializza selectable0 e definisce le funzioni
$("#selectable0").selectable({
filter: "td",
//appendTo: "#someElem",
selected: function(event, ui) {
context0[ui.selected.id.substring(0,1)][ui.selected.id.substring(2)] = 1;
//console.log(ui.selected.id.substring(0,1) + " + " + ui.selected.id.substring(2));
},
unselected: function(event, ui) {
context0[ui.unselected.id.substring(0,1)][ui.unselected.id.substring(2)] = 0;
//console.log(ui.unselected.id.substring(0,1) + " - " + ui.unselected.id.substring(2));
},
stop: function(event, ui) {
//console.log(context0);
parseContext(context0);
//$("#risultatitesto").val(parseContext(context0));
}
});
// Evento: click sul bottone di copia della query
$("#copiaQuery").on("click", function(){
$('#sparqlquery').copy2clipboard();
@ -306,6 +298,13 @@ $(document).ready(function() {
}
});
// Evento: click sul bottone di reset azanzata
$('#cleanresult2').on('click', function() {
resetAdvGui();
refreshClaList();
console.log(queryJson);
});
// Variabili JSON per i filtri
@ -683,6 +682,7 @@ $(document).ready(function() {
if (element) {
element.attr('style', "display: block;");
element.appendTo(dettagliBox);
refreshClaList();
};
}
@ -1128,12 +1128,11 @@ $(document).ready(function() {
function resetAdvGui() {
var tabsContent=$("#cla-TabContent").find(".tab-pane:not(:first)");
var tabs=$("#tab-list li:not(:first)");
if ($(tabsContent).length) {
var claIdNum = '';
$(tabsContent).each(function(){
$(this).remove();
});
$(tabs).each(function(){
claIdNum = $(this)[0].id.substring(3);
delete queryJson["Clausola" + claIdNum];
$(this).remove();
});
};