Bugzilla – Attachment 155251 Details for
Bug 34302
Checkin and renewal error messages disappear immediately in checkouts table
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34302: (bug 28653 follow-up) Do not refresh the table if an error happened
Bug-34302-bug-28653-follow-up-Do-not-refresh-the-t.patch (text/plain), 2.50 KB, created by
David Cook
on 2023-09-06 02:58:42 UTC
(
hide
)
Description:
Bug 34302: (bug 28653 follow-up) Do not refresh the table if an error happened
Filename:
MIME Type:
Creator:
David Cook
Created:
2023-09-06 02:58:42 UTC
Size:
2.50 KB
patch
obsolete
>From 87c3a1a79c2df55a27cb15909fd49c3422788ddb Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 27 Jul 2023 15:01:24 +0200 >Subject: [PATCH] Bug 34302: (bug 28653 follow-up) Do not refresh the table if > an error happened > >If checkin or renew failed, we should not refresh the table or it will >hide the error message. > >Test plan: >Apply the DO NOT PUSH patch >Do a renew >=> No error in the table >Apply this patch >Do a renew >=> You see the error >Revert the DO NOT PUSH patch >Do a renew >=> The table is refreshed > >Signed-off-by: David Cook <dcook@prosentient.com.au> >--- > koha-tmpl/intranet-tmpl/prog/js/checkouts.js | 12 ++++++++---- > 1 file changed, 8 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >index 3ed706fa7e..45ed7e8d7f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >@@ -98,6 +98,8 @@ $(document).ready(function() { > > // Handle renewals and returns > $("#RenewCheckinChecked").on("click",function(){ >+ >+ let refresh_table = true; > $(".checkin:checked:visible").each(function() { > itemnumber = $(this).val(); > >@@ -127,6 +129,7 @@ $(document).ready(function() { > } else { > content = __("Unable to check in"); > $(id).parent().parent().addClass('warn'); >+ refresh_table = false; > } > > $(id).replaceWith( content ); >@@ -205,6 +208,7 @@ $(document).ready(function() { > } else { > content += __("reason unknown"); > } >+ refresh_table = false; > } > > $(id).replaceWith( content ); >@@ -219,6 +223,10 @@ $(document).ready(function() { > $("#barcode").focus(); > } > >+ if ( refresh_table ) { >+ RefreshIssuesTable(); >+ } >+ > // Prevent form submit > return false; > }); >@@ -250,10 +258,6 @@ $(document).ready(function() { > return false; > }); > >- $('#RenewCheckinChecked').on('click', function(){ >- RefreshIssuesTable(); >- }); >- > if ( Cookies.get("issues-table-load-immediately-" + script) == "true" ) { > if ( LoadCheckoutsTableDelay ) { > loadIssuesTableDelayTimeoutId = setTimeout( function(){ LoadIssuesTable() }, LoadCheckoutsTableDelay * 1000); >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 34302
:
153969
|
153970
|
155251
|
155910