Bugzilla – Attachment 158631 Details for
Bug 34784
Add ability to populate empty item call numbers for a record based on the itemcallnumber system preference
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34784: (QA follow-up) Fix broken links, re-add newlines
Bug-34784-QA-follow-up-Fix-broken-links-re-add-new.patch (text/plain), 4.23 KB, created by
Katrin Fischer
on 2023-11-07 21:50:12 UTC
(
hide
)
Description:
Bug 34784: (QA follow-up) Fix broken links, re-add newlines
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2023-11-07 21:50:12 UTC
Size:
4.23 KB
patch
obsolete
>From c25bf42e1544fc838a6bd69d7260a270f6bdd8e2 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Tue, 7 Nov 2023 06:46:48 -0500 >Subject: [PATCH] Bug 34784: (QA follow-up) Fix broken links, re-add newlines > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > koha-tmpl/intranet-tmpl/prog/js/catalog.js | 33 ++++++++++------------ > 1 file changed, 15 insertions(+), 18 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/catalog.js b/koha-tmpl/intranet-tmpl/prog/js/catalog.js >index 55e2a8ec3d..d9fe2dd95d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/catalog.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/catalog.js >@@ -124,20 +124,20 @@ $(document).ready(function() { > }) > .tooltip(); > >- $("#populate-callnumbers-biblio") >+ $("#populate-callnumbers-biblio") > .on('click', function() { >- $.getJSON( `/api/v1/biblios/${biblionumber}/default_item_callnumber`, function( cn ) { >+ const biblionumber = $(this).data('biblionumber'); >+ $.getJSON(`/api/v1/biblios/${biblionumber}/default_item_callnumber`, function(cn) { > const callnumber = cn.callnumber; >- if ( confirm(__(`Are you sure you want to populate call numbers for all items without a call number on this record to the following value: ${callnumber}`)) ) { >- const biblionumber = $(this).data('biblionumber'); >- $.post( `/api/v1/biblios/${biblionumber}/items/populate_empty_callnumbers`, function( data ) { >+ if (confirm(__(`Are you sure you want to populate call numbers for all items without a call number on this record to the following value: ${callnumber}`))) { >+ $.post(`/api/v1/biblios/${biblionumber}/items/populate_empty_callnumbers`, function(data) { > const items_updated = data.items_updated; > const callnumber = data.callnumber; > let msg = __('Items populated with the call number "%s": %s').format(callnumber, items_updated); > >- if ( items_updated ) { >- msg += " " + __('Reload the page?'); >- if( confirm(msg) ) { >+ if (items_updated) { >+ msg += "\n" + __('Reload the page?'); >+ if (confirm(msg)) { > location.reload(true); > } > } else { >@@ -150,20 +150,17 @@ $(document).ready(function() { > > $(".populate-callnumber-item") > .on('click', function() { >- $.getJSON( `/api/v1/biblios/${biblionumber}/default_item_callnumber`, function( cn ) { >+ const biblionumber = $(this).data('biblionumber'); >+ const itemnumber = $(this).data('itemnumber'); >+ $.getJSON(`/api/v1/biblios/${biblionumber}/default_item_callnumber`, function(cn) { > const callnumber = cn.callnumber; >- if ( confirm(__(`Are you sure you want to populate the call number for this item to the following value: ${callnumber}`)) ) { >- const biblionumber = $(this).data('biblionumber'); >- const itemnumber = $(this).data('itemnumber'); >- const button = $(this); >- $.post( `/api/v1/biblios/${biblionumber}/items/${itemnumber}/populate_empty_callnumbers`, function( data ) { >+ if (confirm(__(`Are you sure you want to populate the call number for this item to the following value: ${callnumber}`))) { >+ $.post(`/api/v1/biblios/${biblionumber}/items/${itemnumber}/populate_empty_callnumbers`, function(data) { > const callnumber = data.callnumber; > let msg = __('Item populated with the call number "%s"').format(callnumber); >- msg += " " + __('Reload the page?'); >- if( confirm(msg) ) { >+ msg += "\n" + __('Reload the page?'); >+ if (confirm(msg)) { > location.reload(true); >- } else { >- button.hide(); > } > }); > } >-- >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 34784
:
155623
|
155624
|
155626
|
155627
|
156140
|
156141
|
158554
|
158555
|
158556
|
158569
|
158570
|
158571
|
158572
|
158593
|
158627
|
158628
|
158629
|
158630
|
158631
|
160349
|
173076
|
173077
|
173078
|
174241