+
-
li",
- handle: ".handle"
+ handle: ".handle",
+ opacity: 0.6,
+ cursor: 'move'
});
// Inizializza selectable-xX0 e definisce le funzioni
@@ -240,23 +242,34 @@ $(document).ready(function() {
var claListItemId = $(this).closest('li').attr('id');
var claIdNum = claListItemId.substr(6);
claListLen--;
- $("#" + claListItemId)[0].remove();
- delete queryJson["Clausola" + claIdNum];
- delete window["context" + claIdNum];
- refreshClaList();
- refreshSortables();
+ //$("#" + claListItemId)[0].remove();
+ $("#" + claListItemId).fadeOut('fast',
+ function(){
+ $("#" + claListItemId)[0].remove();
+
+ delete queryJson["Clausola" + claIdNum];
+ delete window["context" + claIdNum];
+ refreshClaList();
+ refreshSortables();
+ });
});
// Evento: click sull'icona rimuovi condizione
$('#sortable0').on('click', '.removeCond', function() {
- $(this).closest('ul').parent().remove();
- condListLen--;
- refreshClaList();
- refreshSortables();
- refreshConnectWith();
- if (claListLen == 0 && condListLen == 0) {
- $('#sortable0').html(emptyClaList);
- }
+ //$(this).closest('ul').parent().remove();
+ var here = this;
+ $(this).closest('ul').parent().fadeOut('fast',
+ function(here){
+ $(here).closest('ul').parent().remove();
+
+ condListLen--;
+ refreshClaList();
+ refreshSortables();
+ refreshConnectWith();
+ if (claListLen == 0 && condListLen == 0) {
+ $('#sortable0').html(emptyClaList);
+ }
+ });
});
// Evento: click sulla lista di clausole nel dropbox "Aggiungi clausola di tipo:" o "aggiungi condizione logica:"
@@ -301,13 +314,13 @@ $(document).ready(function() {
if (condtype == "AND") {
$("#cond" + condId).removeClass( "condLI-OR bg-lida13" )
$("#cond" + condId).addClass( "condLI-AND bg-lida12" )
- $(this).removeClass( "bg-lida13" )
- $(this).addClass( "bg-lida12" )
+ //$(this).removeClass( "bg-lida13" )
+ //$(this).addClass( "bg-lida12" )
} else {
$("#cond" + condId).removeClass( "condLI-AND bg-lida12" )
$("#cond" + condId).addClass( "condLI-OR bg-lida13" )
- $(this).removeClass( "bg-lida12" )
- $(this).addClass( "bg-lida13" )
+ //$(this).removeClass( "bg-lida12" )
+ //$(this).addClass( "bg-lida13" )
};
refreshClaList();
});
@@ -328,7 +341,7 @@ $(document).ready(function() {
// Evento: click sull'icona di refresh dei radio button
$('#cla-TabContent').on('click', '.radioReset', function() {
- fSet = $(this).siblings('fieldset');
+ fSet = $(this).parent().siblings('fieldset');
if (fSet.find(":checked").length) {
radioChecked = fSet.find(":checked")[0];
radioChecked.checked = false;
@@ -562,7 +575,10 @@ $(document).ready(function() {
// Variabili testuali per compattezza
- const iconReset = '
';
+ const iconReset2 = '
';
+ const iconReset = ' \
+
';
const iconCloseCond = '
';
const emptyClaList = 'Nessuna clausola aggiunta.';
const defaultCond = '
Clausole e condizioni in AND di default
';
@@ -639,7 +655,7 @@ $(document).ready(function() {
switch (vals.length) {
case 2:
var element = $('
');
- element.attr('class', ' d-flex flex-sm-nowrap pr-2 py-1 mb-1 form-group form-control justify-content-between bg-light');
+ element.attr('class', 'd-flex flex-sm-nowrap pr-0 py-0 mb-1 form-group form-control-sm border justify-content-between bg-light');
var rbfieldset = $('
');
var flexdiv1 = $('
');
var flexdiv2 = $('
');
@@ -650,8 +666,10 @@ $(document).ready(function() {
rbfieldset.attr('id', tabPaneId + keys[key].replace(/\s/g, ''));
rbfieldset.attr('class', 'custom-control-inline monMe');
- flexdiv1.attr('class', 'custom-control custom-radio custom-control-inline m-0 pb-0');
+ flexdiv1.attr('class', 'custom-control custom-radio custom-control-inline m-0 mr-2 pb-0');
+ flexdiv1.attr('style', 'padding-top: 2px!important;');
flexdiv2.attr('class', 'custom-control custom-radio custom-control-inline m-0 pb-0');
+ flexdiv2.attr('style', 'padding-top: 2px!important;');
input1.attr('class', 'custom-control-input');
input2.attr('class', 'custom-control-input');
input1.attr('type', 'radio');
@@ -662,8 +680,10 @@ $(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 text-muted');
- label2.attr('class', 'custom-control-label form-control-sm custom-control-inline m-0 pl-1 text-muted');
+ label1.attr('class', 'custom-control-label form-control-sm custom-control-inline m-0 pl-0 text-muted curPoint');
+ label1.attr('style', 'padding-top: 2px!important;');
+ label2.attr('class', 'custom-control-label form-control-sm custom-control-inline m-0 pl-0 text-muted curPoint');
+ label2.attr('style', 'padding-top: 2px!important;');
label1.attr('for', tabPaneId + vals[0].replace(/\s/g, ''));
label2.attr('for', tabPaneId + vals[1].replace(/\s/g, ''));
label1.append(vals[0]);
@@ -682,20 +702,23 @@ $(document).ready(function() {
break;
case 1:
var element = $('
');
- element.attr('class', ' d-flex flex-sm-nowrap pr-2 py-1 mb-1 form-group form-control bg-light');
+ //element.attr('class', ' d-flex flex-sm-nowrap pr-2 py-1 mb-1 form-group form-control bg-light');
+ element.attr('class', 'd-flex flex-sm-nowrap form-group form-control-sm border px-2 mb-1 pt-1 pb-0 bg-light');
var rbfieldset = $('
');
flexdiv1 = $('
');
input1 = $('
');
label1 = $('
');
rbfieldset.attr('id', tabPaneId + keys[key].replace(/\s/g, ''));
- rbfieldset.attr('class', 'custom-control-inline monMe');
+ rbfieldset.attr('class', 'custom-control-inline monMe align-items-center');
flexdiv1.attr('class', 'custom-control custom-checkbox custom-control-inline');
- input1.attr('class', 'custom-control-input');
+ flexdiv1.attr('style', 'padding-top: 1px!important;');
+ input1.attr('class', 'custom-control-input align-self-center');
input1.attr('type', 'checkbox');
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 text-muted');
+ label1.attr('class', 'custom-control-label form-control-sm custom-control-inline p-0 text-muted curPoint align-self-start');
+ label1.attr('style', 'padding-top: 2px!important;');
label1.attr('for', tabPaneId + vals[0].replace(/\s/g, ''));
label1.append(vals[0]);
@@ -707,8 +730,9 @@ $(document).ready(function() {
break;
default:
var element = $('
');
- element.attr('class', ' form-group px-0 pb-1 m-0');
- var select = $('
');
+ element.attr('class', ' form-group p-0 pb-1 m-0');
+ //var select = $('
');
+ var select = $('
');
select.attr('id', tabPaneId + keys[key].replace(/\s/g, ''));
select.attr('title', keys[key]);
select.attr('name', keys[key]);
@@ -958,8 +982,8 @@ $(document).ready(function() {
$("#cla-TabContent .ui-sortable:not(:first)").each(function() {
var sortableID = $(this)[0].id;
var placeholderID = "#placeholderSort" + sortableID.slice(-1);
- var iconSpan = $(this).find(".iconClClass")[0];
- var iconDiv = $(iconSpan).parent()[0];
+ var iconBtn = $(this).find(".iconClClass")[0];
+ var iconDiv = $(iconBtn).parent()[0];
var activeUL = $(this).children("li").children("ul").length;
var activeLI = 0;
var inactiveLI = 0;
@@ -991,8 +1015,9 @@ $(document).ready(function() {
$("#" + sortableID).append(condLIplaceholder);
};
if (inactiveLI == 0){
- $(iconSpan).attr("class","iconClClass removeCond");
- $(iconDiv).attr("class","p-0 mr-3 mt-0 text-right text-success");
+ $(iconBtn).attr("class","btn btn-sm btn-outline-success iconClClass removeCond text-success border rounded px-1 pb-0");
+ $(iconBtn).prop("disabled", false);
+ $(iconDiv).attr("class","col-md-auto p-0 mr-2 mt-0 text-right text-success");
};
break;
case 1:
@@ -1010,15 +1035,17 @@ $(document).ready(function() {
}
$("#" + sortableID).append(condLIplaceholder);
};
- $(iconSpan).attr("class","iconClClass NOremoveCond");
- $(iconDiv).attr("class","p-0 mr-3 mt-1 text-right text-muted");
+ $(iconBtn).attr("class","btn btn-sm iconClClass NOremoveCond text-muted border rounded px-1 pb-0");
+ $(iconBtn).prop("disabled", true);
+ $(iconDiv).attr("class","col-md-auto p-0 mr-2 mt-0 text-right text-muted");
break;
case 2:
if ($(placeholderID).length) {
$(placeholderID).remove();
};
- $(iconSpan).attr("class","iconClClass NOremoveCond");
- $(iconDiv).attr("class","p-0 mr-3 mt-1 text-right text-muted");
+ $(iconBtn).attr("class","btn btn-sm iconClClass NOremoveCond text-muted border rounded px-1 pb-0");
+ $(iconBtn).prop("disabled", true);
+ $(iconDiv).attr("class","col-md-auto p-0 mr-2 mt-0 text-right text-muted");
break;
default:
if ($(placeholderID).length) {