From 251ca32efbbec6b01a4667b786a9ff1b2d69392b Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 27 Jun 2022 17:53:15 +0100 Subject: [PATCH] Bug 31085: Reload return claims table on resolve This is another fix for a bug in return claims. We now test for the initialised datatable and call an ajax reload directly on it if we find one instead of calling a undefined function (the function is out of scope here). NOTE: Taken as a whole commit follow-up on bug 28854 where the issue was initially identified Signed-off-by: Katrin Fischer --- koha-tmpl/intranet-tmpl/prog/js/resolve_claim_modal.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/resolve_claim_modal.js b/koha-tmpl/intranet-tmpl/prog/js/resolve_claim_modal.js index c59ee023e5b..a60598db6c3 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/resolve_claim_modal.js +++ b/koha-tmpl/intranet-tmpl/prog/js/resolve_claim_modal.js @@ -30,9 +30,11 @@ $(document).on('click', '#claims-returned-resolved-modal-btn-submit', function(e success: function(data) { $('#claims-returned-resolved-modal-btn-submit-spinner').hide(); $('#claims-returned-resolved-modal-btn-submit-icon').show(); - $('#claims-returned-resolved-modal').modal('hide') + $('#claims-returned-resolved-modal').modal('hide'); - refreshReturnClaimsTable(); + if ( $.fn.dataTable.isDataTable("#return-claims-table") ) { + $("#return-claims-table").DataTable().ajax.reload(); + } }, contentType: "json" }); -- 2.30.2