Bugzilla – Attachment 46504 Details for
Bug 14816
Item search returns no results with multiple values selected for one field
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14816: Fix multiple selection in item search
Bug-14816-Fix-multiple-selection-in-item-search.patch (text/plain), 1.98 KB, created by
Aleisha Amohia
on 2016-01-11 23:01:31 UTC
(
hide
)
Description:
Bug 14816: Fix multiple selection in item search
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2016-01-11 23:01:31 UTC
Size:
1.98 KB
patch
obsolete
>From eb0c1b301e6b7914085c692fa2cbed09bc0469d9 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Thu, 7 Jan 2016 15:38:57 +0100 >Subject: [PATCH] Bug 14816: Fix multiple selection in item search >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Send each selected value as a separate parameter. Otherwise DataTables >(or jQuery ?) joins all values with a comma > >Tested / compared with several combinations, e.g. "All libraries" vs >all libraries checked. With patch result is the same (without, all >libraries checked had zero result). >Works as expected. >Signed-off-by: Marc Véron <veron@veron.ch> > >Signed-off-by: Aleisha <aleishaamohia@hotmail.com> >--- > .../intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt | 12 +++++++++++- > 1 file changed, 11 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt >index bc1ffb9..89b6191 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt >@@ -230,7 +230,17 @@ > $('#results-wrapper').empty().html(results_heading + table); > > var params = []; >- $form.find('select,input[type="text"],input[type="hidden"]').not('[disabled]').each(function () { >+ $form.find('select').not('[disabled]').each(function () { >+ var value = $(this).val(); >+ if (Array.isArray(value)) { >+ for (i in value) { >+ params.push({ 'name': $(this).attr('name'), 'value': value[i] }); >+ } >+ } else { >+ params.push({ 'name': $(this).attr('name'), 'value': value }); >+ } >+ }); >+ $form.find('input[type="text"],input[type="hidden"]').not('[disabled]').each(function () { > params.push({ 'name': $(this).attr('name'), 'value': $(this).val() }); > }); > $form.find('input[type="radio"]:checked').each(function() { >-- >1.7.10.4
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 14816
:
46395
|
46436
|
46504
|
49952
|
49960
|
49977