@@ -1861,8 +1861,9 @@
class="col-md-auto px-0 align-self-start justify-content-end">
@@ -1895,7 +1898,7 @@
diff --git a/js/script_3.1.js b/js/script_3.1.js
index 9c5dab2..64899dc 100644
--- a/js/script_3.1.js
+++ b/js/script_3.1.js
@@ -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('
Mostra pannello');
@@ -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
@@ -682,7 +681,8 @@ $(document).ready(function() {
}
if (element) {
element.attr('style', "display: block;");
- element.appendTo(dettagliBox);
+ 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();
});
};