Bugzilla – Attachment 112033 Details for
Bug 26719
Replace MSG_NO_RECORD_SELECTED with translatable string
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26719: Replace MSG_NO_RECORD_SELECTED with translatable string
Bug-26719-Replace-MSGNORECORDSELECTED-with-transla.patch (text/plain), 5.97 KB, created by
Katrin Fischer
on 2020-10-20 13:13:53 UTC
(
hide
)
Description:
Bug 26719: Replace MSG_NO_RECORD_SELECTED with translatable string
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2020-10-20 13:13:53 UTC
Size:
5.97 KB
patch
obsolete
>From ac07b1584aaa7b1012915254b5001dd4d28cab4a Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 16 Oct 2020 18:08:44 +0000 >Subject: [PATCH] Bug 26719: Replace MSG_NO_RECORD_SELECTED with translatable > string > >This patch cleans up some loose ends left by Bug 25351, replacing >instances where the undefined variable MSG_NO_RECORD_SELECTED is used. > >To test, apply the patch and perform a catalog search in the OPAC. > >- On the search results page, without checking any checkboxes, use the > "Select titles to..." menu to try to add to cart and add to a list. In > each case you should get a "No item was selected" message. >- View a list which contains one or more titles. Click the "Remove > from list" link. You should get a "No item was selected" link. > >Other instances have been corrected even though they will only be >triggered if something has broken. For instance, toolbar items in the >cart window which are disabled shouldn't register the click that might >trigger the error. And selecting an item for an item-level hold >shouldn't ever give a warning because at least one radio button should >always be selected. > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt | 4 ++-- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt | 2 +- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt | 6 +++--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt | 8 ++++---- > 4 files changed, 10 insertions(+), 10 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt >index e81d2b0cd5..40fab7cae7 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt >@@ -335,7 +335,7 @@ > $("#tag_hides").hide(); > $("#tagsel_form").show(); > } else { >- alert(MSG_NO_RECORD_SELECTED); >+ alert( __("No item was selected") ); > } > } > >@@ -350,7 +350,7 @@ > function tagAdded() { > var checkedBoxes = $("input:checkbox:checked"); > if (!$(checkedBoxes).size()) { >- alert(MSG_NO_RECORD_SELECTED); >+ alert( __("No item was selected") ); > return false; > } > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt >index 1b9dd3bdee..87559d81bd 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt >@@ -631,7 +631,7 @@ > [% END %] > > if ($(".confirmjs:checked").size() == 0) { >- alert(MSG_NO_RECORD_SELECTED); >+ alert( __("No item was selected") ); > return false; > } > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt >index 7843add315..b8d86ee9a7 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt >@@ -652,7 +652,7 @@ > if (checkedCount > 0) { > holdBiblioNums(checkedBiblioNums); > } else { >- alert(MSG_NO_RECORD_SELECTED); >+ alert( __("No item was selected") ); > } > } > >@@ -667,7 +667,7 @@ > function tagSelected() { > var checkedBoxes = $(".searchresults :checkbox:checked"); > if ($(checkedBoxes).size() == 0) { >- alert(MSG_NO_RECORD_SELECTED); >+ alert( __("No item was selected") ); > } else { > $("#tagsel_tag").hide(); > $(".resort").hide(); >@@ -686,7 +686,7 @@ > function tagAdded() { > var checkedBoxes = $(".searchresults :checkbox:checked"); > if ($(checkedBoxes).size() == 0) { >- alert(MSG_NO_RECORD_SELECTED); >+ alert( __("No item was selected") ); > return false; > } > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt >index bf42a7072f..7b15ae60bf 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt >@@ -813,7 +813,7 @@ var MSG_CONFIRM_REMOVE_SHARE = _("Are you sure you want to remove this share?"); > function holdSelections() { > var checkedBoxes = $("input:checkbox:checked"); > if ($(checkedBoxes).size() == 0) { >- alert(MSG_NO_RECORD_SELECTED); >+ alert( __("No item was selected") ); > } else { > var bibs = ""; > $(checkedBoxes).each(function(){ >@@ -831,7 +831,7 @@ var MSG_CONFIRM_REMOVE_SHARE = _("Are you sure you want to remove this share?"); > $(".tag_hides").hide(); > $("#tagsel_form").show(); > } else { >- alert(MSG_NO_RECORD_SELECTED); >+ alert( __("No item was selected") ); > } > } > >@@ -846,7 +846,7 @@ var MSG_CONFIRM_REMOVE_SHARE = _("Are you sure you want to remove this share?"); > function tagAdded() { > var checkedBoxes = $("input:checkbox:checked"); > if (!$(checkedBoxes).size()) { >- alert(MSG_NO_RECORD_SELECTED); >+ alert( __("No item was selected") ); > return false; > } > >@@ -970,7 +970,7 @@ $(function() { > return confirmDelete(MSG_REMOVE_ONE_FROM_LIST); > } > } else { >- alert(MSG_NO_RECORD_SELECTED); >+ alert( __("No item was selected") ); > return false; > } > }); >-- >2.11.0
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 26719
:
111932
|
111933
| 112033