Risolti bug grafica e condizioni logiche
This commit is contained in:
parent
a7f211ff32
commit
8daca7d2e5
|
@ -1036,7 +1036,7 @@
|
|||
<ul id="sortable0"
|
||||
class="condLIand list-group ui-sortable">
|
||||
<li id="li-cla0"
|
||||
class="list-group-item align-items-center my-1 ui-state-default ui-state-disabled border text-muted bg-lida-vis ui-state-disabled-opacity-06 small">Nessuna
|
||||
class="list-group-item align-items-center my-1 ui-state-default ui-state-disabled ui-state-disabled-opacity-06 border text-muted bg-lida-vis small">Nessuna
|
||||
clausola aggiunta.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -1914,7 +1914,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<li id="placeholderSortxX4Xx"
|
||||
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">Trascina
|
||||
class="mx-0 my-1 p-1 pl-3 list-group-item align-items-center border text-muted small bg-light ui-state-disabled">Trascina
|
||||
qui almeno 2 clausole o condizioni</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
|
|
@ -176,14 +176,12 @@ $(document).ready(function() {
|
|||
alsoResize: "#displaycanto",
|
||||
resize: function(event, ui) {
|
||||
$("#displaycanto").width(" min-content");
|
||||
|
||||
var infoHeightToSet = $("body")[0].clientHeight*cssTableMainHeight - $(visCantoClass)[0].clientHeight-2-63-2-46
|
||||
$("#displayinfo").css("maxHeight", infoHeightToSet+"px");
|
||||
$("#displayinfo").css("height", infoHeightToSet+"px");
|
||||
$("#displaynote").css("maxHeight", infoHeightToSet+"px");
|
||||
$("#displaynote").css("height", infoHeightToSet+"px");
|
||||
$(".visInfo").css("height", (infoHeightToSet+4)+"px");
|
||||
|
||||
getDimensionsDiv(true);
|
||||
},
|
||||
stop: function(event, ui) {
|
||||
|
@ -242,29 +240,28 @@ $(document).ready(function() {
|
|||
var claListItemId = $(this).closest('li').attr('id');
|
||||
var claIdNum = claListItemId.substr(6);
|
||||
claListLen--;
|
||||
$("#" + claListItemId).fadeOut('fast',
|
||||
function(){
|
||||
$("#" + claListItemId)[0].remove();
|
||||
delete queryJson["Clausola" + claIdNum];
|
||||
var thisIs = $("#" + claListItemId);
|
||||
$("#" + claListItemId).fadeOut(300, function(){
|
||||
thisIs.remove();
|
||||
delete queryJson["Clausola" + claIdNum];
|
||||
delete window["context" + claIdNum];
|
||||
refreshClaList();
|
||||
refreshSortables();
|
||||
refreshClaList();
|
||||
refreshSortables();
|
||||
});
|
||||
});
|
||||
|
||||
// Evento: click sull'icona rimuovi condizione
|
||||
$('#sortable0').on('click', '.removeCond', function() {
|
||||
var here = this;
|
||||
$(this).closest('ul').parent().fadeOut('fast',
|
||||
function(here){
|
||||
$(here).closest('ul').parent().remove();
|
||||
var thisIs = $(this).closest('ul').parent();
|
||||
$(this).closest('ul').fadeOut(300, function(){
|
||||
thisIs.remove();
|
||||
condListLen--;
|
||||
refreshClaList();
|
||||
refreshSortables();
|
||||
refreshConnectWith();
|
||||
if (claListLen == 0 && condListLen == 0) {
|
||||
$('#sortable0').html(emptyClaList);
|
||||
};
|
||||
refreshClaList();
|
||||
refreshSortables();
|
||||
refreshConnectWith();
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -571,7 +568,6 @@ $(document).ready(function() {
|
|||
|
||||
|
||||
// Variabili testuali per compattezza
|
||||
const iconReset2 = '<div class="text-right text-success radioReset"><ion-icon name="refresh-circle"></ion-icon></div>';
|
||||
const iconReset = '<div class="p-0 align-self-start align-items-start justify-content-end text-right"> \
|
||||
<button class="btn btn-sm btn-outline-success bg-light radioReset border rounded text-success px-1 pb-0" style="margin-top: 1px !important;margin-right: 1px !important;"> \
|
||||
<ion-icon name="refresh-circle"></ion-icon></button></div>';
|
||||
|
@ -585,7 +581,7 @@ $(document).ready(function() {
|
|||
const condLIplaceholderText1d = 'Trascina qui almeno 1 clausola o condizione, oppure attiva le clausole inattive';
|
||||
const condLIplaceholderText2d = 'Trascina qui almeno 2 clausole o condizioni, oppure attiva le clausole inattive';
|
||||
const condLIplaceholderPart1 = '<li id="placeholderSort';
|
||||
const 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">';
|
||||
const 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">';
|
||||
|
||||
// Variabili e costanti funzionali
|
||||
var minimapScrolling = false;
|
||||
|
@ -997,18 +993,28 @@ $(document).ready(function() {
|
|||
switch (activeLI + activeUL) {
|
||||
case 0:
|
||||
if ($(placeholderID).length) {
|
||||
if (inactiveLI > 0){
|
||||
$(placeholderID).text(condLIplaceholderText2d);
|
||||
} else {
|
||||
$(placeholderID).text(condLIplaceholderText2);
|
||||
};
|
||||
|
||||
$(placeholderID).fadeOut(300, function(){
|
||||
if (inactiveLI > 0){
|
||||
$(placeholderID).text(condLIplaceholderText2d);
|
||||
} else {
|
||||
$(placeholderID).text(condLIplaceholderText2);
|
||||
};
|
||||
$(placeholderID).fadeTo(100, 0.9).fadeTo(300, 0.6);
|
||||
});
|
||||
|
||||
} else {
|
||||
if (inactiveLI > 0){
|
||||
condLIplaceholder = condLIplaceholderPart1 + sortableID.slice(-1) + condLIplaceholderPart2 + condLIplaceholderText2d + '</li>';
|
||||
} else {
|
||||
condLIplaceholder = condLIplaceholderPart1 + sortableID.slice(-1) + condLIplaceholderPart2 + condLIplaceholderText2 + '</li>';
|
||||
}
|
||||
$("#" + sortableID).append(condLIplaceholder);
|
||||
//$("#" + sortableID).append(condLIplaceholder).hide().fadeIn(300);
|
||||
$("#" + sortableID).append(function(){
|
||||
return $(condLIplaceholder).hide();
|
||||
});
|
||||
$(placeholderID).fadeTo(100, 0.9).fadeTo(300, 0.6);
|
||||
|
||||
};
|
||||
if (inactiveLI == 0){
|
||||
$(iconBtn).attr("class","btn btn-sm btn-outline-success iconClClass removeCond text-success border rounded px-1 pb-0");
|
||||
|
@ -1018,18 +1024,25 @@ $(document).ready(function() {
|
|||
break;
|
||||
case 1:
|
||||
if ($(placeholderID).length) {
|
||||
if (inactiveLI > 0){
|
||||
$(placeholderID).text(condLIplaceholderText1d);
|
||||
} else {
|
||||
$(placeholderID).text(condLIplaceholderText1);
|
||||
};
|
||||
$(placeholderID).fadeOut(300, function(){
|
||||
if (inactiveLI > 0){
|
||||
$(placeholderID).text(condLIplaceholderText1d);
|
||||
} else {
|
||||
$(placeholderID).text(condLIplaceholderText1);
|
||||
};
|
||||
$(placeholderID).fadeTo(100, 0.9).fadeTo(300, 0.6);
|
||||
});
|
||||
} else {
|
||||
if (inactiveLI > 0){
|
||||
condLIplaceholder = condLIplaceholderPart1 + sortableID.slice(-1) + condLIplaceholderPart2 + condLIplaceholderText1d + '</li>';
|
||||
} else {
|
||||
condLIplaceholder = condLIplaceholderPart1 + sortableID.slice(-1) + condLIplaceholderPart2 + condLIplaceholderText1 + '</li>';
|
||||
}
|
||||
$("#" + sortableID).append(condLIplaceholder);
|
||||
//$("#" + sortableID).append(condLIplaceholder).hide().fadeIn(300);
|
||||
$("#" + sortableID).append(function(){
|
||||
return $(condLIplaceholder).hide();
|
||||
});
|
||||
$(placeholderID).fadeTo(100, 0.9).fadeTo(300, 0.6);
|
||||
};
|
||||
$(iconBtn).attr("class","btn btn-sm iconClClass NOremoveCond text-muted border rounded px-1 pb-0");
|
||||
$(iconBtn).prop("disabled", true);
|
||||
|
@ -1037,7 +1050,10 @@ $(document).ready(function() {
|
|||
break;
|
||||
case 2:
|
||||
if ($(placeholderID).length) {
|
||||
$(placeholderID).remove();
|
||||
$(placeholderID).fadeOut(300, function(){
|
||||
$(placeholderID).remove();
|
||||
});
|
||||
//$(placeholderID).remove();
|
||||
};
|
||||
$(iconBtn).attr("class","btn btn-sm iconClClass NOremoveCond text-muted border rounded px-1 pb-0");
|
||||
$(iconBtn).prop("disabled", true);
|
||||
|
@ -1045,7 +1061,10 @@ $(document).ready(function() {
|
|||
break;
|
||||
default:
|
||||
if ($(placeholderID).length) {
|
||||
$(placeholderID).remove();
|
||||
$(placeholderID).fadeOut(300, function(){
|
||||
$(placeholderID).remove();
|
||||
});
|
||||
//$(placeholderID).remove();
|
||||
};
|
||||
};
|
||||
});
|
||||
|
@ -1386,9 +1405,7 @@ $(document).ready(function() {
|
|||
};
|
||||
|
||||
function incSize(currentSize, incr, min, max) {
|
||||
//fSize = (parseFloat(currentSize) + incr) % max + min;
|
||||
fSize = Math.max((parseFloat(currentSize) + incr) % max, min);
|
||||
//console.log("fSize: "+fSize);
|
||||
return (fSize) + 'px';
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue