Bugzilla – Attachment 30136 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 (opac-results-grouped)
Bug-6149-Follow-up---Stopwords-for-Result-Highligh.patch (text/plain), 2.17 KB, created by
Martin Renvoize (ashimema)
on 2014-07-26 13:00:45 UTC
(
hide
)
Description:
Bug 6149: Follow-up - Stopwords for Result Highlighting (opac-results-grouped)
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2014-07-26 13:00:45 UTC
Size:
2.17 KB
patch
obsolete
>From 59dc02b67a6370ff984176de519458bc59efb81d Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Tue, 19 Nov 2013 12:07:59 +0000 >Subject: [PATCH] Bug 6149: Follow-up - Stopwords for Result Highlighting > (opac-results-grouped) > >--- > .../opac-tmpl/bootstrap/en/modules/opac-results-grouped.tt | 8 ++++++-- > koha-tmpl/opac-tmpl/prog/en/modules/opac-results-grouped.tt | 6 +++++- > 2 files changed, 11 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results-grouped.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results-grouped.tt >index c0b37f2..1023936 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results-grouped.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results-grouped.tt >@@ -349,8 +349,12 @@ function highlightOff() { > function highlightOn() { > var x; > for (x in q_array) { >- q_array[x] = q_array[x].replace(/\w*:([\w])/, "$1"); >- $("td").highlight(q_array[x]); >+ q_array[x] = q_array[x].replace(/\w*:([\w])/, "$1"); >+ 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) ) { >+ $("td").highlight(q_array[x]); >+ } > } > $(".highlight_toggle").toggle(); > } >diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results-grouped.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results-grouped.tt >index 14faf58..9eb5045 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results-grouped.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results-grouped.tt >@@ -84,7 +84,11 @@ function highlightOn() { > var x; > for (x in q_array) { > q_array[x] = q_array[x].replace(/\w*:([\w])/, "$1"); >- $("td").highlight(q_array[x]); >+ 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) ) { >+ $("td").highlight(q_array[x]); >+ } > } > $(".highlight_toggle").toggle(); > } >-- >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