Bugzilla – Attachment 23066 Details for
Bug 6149
Operator Highlighted in Search Results
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 6149: Follow-up - Stopwords for Result Highlighting (Bootstrap)
Bug-6149-Follow-up---Stopwords-for-Result-Highligh.patch (text/plain), 2.48 KB, created by
Jonathan Druart
on 2013-11-21 15:28:15 UTC
(
hide
)
Description:
Bug 6149: Follow-up - Stopwords for Result Highlighting (Bootstrap)
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2013-11-21 15:28:15 UTC
Size:
2.48 KB
patch
obsolete
>From fa438d535b35c5e61b52ed4673be7f8eefa4795e Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Mon, 28 Oct 2013 12:12:30 +0000 >Subject: [PATCH] Bug 6149: Follow-up - Stopwords for Result Highlighting > (Bootstrap) > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> > >Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> >--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt | 10 +++++++--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt | 4 +++- > 2 files changed, 10 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >index 8b7cfdd..3c0947b 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >@@ -1269,9 +1269,13 @@ > var x; > for (x in q_array) { > q_array[x] = q_array[x].replace(/\w*:([\w])/, "$1"); >- $(".title").highlight(q_array[x]); >- $(".author").highlight(q_array[x]); >- $(".results_summary").highlight(q_array[x]); >+ q_array[x] = q_array[x].toLowerCase(); >+ var myStopwords = "[% Koha.Preference('HighlightedStopWords') %]".toLowerCase().split('|'); >+ if( $.inArray(q_array[x], myStopwords) == -1 ) { >+ $(".title").highlight(q_array[x]); >+ $(".author").highlight(q_array[x]); >+ $(".results_summary").highlight(q_array[x]); >+ } > } > $(".highlight_toggle").toggle(); > } >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt >index 2ad3029..a870be7 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt >@@ -648,7 +648,9 @@ function highlightOn() { > var x; > for (x in q_array) { > q_array[x] = q_array[x].replace(/\w*:([\w])/, "$1"); >- if ( q_array[x].length > 0 ) { >+ q_array[x] = q_array[x].toLowerCase(); >+ var myStopwords = "[% Koha.Preference('HighlightedStopWords') %]".toLowerCase().split('|'); >+ if ( (q_array[x].length > 0) && ($.inArray(q_array[x], myStopwords) == -1) ) { > $(".title").highlight(q_array[x]); > $(".author").highlight(q_array[x]); > $(".results_summary").highlight(q_array[x]); >-- >1.7.10.4
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 6149
:
20240
|
20469
|
20540
|
20543
|
20715
|
20802
|
21168
|
21582
|
21831
|
22448
|
22463
|
22466
|
22505
|
22511
|
23005
|
23025
|
23027
|
23064
|
23065
|
23066
|
26051
|
30136
|
30137
|
30138
|
30139
|
30140
|
30141
|
30142
|
30143
|
30144
|
30835
|
30842
|
30843
|
30844
|
30845
|
30846
|
31403