Bugzilla – Attachment 158481 Details for
Bug 35068
Split 'Renew or check in selected items' button in issues table into separate buttons
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35068: Split RenewCheckinChecked button into seperate renew/checkin buttons
Bug-35068-Split-RenewCheckinChecked-button-into-se.patch (text/plain), 6.06 KB, created by
Victor Grousset/tuxayo
on 2023-11-05 19:40:42 UTC
(
hide
)
Description:
Bug 35068: Split RenewCheckinChecked button into seperate renew/checkin buttons
Filename:
MIME Type:
Creator:
Victor Grousset/tuxayo
Created:
2023-11-05 19:40:42 UTC
Size:
6.06 KB
patch
obsolete
>From b5180099d21534049bd909d2615be7c1cd2e57d8 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Mon, 16 Oct 2023 22:20:54 +0000 >Subject: [PATCH] Bug 35068: Split RenewCheckinChecked button into seperate > renew/checkin buttons > >To test: >1. APPLY patch, clear browser's cache >2. Have more than 1 checkout issued to a borrower. >3. Load the checkout table on circ/circulation.pl >4. Notice that there is now 'Renew selected items' and 'Checkin > selected items' button. >5. Play around with each making sure that they work as excepted when > checkouts are checked in either the 'Check in' or 'Renew' columns. >6. Uncheck everything in the 'Renew column', the 'Renew selected items' > button should be disabled. >7. Uncheck everything in the 'Checkin column', the 'Checkin selected > items' button should be disabled. >8. Try unchecking some of these to make sure the Renew/Checkin button is > properly disabled when no related checkboxes are checked. >9. Try using the select all/none options at the top of both the 'Renew' > and 'Checkin' columns. Make sure the 'Renew selected items' and > 'Checkin selected items' become properly disabled/enabled. >10. Make sure the 'Renew all' button still works properly. >11. Do the test plan of 5th patch "Make sure renew/checkin selections" > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >Signed-off-by: Kelly <kelly@bywatersolutions.com> >Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> >--- > .../prog/en/includes/checkouts-table.inc | 3 ++- > koha-tmpl/intranet-tmpl/prog/js/checkouts.js | 25 +++++++++++++++++-- > 2 files changed, 25 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc >index 05c888f055..a51fb10347 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc >@@ -62,7 +62,8 @@ > <label id="renew_as_unseen_label" for="override_limit">Renew as "unseen" if appropriate:</label> > <input type="checkbox" name="renew_as_unseen" id="renew_as_unseen_checkbox" value="1" /> > [% END %] >- <button class="btn btn-default" id="RenewCheckinChecked"><i class="fa fa-check"></i> Renew or check in selected items</button> >+ <button class="btn btn-default" id="RenewChecked" disabled="disabled"><i class="fa fa-check"></i> Renew selected items</button> >+ <button class="btn btn-default" id="CheckinChecked" disabled="disabled"><i class="fa fa-check"></i> Check in selected items</button> > <button class="btn btn-default" id="RenewAll"><i class="fa fa-book"></i> Renew all</button> > [% END %] > </fieldset> >diff --git a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >index b434b504cd..1c8003b24a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >@@ -30,11 +30,13 @@ $(document).ready(function() { > $("#CheckAllRenewals").on("click",function(){ > $("#UncheckAllCheckins").click(); > $(".renew:visible").prop("checked", true); >+ $('#RenewChecked').prop('disabled', !$('.renew:checked').length ); > showHideOnHoldRenewal(); > return false; > }); > $("#UncheckAllRenewals").on("click",function(){ > $(".renew:visible").prop("checked", false); >+ $('#RenewChecked').prop('disabled', !$('.renew:checked').length ); > showHideOnHoldRenewal(); > return false; > }); >@@ -42,10 +44,12 @@ $(document).ready(function() { > $("#CheckAllCheckins").on("click",function(){ > $("#UncheckAllRenewals").click(); > $(".checkin:visible").prop("checked", true); >+ $('#CheckinChecked').prop('disabled', !$('.checkin:checked').length ); > return false; > }); > $("#UncheckAllCheckins").on("click",function(){ > $(".checkin:visible").prop("checked", false); >+ $('#CheckinChecked').prop('disabled', !$('.checkin:checked').length ); > return false; > }); > >@@ -64,11 +68,15 @@ $(document).ready(function() { > if ( $(this).is(":checked") ) { > $( "#checkin_" + $(this).val() ).prop("checked", false); > } >+ $('#CheckinChecked').prop('disabled', !$('.checkin:checked').length ); >+ $('#RenewChecked').prop('disabled', !$('.renew:checked').length ); > }); > $(document).on("change", '.checkin', function(){ > if ( $(this).is(":checked") ) { > $( "#renew_" + $(this).val() ).prop("checked", false); > } >+ $('#CheckinChecked').prop('disabled', !$('.checkin:checked').length ); >+ $('#RenewChecked').prop('disabled', !$('.renew:checked').length ); > }); > > // Display on hold due dates input when an on hold item is >@@ -97,7 +105,7 @@ $(document).ready(function() { > }); > > // Handle renewals and returns >- $("#RenewCheckinChecked").on("click",function(){ >+ $("#CheckinChecked").on("click",function(){ > > let refresh_table = true; > $(".checkin:checked:visible").each(function() { >@@ -138,7 +146,20 @@ $(document).ready(function() { > async: false, > }); > }); >+ // Refocus on barcode field if it exists >+ if ( $("#barcode").length ) { >+ $("#barcode").focus(); >+ } >+ >+ if ( refresh_table ) { >+ RefreshIssuesTable(); >+ } > >+ // Prevent form submit >+ return false; >+ }); >+ $("#RenewChecked").on("click",function(){ >+ let refresh_table = true; > $(".confirm:checked:visible").each(function() { > itemnumber = $(this).val(); > id = "#checkin_" + itemnumber; >@@ -237,7 +258,7 @@ $(document).ready(function() { > $("#CheckAllRenewals").click(); > $("#UncheckAllCheckins").click(); > showHideOnHoldRenewal(); >- $("#RenewCheckinChecked").click(); >+ $("#RenewChecked").click(); > > // Prevent form submit > return false; >-- >2.42.1
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 35068
:
157218
|
157254
|
157357
|
157465
|
157466
|
157467
|
157468
|
157523
|
157524
|
157525
|
157526
|
157552
|
158343
|
158476
|
158477
|
158478
|
158479
|
158480
|
158481
|
158482
|
158483
|
158484
|
158485
|
158788
|
158789
|
158790
|
158791
|
158792