Bug 20501: Don't cut strings when unhighlighting in intranet search results
authorPhil Ringnalda <phil@chetcolibrary.org>
Sun, 19 Apr 2020 02:37:49 +0000 (02:37 +0000)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Wed, 22 Apr 2020 08:31:17 +0000 (09:31 +0100)
commit4a84f7a9e0d13898d9a17071e3bd74f904a1e4f8
treeb6e2d16fde5d135c39f2663f78e4c9dfe2f9d79b
parent03ece9452a5eef8ca76dab413f4f5177f69797d1
Bug 20501: Don't cut strings when unhighlighting in intranet search results

When you click Unhighlight on the search results of a search in the staff client
when the search terms contain the same word twice, like "ma ma", the highlighted
words disappear, and don't reappear if you click Highlight.

This patch makes the same change to the intranet copy of jquery.highlight-3.js that
bug 5844 made to the OPAC copy.

Test plan:
1) Without this patch, search in the intranet for ma ma and verify you have at least
   two matching records.
2) Notice that the Ma in Material type: Book is highlighted.
3) Click Unhighlight, and notice that it has become terial type: Book
4) Apply this patch, repeat the search with a shift+reload to reload the .js
5) Click Unhighlight, and verify that Material type: Book remains Material

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
koha-tmpl/intranet-tmpl/lib/jquery/plugins/jquery.highlight-3.js