Bugzilla – Attachment 103319 Details for
Bug 20501
Unhighlight in search results when the search terms contain the same word twice removes the word
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20501: Don't cut strings when unhighlighting in intranet search results
Bug-20501-Dont-cut-strings-when-unhighlighting-in-.patch (text/plain), 1.84 KB, created by
Bernardo Gonzalez Kriegel
on 2020-04-21 01:01:54 UTC
(
hide
)
Description:
Bug 20501: Don't cut strings when unhighlighting in intranet search results
Filename:
MIME Type:
Creator:
Bernardo Gonzalez Kriegel
Created:
2020-04-21 01:01:54 UTC
Size:
1.84 KB
patch
obsolete
>From 471de0594029f3bf60648d3531c21b959b75aac9 Mon Sep 17 00:00:00 2001 >From: Phil Ringnalda <phil@chetcolibrary.org> >Date: Sun, 19 Apr 2020 02:37:49 +0000 >Subject: [PATCH] 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> >Work as described, no errors. >--- > .../lib/jquery/plugins/jquery.highlight-3.js | 8 ++------ > 1 file changed, 2 insertions(+), 6 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/lib/jquery/plugins/jquery.highlight-3.js b/koha-tmpl/intranet-tmpl/lib/jquery/plugins/jquery.highlight-3.js >index 69bb52d3b1..8eabca4bfd 100644 >--- a/koha-tmpl/intranet-tmpl/lib/jquery/plugins/jquery.highlight-3.js >+++ b/koha-tmpl/intranet-tmpl/lib/jquery/plugins/jquery.highlight-3.js >@@ -44,10 +44,6 @@ jQuery.fn.highlight = function(pat) { > > jQuery.fn.removeHighlight = function() { > return this.find("span.term").each(function() { >- this.parentNode.firstChild.nodeName; >- with (this.parentNode) { >- replaceChild(this.firstChild, this); >- normalize(); >- } >- }).end(); >+ $(this).contents().unwrap(); >+ }); > }; >-- >2.17.1
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 20501
:
103210
|
103319
|
103387