Koha/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing
Fridolin Somers 064d5478d3 Bug 12071: improve generation of Z39.50 search links
This patch fixes two problems with the generation of
links to execute a Z39.50 search from the staff client
catalog and cataloguing search results page.

First, if using URI::Escape 3.30 or earlier, performing a simple search
with a double quote (e.g., "histoire algerie"), the Javascript is broken
in results page because of :

function GetZ3950Terms(){
  var strQuery="&frameworkcode=";
  strQuery += "&" + "title" + "=" + ""histoire%20algerie"";

Second, the encoding of non-ASCII characters in the search
term was broken.

This patch moves URI escaping from Perl to template with uri TT filter.

Test plan :
- To reproduce the issue with double quotes, the server
  must be running URI::Escape 3.30 or earlier; the current
  version of URI::Escape properly escapes double quote.
- In staff interface, perform a search with double quotes
  that will return no result, ie "aaa xxx"
=> Without patch, javascript is broken
=> With patch, javascript is not broken
- Click on Z3950 button on results page
=> Without patch, the Title input is empty
=> With patch, the Title input contains the search terms

Additional test:
Do a search with something like äöü and then click Z3950
button on results page.
Without patch, encoding is broken in Z3950 form
With patch, encoding is correct.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixed a few tabs. Passes tests and QA script.
I can't reproduce the Javascript problem, but I can reproduce
the Z39.50 encoding problem and can detect no regression.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-04-18 15:37:56 +00:00
..
value_builder Bug 11570 - Upgrade jQueryUI to latest version in the staff client 2014-04-07 15:37:27 +00:00
addbiblio.tt Bug 9366: add widget to bib editor to control display of the MARC tags 2014-03-14 15:00:58 +00:00
addbooks.tt Bug 12071: improve generation of Z39.50 search links 2014-04-18 15:37:56 +00:00
additem.tt Bug 11563: (follow-up) improve selector for adding noEnterSubmit to select elements 2014-04-11 18:04:36 +00:00
linkitem.tt Bug 8356 - moveitem.tt and linkitem.tt have cataloging typo Changed urls from cataloging to cataloguing 2012-07-10 10:56:26 +02:00
merge.tt Bug 10650 - export merge-record.inc javascript into a file 2013-09-16 16:17:34 +00:00
moveitem.tt Bug 8356 - moveitem.tt and linkitem.tt have cataloging typo Changed urls from cataloging to cataloguing 2012-07-10 10:56:26 +02:00
z3950_auth_search.tt Bug 10096: (follow-up) fix typo introduced in previous followup 2013-10-14 22:44:23 +00:00
z3950_search.tt Bug 11710 - Use new DataTables include in cataloging Z39.50 search template 2014-02-27 15:34:12 +00:00