Bugzilla – Attachment 30846 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]
[PASSED QA] Bug 6149 - Follow-up [syspref] - Stopwords for Result Highlighting
PASSED-QA-Bug-6149---Follow-up-syspref---Stopwords.patch (text/plain), 10.17 KB, created by
Katrin Fischer
on 2014-08-15 15:47:10 UTC
(
hide
)
Description:
[PASSED QA] Bug 6149 - Follow-up [syspref] - Stopwords for Result Highlighting
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2014-08-15 15:47:10 UTC
Size:
10.17 KB
patch
obsolete
>From cdf13c5fba7731b43c2372ce3f245bc8c6a81372 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Tue, 11 Mar 2014 09:05:51 +0000 >Subject: [PATCH] [PASSED QA] Bug 6149 - Follow-up [syspref] - Stopwords for > Result Highlighting > >- global replaced HightedStopWords syspref with NotHightedWords for > clarification purposes. Hopefully this is a bit better and still > not too verbose. > >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >Works as described, fixed some tabs and a typo. >--- > installer/data/mysql/sysprefs.sql | 2 +- > installer/data/mysql/updatedatabase.pl | 2 +- > .../prog/en/modules/admin/preferences/opac.pref | 2 +- > koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt | 2 +- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt | 2 +- > .../opac-tmpl/bootstrap/en/modules/opac-results-grouped.tt | 12 ++++++------ > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt | 2 +- > koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt | 2 +- > koha-tmpl/opac-tmpl/prog/en/modules/opac-results-grouped.tt | 2 +- > koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt | 2 +- > 10 files changed, 15 insertions(+), 15 deletions(-) > >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index c6c4c52..69b7336 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -238,7 +238,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('opacheader','','70|10','Add HTML to be included as a custom header in the OPAC','Textarea'), > ('OpacHiddenItems','','','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/OpacHiddenItems.txt for more informations.','Textarea'), > ('OpacHighlightedWords','1','','If Set, then queried words are higlighted in OPAC','YesNo'), >-('HighlightedStopWords','and|or|not',NULL,'List of words to NOT highlight when OpacHitHighlight is enabled','free'), >+('NotHighlightedWords','and|or|not',NULL,'List of words to NOT highlight when OpacHitHighlight is enabled','free'), > ('OpacHoldNotes','0','','Show hold notes on OPAC','YesNo'), > ('OPACItemHolds','1','0|1|force','Allow OPAC users to place hold on specific items. If No, users can only request next available copy. If Yes, users can choose between next available and specific copy. If Force, users *must* choose a specific copy.','Choice'), > ('OpacItemLocation','callnum','callnum|ccode|location','Show the shelving location of items in the opac','Choice'), >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 547a89f..b2b7451 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -8606,7 +8606,7 @@ if ( CheckVersion($DBversion) ) { > > $DBversion = "3.17.00.XXX"; > if ( CheckVersion($DBversion) ) { >- $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('HighlightedStopWords','and|or|not',NULL,'List of words to NOT highlight when OpacHighlightedWords is enabled','free')" >+ $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('NotHighlightedWords','and|or|not',NULL,'List of words to NOT highlight when OpacHighlightedWords is enabled','free')" > ); > print "Upgrade to $DBversion done (Bug 6149: Operator highlighted in search results)\n"; > SetVersion($DBversion); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >index a033294..2770e53 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >@@ -152,7 +152,7 @@ OPAC: > yes: Highlight > no: "Don't highlight" > - words the patron searched for in their search results and detail pages; To prevent certain words from ever being highlighted, enter a list of stopwords here >- - pref: HighlightedStopWords >+ - pref: NotHighlightedWords > class: multi > - (separate columns with |) > - >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt >index 33d47c4..ce03da9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt >@@ -164,7 +164,7 @@ function highlightOn() { > var x; > for (x in q_array) { > q_array[x] = q_array[x].toLowerCase(); >- var myStopwords = "[% Koha.Preference('HighlightedStopWords') %]".toLowerCase().split('|'); >+ var myStopwords = "[% Koha.Preference('NotHighlightedWords') %]".toLowerCase().split('|'); > if ( (q_array[x].length > 0) && ($.inArray(q_array[x], myStopwords) == -1) ) { > toHighlight.highlight(q_array[x]); > } >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 d9418df..8545b4e 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >@@ -1346,7 +1346,7 @@ > for (x in q_array) { > q_array[x] = q_array[x].replace(/\w*:([\w])/, "$1"); > q_array[x] = q_array[x].toLowerCase(); >- var myStopwords = "[% Koha.Preference('HighlightedStopWords') %]".toLowerCase().split('|'); >+ var myStopwords = "[% Koha.Preference('NotHighlightedWords') %]".toLowerCase().split('|'); > if( $.inArray(q_array[x], myStopwords) == -1 ) { > $(".title").highlight(q_array[x]); > $(".author").highlight(q_array[x]); >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 1023936..1ccf590 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,12 +349,12 @@ function highlightOff() { > function highlightOn() { > var x; > for (x in q_array) { >- 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]); >- } >+ q_array[x] = q_array[x].replace(/\w*:([\w])/, "$1"); >+ q_array[x] = q_array[x].toLowerCase(); >+ var myStopwords = "[% Koha.Preference('NotHighlightedWords') %]".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/bootstrap/en/modules/opac-results.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt >index 0c4b607..2456625 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt >@@ -653,7 +653,7 @@ function highlightOn() { > for (x in q_array) { > q_array[x] = q_array[x].replace(/\w*:([\w])/, "$1"); > q_array[x] = q_array[x].toLowerCase(); >- var myStopwords = "[% Koha.Preference('HighlightedStopWords') %]".toLowerCase().split('|'); >+ var myStopwords = "[% Koha.Preference('NotHighlightedWords') %]".toLowerCase().split('|'); > if ( (q_array[x].length > 0) && ($.inArray(q_array[x], myStopwords) == -1) ) { > $(".title").highlight(q_array[x]); > $(".author").highlight(q_array[x]); >diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt >index e159b6e..c7afcf2 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt >@@ -73,7 +73,7 @@ > for (x in q_array) { > q_array[x] = q_array[x].replace(/\w*:([\w])/, "$1"); > q_array[x] = q_array[x].toLowerCase(); >- var myStopwords = "[% Koha.Preference('HighlightedStopWords') %]".toLowerCase().split('|'); >+ var myStopwords = "[% Koha.Preference('NotHighlightedWords') %]".toLowerCase().split('|'); > if( $.inArray(q_array[x], myStopwords) == -1 ) { > $(".title").highlight(q_array[x]); > $(".author").highlight(q_array[x]); >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 9eb5045..98d5c18 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 >@@ -85,7 +85,7 @@ function highlightOn() { > for (x in q_array) { > q_array[x] = q_array[x].replace(/\w*:([\w])/, "$1"); > q_array[x] = q_array[x].toLowerCase(); >- var myStopwords = "[% Koha.Preference('HighlightedStopWords') %]".toLowerCase().split('|'); >+ var myStopwords = "[% Koha.Preference('NotHighlightedWords') %]".toLowerCase().split('|'); > if ( (q_array[x].length > 0) && ($.inArray(q_array[x], myStopwords) == -1) ) { > $("td").highlight(q_array[x]); > } >diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt >index 933887d..7fe3391 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt >@@ -101,7 +101,7 @@ function highlightOn() { > for (x in q_array) { > q_array[x] = q_array[x].replace(/\w*:([\w])/, "$1"); > q_array[x] = q_array[x].toLowerCase(); >- var myStopwords = "[% Koha.Preference('HighlightedStopWords') %]".toLowerCase().split('|'); >+ var myStopwords = "[% Koha.Preference('NotHighlightedWords') %]".toLowerCase().split('|'); > if ( (q_array[x].length > 0) && ($.inArray(q_array[x], myStopwords) == -1) ) { > $(".title").highlight(q_array[x]); > $(".author").highlight(q_array[x]); >-- >1.9.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 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