[open-ils-commits] [GIT] Evergreen ILS branch rel_2_12 updated. 91e2c59db4862579af548742ecad5b5f53decac2
Evergreen Git
git at git.evergreen-ils.org
Fri May 19 16:57:53 EDT 2017
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".
The branch, rel_2_12 has been updated
via 91e2c59db4862579af548742ecad5b5f53decac2 (commit)
from a1f3cc9b8db9a0c680c2cb94a5612fda120bb5ed (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 91e2c59db4862579af548742ecad5b5f53decac2
Author: Jeff Davis <jdavis at sitka.bclibraries.ca>
Date: Thu May 18 15:43:53 2017 -0700
LP#1690468: fix Exclude Electronic Resources checkbox with advanced search limiters
When advanced search limiters are applied, you cannot successfully
uncheck the Exclude Electronic Resources checkbox. When you uncheck it,
your current search is reloaded, but e-resources are still excluded
(and the box remains checked).
When you use the checkbox to exclude e-resources, the search form on the
results page contains a hidden input element:
<input type="hidden" name="fi:-search_format" value="electronic" />
This commit uses Javascript to remove that element from the search form
when the box is unchecked, before submitting the search.
Test plan:
[1] Enable the "Exclude Electronic Resources" checkbox in config.tt2.
[2] Do an advanced search, applying at least one search filter (e.g.
Language = "English").
[3] On the search results page, check the Exclude Electronic Resources
checkbox. This repeats your search, excluding e-resources.
[4] Uncheck the Exclude Electronic Resources box. Your search is
repeated, but e-resources are still excluded and the box remains
checked on your new results page.
[5] Apply this fix.
[6] Refresh the page or clear your browser cache, and try to uncheck the
Exclude Electronic Resources box again. This time, it should work:
e-resources will no longer be excluded, and the box is unchecked
when your new results page loads.
Signed-off-by: Jeff Davis <jdavis at sitka.bclibraries.ca>
Signed-off-by: Kathy Lussier <klussier at masslnc.org>
diff --git a/Open-ILS/web/js/ui/default/opac/simple.js b/Open-ILS/web/js/ui/default/opac/simple.js
index 2f57bf6..c113814 100644
--- a/Open-ILS/web/js/ui/default/opac/simple.js
+++ b/Open-ILS/web/js/ui/default/opac/simple.js
@@ -107,6 +107,14 @@ function exclude_onchange(checkbox) {
// Other functions' form submits may create duplicates of this, so /g
var reg = /-search_format\(electronic\)/g;
search_box.value = search_box.value.replace(reg, "");
+ // Remove from the search form itself
+ var search_format_inputs = document.getElementsByName("fi:-search_format");
+ for (var j = 0; j < search_format_inputs.length; j++) {
+ if (search_format_inputs[j].value == 'electronic') {
+ search_format_inputs[j].parentNode.removeChild(search_format_inputs[j]);
+ }
+ }
+
}
checkbox.form.submit();
-----------------------------------------------------------------------
Summary of changes:
Open-ILS/web/js/ui/default/opac/simple.js | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list