Bugzilla – Attachment 172373 Details for
Bug 38060
Bookings table does not render if tab opened from the URL
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38060: Load bookings table on page load if tab href exists in URL hash
Bug-38060-Load-bookings-table-on-page-load-if-tab-.patch (text/plain), 2.80 KB, created by
Biblibre Sandboxes
on 2024-10-03 20:38:59 UTC
(
hide
)
Description:
Bug 38060: Load bookings table on page load if tab href exists in URL hash
Filename:
MIME Type:
Creator:
Biblibre Sandboxes
Created:
2024-10-03 20:38:59 UTC
Size:
2.80 KB
patch
obsolete
>From d0097a7ab4ba9c20b25a0cffa5eb1eb0db1d2b1a Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Wed, 2 Oct 2024 10:25:55 +0000 >Subject: [PATCH] Bug 38060: Load bookings table on page load if tab href > exists in URL hash > >Test plan, k-t-d or sandbox: >1) Start by making an item bookable. Visit a record's detail page: ><staff_url>/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=76 >2) Make the first item (39999000003154) bookable by setting 'Bookable': Yes and click 'Update' >3) At the top of the page, you should now see a 'Place booking' button. Click that. >4) Select the patron: type 'koha' and pick 'koha (42)'. (This is borrowernumber 51). >5) Select booking dates, any date interval in the future. Click 'Submit'. >6) Attempt to access this patron's detail page with the bookings tab open: ><staff_url>/cgi-bin/koha/members/moremember.pl?borrowernumber=51#bookings_panel >7) Notice the tab opens, but the table does not render. >8) Attempt the same in the circulation page: ><staff_url>/cgi-bin/koha/circ/circulation.pl?borrowernumber=51#bookings_panel >9) Again, notice the tab opens, but the table does not render. >10) Apply patch. Repeat steps 6) and 8). Notice the table now renders. > >Additional testing: >1) Place a hold for this patron and attempt to access the holds tab directly: >/cgi-bin/koha/circ/circulation.pl?borrowernumber=51#holds_panel >2) Notice it opens the tab and renders the table. This was already the case prior to this patch, this patch is only bringing the same behavior to the bookings tab for consistency. > >Signed-off-by: davedaghita <ddaghita@mckinneytexas.org> >--- > koha-tmpl/intranet-tmpl/prog/js/tables/bookings.js | 11 +++++++++-- > 1 file changed, 9 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/tables/bookings.js b/koha-tmpl/intranet-tmpl/prog/js/tables/bookings.js >index aabc664265..a99695dc07 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/tables/bookings.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/tables/bookings.js >@@ -4,9 +4,16 @@ var bookings_table; > $(document).ready(function () { > // Determine whether we have a filtered list > let filter_expired = $("#expired_filter").hasClass("filtered"); >- >+ // Load bookings table on page load >+ if (window.location.hash === "#bookings_panel") { >+ loadBookingsTable(); >+ } > // Load bookings table on tab selection > $("#bookings-tab").on("click", function () { >+ loadBookingsTable(); >+ }); >+ >+ function loadBookingsTable() { > let additional_filters = { > patron_id: patron_borrowernumber, > end_date: function () { >@@ -131,7 +138,7 @@ $(document).ready(function () { > additional_filters > ); > } >- }); >+ } > > var txtActivefilter = __("Show expired"); > var txtInactivefilter = __("Hide expired"); >-- >2.39.5
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 38060
:
172294
|
172295
|
172373
|
173153