Corretti bug sulle espressioni logiche
This commit is contained in:
parent
dc93993858
commit
4dd21da664
|
@ -1947,7 +1947,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-auto p-0 m-0 text-right text-success">
|
<div class="col-md-auto p-0 m-0 text-right text-success">
|
||||||
<button class="btn btn-sm removeCla text-success border rounded px-1 pb-0" style="z-index: 90">
|
<button class="btn btn-sm removeCla text-success border rounded px-1 pb-0" style="z-index: 90" id="removeClaxX3Xx">
|
||||||
<ion-icon name="close-circle"></ion-icon>
|
<ion-icon name="close-circle"></ion-icon>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -2008,7 +2008,7 @@
|
||||||
<div class="col-md-auto p-0 m-0 text-right text-success">
|
<div class="col-md-auto p-0 m-0 text-right text-success">
|
||||||
<button
|
<button
|
||||||
class="btn btn-sm removeCla text-success border rounded px-1 pb-0"
|
class="btn btn-sm removeCla text-success border rounded px-1 pb-0"
|
||||||
style="z-index: 90">
|
style="z-index: 90" id="removeRifxR3Rx">
|
||||||
<ion-icon name="close-circle"></ion-icon>
|
<ion-icon name="close-circle"></ion-icon>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -408,6 +408,7 @@ $(document).ready(function() {
|
||||||
$(tabPanelId).attr("data-claActive", 0);
|
$(tabPanelId).attr("data-claActive", 0);
|
||||||
$(this).closest('li').find('.clatext').fadeTo( "slow", 0.6 );
|
$(this).closest('li').find('.clatext').fadeTo( "slow", 0.6 );
|
||||||
}
|
}
|
||||||
|
refreshClaList();
|
||||||
refreshSortables();
|
refreshSortables();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -1003,17 +1004,34 @@ $(document).ready(function() {
|
||||||
queryJson.Clausola0.contesto = JSON.stringify(window.context0);
|
queryJson.Clausola0.contesto = JSON.stringify(window.context0);
|
||||||
queryJson.unitaRicerca = $("#unitaRicerca")[0].options[$("#unitaRicerca")[0].selectedIndex].value;
|
queryJson.unitaRicerca = $("#unitaRicerca")[0].options[$("#unitaRicerca")[0].selectedIndex].value;
|
||||||
var claLiArray = $("#sortable0").find(".claLI");
|
var claLiArray = $("#sortable0").find(".claLI");
|
||||||
|
var countActCla = 0;
|
||||||
|
var buttonID = "";
|
||||||
if ($(claLiArray).length) {
|
if ($(claLiArray).length) {
|
||||||
if ($("#li-cla0")[0]) {
|
if ($("#li-cla0")[0]) {
|
||||||
$("#li-cla0")[0].remove();
|
$("#li-cla0")[0].remove();
|
||||||
};
|
};
|
||||||
$(claLiArray).each(function(){
|
$(claLiArray).each(function(){
|
||||||
var claIdNum = $(this).attr('id').substr(6);
|
var claIdNum = $(this).attr('id').substr(6);
|
||||||
|
if ($(this).find(".claAct").prop('checked')) {
|
||||||
|
countActCla++;
|
||||||
|
}
|
||||||
updateClaListItem(claIdNum, "#sortable0");
|
updateClaListItem(claIdNum, "#sortable0");
|
||||||
});
|
});
|
||||||
if ($(claLiArray).length == 1) {
|
if ($(claLiArray).length == 1) {
|
||||||
var remCla = claLiArray.find(".removeCla");
|
var remCla = claLiArray.find(".removeCla");
|
||||||
remCla.addClass("disabled");
|
remCla.addClass("disabled");
|
||||||
|
var actCla = claLiArray.find(".claAct");
|
||||||
|
actCla.prop('disabled', true);
|
||||||
|
} else {
|
||||||
|
if ( countActCla == 1 ) {
|
||||||
|
claLiArray.find(".claAct").each(function(){
|
||||||
|
if ($(this).prop('checked')) {
|
||||||
|
$(this).prop('disabled', true);
|
||||||
|
buttonID = "removeCla" + $(this).attr('id').substr(9);
|
||||||
|
$('#'+buttonID).addClass("disabled");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
if (claListLen == 0 && condListLen == 0) {
|
if (claListLen == 0 && condListLen == 0) {
|
||||||
|
@ -1026,16 +1044,32 @@ $(document).ready(function() {
|
||||||
|
|
||||||
var rifLiArray = $("#sortableRif0").find(".rifLI");
|
var rifLiArray = $("#sortableRif0").find(".rifLI");
|
||||||
if ($(rifLiArray).length) {
|
if ($(rifLiArray).length) {
|
||||||
|
countActCla = 0;
|
||||||
if ($("#li-rif0")[0]) {
|
if ($("#li-rif0")[0]) {
|
||||||
$("#li-rif0")[0].remove();
|
$("#li-rif0")[0].remove();
|
||||||
};
|
};
|
||||||
$(rifLiArray).each(function(){
|
$(rifLiArray).each(function(){
|
||||||
var rifIdNum = $(this).attr('id').substr(6);
|
var rifIdNum = $(this).attr('id').substr(6);
|
||||||
|
if ($(this).find(".claAct").prop('checked')) {
|
||||||
|
countActCla++;
|
||||||
|
}
|
||||||
updateRifListItem(rifIdNum, "#sortableRif0");
|
updateRifListItem(rifIdNum, "#sortableRif0");
|
||||||
});
|
});
|
||||||
if ($(rifLiArray).length == 1) {
|
if ($(rifLiArray).length == 1) {
|
||||||
var remCla = rifLiArray.find(".removeCla");
|
var remCla = rifLiArray.find(".removeCla");
|
||||||
remCla.addClass("disabled");
|
remCla.addClass("disabled");
|
||||||
|
var actCla = rifLiArray.find(".claAct");
|
||||||
|
actCla.prop('disabled', true);
|
||||||
|
} else {
|
||||||
|
if ( countActCla == 1 ) {
|
||||||
|
rifLiArray.find(".claAct").each(function(){
|
||||||
|
if ($(this).prop('checked')) {
|
||||||
|
$(this).prop('disabled', true);
|
||||||
|
buttonID = "removeRif" + $(this).attr('id').substr(9);
|
||||||
|
$('#'+buttonID).addClass("disabled");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
if (rifLiArray == 0 && condListRifLen == 0) {
|
if (rifLiArray == 0 && condListRifLen == 0) {
|
||||||
|
@ -1079,6 +1113,11 @@ $(document).ready(function() {
|
||||||
if (remCla.hasClass("disabled")) {
|
if (remCla.hasClass("disabled")) {
|
||||||
remCla.removeClass("disabled");
|
remCla.removeClass("disabled");
|
||||||
}
|
}
|
||||||
|
var actCla = $("#" + rifListItemId).find(".claAct");
|
||||||
|
if (actCla.attr('disabled')) {
|
||||||
|
actCla.prop('disabled', false);
|
||||||
|
}
|
||||||
|
|
||||||
rifSubParList.each(function() {
|
rifSubParList.each(function() {
|
||||||
var claSubParType = $(this)[0].type;
|
var claSubParType = $(this)[0].type;
|
||||||
if (claSubParType == "select-one") {
|
if (claSubParType == "select-one") {
|
||||||
|
@ -1130,6 +1169,11 @@ $(document).ready(function() {
|
||||||
if (remCla.hasClass("disabled")){
|
if (remCla.hasClass("disabled")){
|
||||||
remCla.removeClass("disabled");
|
remCla.removeClass("disabled");
|
||||||
}
|
}
|
||||||
|
var actCla = $("#" + claListItemId).find(".claAct");
|
||||||
|
if (actCla.attr('disabled')) {
|
||||||
|
actCla.prop('disabled', false);
|
||||||
|
}
|
||||||
|
|
||||||
switch (claType) {
|
switch (claType) {
|
||||||
case "Clausola":
|
case "Clausola":
|
||||||
var l_f = $("form #lemma_forma" + claIdNum)[0].options[$("form #lemma_forma" + claIdNum)[0].selectedIndex].value;
|
var l_f = $("form #lemma_forma" + claIdNum)[0].options[$("form #lemma_forma" + claIdNum)[0].selectedIndex].value;
|
||||||
|
|
Loading…
Reference in New Issue