Bugzilla – Attachment 97974 Details for
Bug 24518
Partner filtering does not work in IE11
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24518: Fix IE11 partner filtering
Bug-24518-Fix-IE11-partner-filtering.patch (text/plain), 3.76 KB, created by
Andrew Isherwood
on 2020-01-27 12:06:18 UTC
(
hide
)
Description:
Bug 24518: Fix IE11 partner filtering
Filename:
MIME Type:
Creator:
Andrew Isherwood
Created:
2020-01-27 12:06:18 UTC
Size:
3.76 KB
patch
obsolete
>From 4eb2815996568d082fbf67e8dfe633ba2d6f36a1 Mon Sep 17 00:00:00 2001 >From: Andrew Isherwood <andrew.isherwood@ptfs-europe.com> >Date: Mon, 27 Jan 2020 12:00:47 +0000 >Subject: [PATCH] Bug 24518: Fix IE11 partner filtering > >This patch adopts the approach detailed in comment #1. > >It also fixes a couple of additional minor bugs relating to the ILL >partner list: >- Exclude partners with no email address, we cannot use them >- Quote the "value" attribute to avoid warnings displayed by IE, they >should be quoted anyway! > >Test plan: USE IE11 >- Apply the patch >- Define 3 ILL partner patrons (patrons in the category that has a code >that matches the <partner_code> value in the ILL config). One patron >should have no email address, the other two should have an email address >- Navigate to "Place request with partners" for an ILL request >- TEST: Observe that the patron with no email address is not displayed >- Try filtering the list >- TEST: Observe that the list filters correctly >--- > koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt | 8 +++++--- > koha-tmpl/intranet-tmpl/prog/js/ill-list-table.js | 12 +++++++----- > 2 files changed, 12 insertions(+), 8 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt >index a39b93c235..11de0c9b9e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt >@@ -144,9 +144,11 @@ > <label for="partners" class="required">Select partner libraries:</label> > <select size="5" multiple="true" id="partners" name="partners" required="required"> > [% FOREACH partner IN whole.value.partners %] >- <option value=[% partner.email | html %]> >- [% partner.branchcode _ " - " _ partner.surname %] >- </option> >+ [% IF partner.email && partner.email.length > 0 %] >+ <option value="[% partner.email | html %]"> >+ [% partner.branchcode _ " - " _ partner.surname %] >+ </option> >+ [% END %] > [% END %] > </select> > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/ill-list-table.js b/koha-tmpl/intranet-tmpl/prog/js/ill-list-table.js >index 5e23d7ba20..f0fc15b2a2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/ill-list-table.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/ill-list-table.js >@@ -323,20 +323,22 @@ $(document).ready(function() { > }); > > // Filter partner list >+ // Record the list of all options >+ var ill_partner_options = $('#partners > option'); > $('#partner_filter').keyup(function() { > var needle = $('#partner_filter').val(); >- $('#partners > option').each(function() { >- var regex = new RegExp(needle, 'i'); >+ var regex = new RegExp(needle, 'i'); >+ var filtered = []; >+ ill_partner_options.each(function() { > if ( > needle.length == 0 || > $(this).is(':selected') || > $(this).text().match(regex) > ) { >- $(this).show(); >- } else { >- $(this).hide(); >+ filtered.push($(this)); > } > }); >+ $('#partners').empty().append(filtered); > }); > > // Display the modal containing request supplier metadata >-- >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 24518
:
97974
|
100395
|
100953