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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (-1 / +4 lines)
Lines 135-141 OPAC: Link Here
135
              choices:
135
              choices:
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.
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
140
              class: multi
141
            - (separate columns with |)
139
        -
142
        -
140
            - pref: AuthorisedValueImages
143
            - pref: AuthorisedValueImages
141
              choices:
144
              choices:
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt (-4 / +7 lines)
Lines 57-66 Link Here
57
        }
57
        }
58
        function highlightOn() {
58
        function highlightOn() {
59
            var x;
59
            var x;
60
            for (x in q_array) {
60
	    for (x in q_array) {
61
                $(".title").highlight(q_array[x]);
61
		var myStopwords = "[% OpacHighlightedStopWords %]".split('|');
62
                $(".author").highlight(q_array[x]);
62
                if( $.inArray(q_array[x], myStopwords) == -1 ) {
63
                $(".results_summary").highlight(q_array[x]);
63
                    $(".title").highlight(q_array[x]);
64
                    $(".author").highlight(q_array[x]);
65
		    $(".results_summary").highlight(q_array[x]);
66
		}
64
            }
67
            }
65
            $(".highlight_toggle").toggle();
68
            $(".highlight_toggle").toggle();
66
        }
69
        }
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt (-5 / +8 lines)
Lines 98-108 function highlightOff() { Link Here
98
function highlightOn() {
98
function highlightOn() {
99
    var x;
99
    var x;
100
    for (x in q_array) {
100
    for (x in q_array) {
101
        if ( q_array[x].length > 0 ) {
101
        for (x in q_array) {
102
            $(".title").highlight(q_array[x]);
102
            var myStopwords = "[% OpacHighlightedStopWords %]".split('|');
103
            $(".author").highlight(q_array[x]);
103
            if( $.inArray(q_array[x], myStopwords) == -1 ) {
104
            $(".results_summary").highlight(q_array[x]);
104
                $(".title").highlight(q_array[x]);
105
        }
105
                $(".author").highlight(q_array[x]);
106
                $(".results_summary").highlight(q_array[x]);
107
            }
108
        }			    
106
    }
109
    }
107
    $(".highlight_toggle").toggle();
110
    $(".highlight_toggle").toggle();
108
}
111
}
(-)a/opac/opac-detail.pl (+1 lines)
Lines 1053-1058 $template->{VARS}->{OPACPopupAuthorsSearch} = C4::Context->preference('OPACPopup Link Here
1053
1053
1054
if (C4::Context->preference('OpacHighlightedWords')) {
1054
if (C4::Context->preference('OpacHighlightedWords')) {
1055
    $template->{VARS}->{query_desc} = $query->param('query_desc');
1055
    $template->{VARS}->{query_desc} = $query->param('query_desc');
1056
    $template->{VARS}->{OpacHighlightedStopWords} = C4::Context->preference('OpacHighlightedStopWords');
1056
}
1057
}
1057
$template->{VARS}->{'trackclicks'} = C4::Context->preference('TrackClicks');
1058
$template->{VARS}->{'trackclicks'} = C4::Context->preference('TrackClicks');
1058
1059
(-)a/opac/opac-search.pl (-1 / +5 lines)
Lines 616-621 for (my $i=0;$i<@servers;$i++) { Link Here
616
            $total = $total + $results_hashref->{$server}->{"hits"};
616
            $total = $total + $results_hashref->{$server}->{"hits"};
617
        }
617
        }
618
618
619
	# Add Stopwrods for query highlighting
620
        if (C4::Context->preference('OpacHighlightedWords')) {
621
            $template->{VARS}->{OpacHighlightedStopWords} = C4::Context->preference('OpacHighlightedStopWords');
622
        }    
623
619
        # Opac search history
624
        # Opac search history
620
        my $newsearchcookie;
625
        my $newsearchcookie;
621
        if (C4::Context->preference('EnableOpacSearchHistory')) {
626
        if (C4::Context->preference('EnableOpacSearchHistory')) {
622
- 

Return to bug 6149