View | Details | Raw Unified | Return to bug 6149
Collapse All | Expand All

(-)a/installer/data/mysql/sysprefs.sql (-1 / +1 lines)
Lines 227-233 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
227
('opacheader','','70|10','Add HTML to be included as a custom header in the OPAC','Textarea'),
227
('opacheader','','70|10','Add HTML to be included as a custom header in the OPAC','Textarea'),
228
('OpacHiddenItems','','','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/OpacHiddenItems.txt for more informations.','Textarea'),
228
('OpacHiddenItems','','','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/OpacHiddenItems.txt for more informations.','Textarea'),
229
('OpacHighlightedWords','1','','If Set, then queried words are higlighted in OPAC','YesNo'),
229
('OpacHighlightedWords','1','','If Set, then queried words are higlighted in OPAC','YesNo'),
230
('OpacHighlightedStopWords','and|And|or|Or',NULL,'List of words to NOT highlight when OpacHitHighlight is enabled','free'),
230
('HighlightedStopWords','and|or|not',NULL,'List of words to NOT highlight when OpacHitHighlight is enabled','free'),
231
('OpacHoldNotes','0','','Show hold notes on OPAC','YesNo'),
231
('OpacHoldNotes','0','','Show hold notes on OPAC','YesNo'),
232
('OPACItemHolds','1','','Allow OPAC users to place hold on specific items. If OFF, users can only request next available copy.','YesNo'),
232
('OPACItemHolds','1','','Allow OPAC users to place hold on specific items. If OFF, users can only request next available copy.','YesNo'),
233
('OpacItemLocation','callnum','callnum|ccode|location','Show the shelving location of items in the opac','Choice'),
233
('OpacItemLocation','callnum','callnum|ccode|location','Show the shelving location of items in the opac','Choice'),
(-)a/installer/data/mysql/updatedatabase.pl (-1 / +1 lines)
Lines 7759-7765 if ( CheckVersion($DBversion) ) { Link Here
7759
7759
7760
$DBversion = "3.13.00.XXX";
7760
$DBversion = "3.13.00.XXX";
7761
if ( CheckVersion($DBversion) ) {
7761
if ( CheckVersion($DBversion) ) {
7762
    $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OpacHighlightedStopWords','and|And|or|Or',NULL,'List of words to NOT highlight when OpacHitHighlight is enabled','free')"
7762
    $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')"
7763
    );
7763
    );
7764
    print "Upgrade to $DBversion done (Bug 6149: Operator highlighted in search results)\n";
7764
    print "Upgrade to $DBversion done (Bug 6149: Operator highlighted in search results)\n";
7765
    SetVersion($DBversion);
7765
    SetVersion($DBversion);
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (-1 / +1 lines)
Lines 136-142 OPAC: Link Here
136
                  yes: Highlight
136
                  yes: Highlight
137
                  no: "Don't highlight"
137
                  no: "Don't highlight"
138
            - 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
138
            - 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
139
            - pref: OpacHighlightedStopWords
139
            - pref: HighlightedStopWords
140
              class: multi
140
              class: multi
141
            - (separate columns with |)
141
            - (separate columns with |)
142
        -
142
        -
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt (-1 / +1 lines)
Lines 160-166 function highlightOn() { Link Here
160
    var x;
160
    var x;
161
    for (x in q_array) {
161
    for (x in q_array) {
162
        q_array[x] = q_array[x].toLowerCase();
162
        q_array[x] = q_array[x].toLowerCase();
163
        var myStopwords = "[% Koha.Preference('OpacHighlightedStopWords') %]".toLowerCase().split('|');
163
        var myStopwords = "[% Koha.Preference('HighlightedStopWords') %]".toLowerCase().split('|');
164
        if ( (q_array[x].length > 0) && ($.inArray(q_array[x], myStopwords) == -1) ) {
164
        if ( (q_array[x].length > 0) && ($.inArray(q_array[x], myStopwords) == -1) ) {
165
            toHighlight.highlight(q_array[x]);
165
            toHighlight.highlight(q_array[x]);
166
        }
166
        }
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt (-1 / +1 lines)
Lines 60-66 Link Here
60
        for (x in q_array) {
60
        for (x in q_array) {
61
                q_array[x] = q_array[x].replace(/\w*:([\w])/, "$1");
61
                q_array[x] = q_array[x].replace(/\w*:([\w])/, "$1");
62
                q_array[x] = q_array[x].toLowerCase();
62
                q_array[x] = q_array[x].toLowerCase();
63
        var myStopwords = "[% Koha.Preference('OpacHighlightedStopWords') %]".toLowerCase().split('|');
63
        var myStopwords = "[% Koha.Preference('HighlightedStopWords') %]".toLowerCase().split('|');
64
                if( $.inArray(q_array[x], myStopwords) == -1 ) {
64
                if( $.inArray(q_array[x], myStopwords) == -1 ) {
65
                    $(".title").highlight(q_array[x]);
65
                    $(".title").highlight(q_array[x]);
66
                    $(".author").highlight(q_array[x]);
66
                    $(".author").highlight(q_array[x]);
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt (-2 / +1 lines)
Lines 101-107 function highlightOn() { Link Here
101
    for (x in q_array) {
101
    for (x in q_array) {
102
        q_array[x] = q_array[x].replace(/\w*:([\w])/, "$1");
102
        q_array[x] = q_array[x].replace(/\w*:([\w])/, "$1");
103
        q_array[x] = q_array[x].toLowerCase();
103
        q_array[x] = q_array[x].toLowerCase();
104
        var myStopwords = "[% Koha.Preference('OpacHighlightedStopWords') %]".toLowerCase().split('|');
104
        var myStopwords = "[% Koha.Preference('HighlightedStopWords') %]".toLowerCase().split('|');
105
        if ( (q_array[x].length > 0) && ($.inArray(q_array[x], myStopwords) == -1) ) {
105
        if ( (q_array[x].length > 0) && ($.inArray(q_array[x], myStopwords) == -1) ) {
106
            $(".title").highlight(q_array[x]);
106
            $(".title").highlight(q_array[x]);
107
            $(".author").highlight(q_array[x]);
107
            $(".author").highlight(q_array[x]);
108
- 

Return to bug 6149