diff --git a/public_html_admin/js/clients.js b/public_html_admin/js/clients.js index 52fb392..d4624b4 100644 --- a/public_html_admin/js/clients.js +++ b/public_html_admin/js/clients.js @@ -150,7 +150,7 @@ function modalViewClient_initTabAbsences() { modalViewClient.find("div.tabAbsences table tbody").append(tr); nullChild = modalViewClient.find("div.tabAbsences table tbody tr.nullChild"); - if(nullChild.length>0) nullChild.remove(); + if(nullChild.length>0) nullChild.addClass("hide"); modalViewClient_initAbsenceRow(tr); }); @@ -239,7 +239,11 @@ function modalViewClient_initAbsenceRow(row) { // CANCEL if(row.hasClass("editable")) { - if(ref == 'new') row.remove(); + if(ref == 'new') { + list = row.parent(); + row.remove(); + if(list.find("tr:not(.nullChild)").length==0) list.find("tr.nullChild").removeClass("hide"); + } else { iptDebut.blur(); iptFin.blur(); iptRmq.blur();