Bugzilla – Attachment 185144 Details for
Bug 40552
Allow selecting all holds from a group
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40552: Preparation: Move patron page logic for reusability
Bug-40552-Preparation-Move-patron-page-logic-for-r.patch (text/plain), 2.40 KB, created by
OpenFifth Sandboxes
on 2025-08-06 10:09:01 UTC
(
hide
)
Description:
Bug 40552: Preparation: Move patron page logic for reusability
Filename:
MIME Type:
Creator:
OpenFifth Sandboxes
Created:
2025-08-06 10:09:01 UTC
Size:
2.40 KB
patch
obsolete
>From d6eae4d2f23dea7016b7fa1b41aed5f84d5d8ce7 Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@openfifth.co.uk> >Date: Wed, 30 Jul 2025 11:32:26 +0000 >Subject: [PATCH] Bug 40552: Preparation: Move patron page logic for > reusability >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Signed-off-by: Anneli Ãsterman <anneli.osterman@koha-suomi.fi> >--- > koha-tmpl/intranet-tmpl/prog/js/holds.js | 8 +------- > koha-tmpl/intranet-tmpl/prog/js/staff-global.js | 15 +++++++++++++++ > 2 files changed, 16 insertions(+), 7 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/holds.js b/koha-tmpl/intranet-tmpl/prog/js/holds.js >index bed19e2c90..ebdf2a2e20 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/holds.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/holds.js >@@ -107,13 +107,7 @@ function display_pickup_location(state) { > > /* global __ borrowernumber SuspendHoldsIntranet */ > $(document).ready(function () { >- var url = window.location.href; >- let patron_page; >- if (url.indexOf("/circ/circulation.pl?borrowernumber=") !== -1) >- patron_page = "circ"; >- else if (url.indexOf("/members/moremember.pl?borrowernumber=") !== -1) >- patron_page = "borrower"; >- >+ let patron_page = holds_table_patron_page(); > function suspend_hold(hold_ids, end_date) { > var params = { hold_ids: hold_ids }; > if (end_date !== null && end_date !== "") params.end_date = end_date; >diff --git a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js >index ed6f0b35f7..2dff3328bd 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js >@@ -1005,6 +1005,21 @@ function toggleBtnIcon(element, start, replacement) { > }); > } > >+/** >+ * Determines which patron page we are on based on the URL >+ * @return {string} The patron page we are on, "circ" or "borrower", or null >+ * if neither page is matched >+ */ >+function holds_table_patron_page() { >+ var url = window.location.href; >+ if (url.indexOf("/circ/circulation.pl?borrowernumber=") !== -1) >+ return "circ"; >+ else if (url.indexOf("/members/moremember.pl?borrowernumber=") !== -1) >+ return "borrower"; >+ >+ return null; >+} >+ > /** > * Returns a roughly ideal position to scroll an element into view > * @param {string} target - The HTML id of the element to scroll into view >-- >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 40552
:
184866
|
184867
|
185142
|
185143
|
185144
|
185145
|
185146
|
185147
|
185148