Fix aggiunta modelli di prima nota

This commit is contained in:
MatteoPistorello 2022-08-05 17:18:04 +02:00
parent ec861eb5f8
commit 38c5cc2ab8
1 changed files with 6 additions and 3 deletions

View File

@ -136,15 +136,18 @@ echo '
});
$(document).on("change", "select", function() {
let row = $(this).parent().parent();
let row = $(this).parent().parent().parent();
if (row.find("input[disabled]").length > 1) {
row.find("input").prop("disabled", !$(this).val());
}
// Trigger dell\'evento keyup() per la prima volta, per eseguire i dovuti controlli nel caso siano predisposte delle righe in prima nota
$("input[id*=dare][value!=\'\'], input[id*=avere][value!=\'\']").keyup();
});
$(document).on("keyup change", "input[id*=dare]", function() {
let row = $(this).parent().parent();
let row = $(this).parent().parent().parent();
if (!$(this).prop("disabled")) {
row.find("input[id*=avere]").prop("disabled", $(this).val().toEnglish());
@ -152,7 +155,7 @@ echo '
});
$(document).on("keyup change", "input[id*=avere]", function() {
let row = $(this).parent().parent();
let row = $(this).parent().parent().parent();
if (!$(this).prop("disabled")) {
row.find("input[id*=dare]").prop("disabled", $(this).val().toEnglish());