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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-highlight.inc (+26 lines)
Line 0 Link Here
1
<script type="text/javascript" src="[% interface %]/[% theme %]/lib/jquery/plugins/jquery.highlight-3.js"></script>
2
<script type="text/javascript">
3
var q_array = new Array();  // holds search terms if available
4
 
5
//HighlightOff
6
function highlightOff() {
7
    $("td").removeHighlight();
8
    $(".highlight_toggle").toggle();
9
}
10
 
11
//HighlightOn
12
function highlightOn() {
13
    var x;
14
    for (x in q_array) {
15
        q_array[x] = q_array[x].replace(/\w*:([\w])/, "$1");
16
        q_array[x] = q_array[x].toLowerCase();
17
        var myStopwords = "[% Koha.Preference('HighlightedStopWords') %]".toLowerCase().split('|');
18
        if ( (q_array[x].length > 0) && ($.inArray(q_array[x], myStopwords) == -1) ) {
19
            $(".title").highlight(q_array[x]);
20
            $(".author").highlight(q_array[x]);
21
            $(".results_summary").highlight(q_array[x]);
22
        }
23
    }
24
    $(".highlight_toggle").toggle();
25
}
26
</script>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results-grouped.tt (-17 lines)
Lines 335-357 $(document).ready(function(){ Link Here
335
    $("#highlight_toggle_off").show().click(function() {highlightOff();});
335
    $("#highlight_toggle_off").show().click(function() {highlightOff();});
336
    [% END %]
336
    [% END %]
337
});
337
});
338
339
function highlightOff() {
340
    $("td").removeHighlight();
341
    $(".highlight_toggle").toggle();
342
}
343
function highlightOn() {
344
    var x;
345
    for (x in q_array) {
346
        q_array[x] = q_array[x].replace(/\w*:([\w])/, "$1");
347
        q_array[x] = q_array[x].toLowerCase();
348
        var myStopwords = "[% Koha.Preference('NotHighlightedWords') %]".toLowerCase().split('|');
349
        if ( (q_array[x].length > 0) && ($.inArray(q_array[x], myStopwords) == -1) ) {
350
            $("td").highlight(q_array[x]);
351
        }
352
    }
353
    $(".highlight_toggle").toggle();
354
}
355
//]]>
338
//]]>
356
</script>
339
</script>
357
[% END %]
340
[% END %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt (-25 / +2 lines)
Lines 583-590 Link Here
583
[% IF ( OpacStarRatings == 'all' || Koha.Preference('Babeltheque') ) %]<script type="text/javascript" src="[% interface %]/[% theme %]/lib/jquery/plugins/jquery.rating.js"></script>[% END %]
583
[% IF ( OpacStarRatings == 'all' || Koha.Preference('Babeltheque') ) %]<script type="text/javascript" src="[% interface %]/[% theme %]/lib/jquery/plugins/jquery.rating.js"></script>[% END %]
584
[% IF ( OverDriveEnabled ) %]<script type="text/javascript" src="[% interface %]/[% theme %]/js/overdrive.js"></script>[% END %]
584
[% IF ( OverDriveEnabled ) %]<script type="text/javascript" src="[% interface %]/[% theme %]/js/overdrive.js"></script>[% END %]
585
<script type="text/javascript" src="[% interface %]/[% theme %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
585
<script type="text/javascript" src="[% interface %]/[% theme %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
586
[% IF ( OpacHighlightedWords ) %]<script type="text/javascript" src="[% interface %]/[% theme %]/lib/jquery/plugins/jquery.highlight-3.js"></script>
586
[% IF ( OpacHighlightedWords ) %][% INCLUDE 'opac-highlight.inc' %][% END %]
587
[% END %]<script type="text/javascript">
587
<script type="text/javascript">
588
//<![CDATA[
588
//<![CDATA[
589
[% IF ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'RequestOnOpac' ) == 1 ) %]
589
[% IF ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'RequestOnOpac' ) == 1 ) %]
590
function holdMultiple() {
590
function holdMultiple() {
Lines 669-696 function enableCheckboxActions(){ Link Here
669
    }
669
    }
670
}
670
}
671
671
672
[% IF ( OpacHighlightedWords ) %]
673
var q_array = new Array();  // holds search terms if available
674
675
function highlightOff() {
676
    $("td").removeHighlight();
677
    $(".highlight_toggle").toggle();
678
}
679
function highlightOn() {
680
    var x;
681
    for (x in q_array) {
682
        q_array[x] = q_array[x].replace(/\w*:([\w])/, "$1");
683
        q_array[x] = q_array[x].toLowerCase();
684
        var myStopwords = "[% Koha.Preference('NotHighlightedWords') %]".toLowerCase().split('|');
685
        if ( (q_array[x].length > 0) && ($.inArray(q_array[x], myStopwords) == -1) ) {
686
            $(".title").highlight(q_array[x]);
687
            $(".author").highlight(q_array[x]);
688
            $(".results_summary").highlight(q_array[x]);
689
        }
690
    }
691
    $(".highlight_toggle").toggle();
692
}
693
[% END %]
694
$(document).ready(function(){
672
$(document).ready(function(){
695
    [% IF ( OpacHighlightedWords ) %]
673
    [% IF ( OpacHighlightedWords ) %]
696
        $('a.title').each(function() {
674
        $('a.title').each(function() {
697
- 

Return to bug 11270