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 (-13 lines)
Lines 341-359 $(document).ready(function(){ Link Here
341
    $("#highlight_toggle_off").show().click(function() {highlightOff();});
341
    $("#highlight_toggle_off").show().click(function() {highlightOff();});
342
    [% END %]
342
    [% END %]
343
});
343
});
344
345
function highlightOff() {
346
    $("td").removeHighlight();
347
    $(".highlight_toggle").toggle();
348
}
349
function highlightOn() {
350
    var x;
351
    for (x in q_array) {
352
        q_array[x] = q_array[x].replace(/\w*:([\w])/, "$1");
353
        $("td").highlight(q_array[x]);
354
    }
355
    $(".highlight_toggle").toggle();
356
}
357
//]]>
344
//]]>
358
</script>
345
</script>
359
[% END %]
346
[% END %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt (-22 / +2 lines)
Lines 555-562 Link Here
555
[% IF ( OpacStarRatings == 'all' || Koha.Preference('Babeltheque') ) %]<script type="text/javascript" src="[% interface %]/[% theme %]/lib/jquery/plugins/jquery.rating.js"></script>[% END %]
555
[% IF ( OpacStarRatings == 'all' || Koha.Preference('Babeltheque') ) %]<script type="text/javascript" src="[% interface %]/[% theme %]/lib/jquery/plugins/jquery.rating.js"></script>[% END %]
556
[% IF ( OverDriveEnabled ) %]<script type="text/javascript" src="[% interface %]/[% theme %]/js/overdrive.js"></script>[% END %]
556
[% IF ( OverDriveEnabled ) %]<script type="text/javascript" src="[% interface %]/[% theme %]/js/overdrive.js"></script>[% END %]
557
<script type="text/javascript" src="[% interface %]/[% theme %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
557
<script type="text/javascript" src="[% interface %]/[% theme %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
558
[% IF ( OpacHighlightedWords ) %]<script type="text/javascript" src="[% interface %]/[% theme %]/lib/jquery/plugins/jquery.highlight-3.js"></script>
558
[% IF ( OpacHighlightedWords ) %][% INCLUDE 'opac-highlight.inc' %][% END %]
559
[% END %]<script type="text/javascript">
559
<script type="text/javascript">
560
//<![CDATA[
560
//<![CDATA[
561
[% IF ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'RequestOnOpac' ) == 1 ) %]
561
[% IF ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'RequestOnOpac' ) == 1 ) %]
562
function holdMultiple() {
562
function holdMultiple() {
Lines 641-666 function enableCheckboxActions(){ Link Here
641
    }
641
    }
642
}
642
}
643
643
644
[% IF ( OpacHighlightedWords ) %]
645
var q_array = new Array();  // holds search terms if available
646
647
function highlightOff() {
648
    $("td").removeHighlight();
649
    $(".highlight_toggle").toggle();
650
}
651
function highlightOn() {
652
    var x;
653
    for (x in q_array) {
654
        q_array[x] = q_array[x].replace(/\w*:([\w])/, "$1");
655
        if ( q_array[x].length > 0 ) {
656
            $(".title").highlight(q_array[x]);
657
            $(".author").highlight(q_array[x]);
658
            $(".results_summary").highlight(q_array[x]);
659
        }
660
    }
661
    $(".highlight_toggle").toggle();
662
}
663
[% END %]
664
$(document).ready(function(){
644
$(document).ready(function(){
665
    [% IF ( OpacHighlightedWords ) %]
645
    [% IF ( OpacHighlightedWords ) %]
666
        $('a.title').each(function() {
646
        $('a.title').each(function() {
(-)a/koha-tmpl/opac-tmpl/prog/en/includes/opac-highlight.inc (+26 lines)
Line 0 Link Here
1
<script type="text/javascript" src="[% themelang %]/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/prog/en/modules/opac-results-grouped.tt (-13 lines)
Lines 75-93 $(document).ready(function(){ Link Here
75
    $("#highlight_toggle_off").show().click(function() {highlightOff();});
75
    $("#highlight_toggle_off").show().click(function() {highlightOff();});
76
    [% END %]
76
    [% END %]
77
});
77
});
78
79
function highlightOff() {
80
    $("td").removeHighlight();
81
    $(".highlight_toggle").toggle();
82
}
83
function highlightOn() {
84
    var x;
85
    for (x in q_array) {
86
        q_array[x] = q_array[x].replace(/\w*:([\w])/, "$1");
87
        $("td").highlight(q_array[x]);
88
    }
89
    $(".highlight_toggle").toggle();
90
}
91
//]]>
78
//]]>
92
</script>
79
</script>
93
</head>
80
</head>
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt (-23 / +2 lines)
Lines 18-25 Link Here
18
18
19
<script type="text/javascript" src="[% themelang %]/js/overdrive.js"></script>
19
<script type="text/javascript" src="[% themelang %]/js/overdrive.js"></script>
20
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
20
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
21
[% IF ( OpacHighlightedWords ) %]<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.highlight-3.js"></script>
21
[% IF ( OpacHighlightedWords ) %][% INCLUDE 'opac-highlight.inc' %][% END %]
22
[% END %]<script type="text/javascript">
22
<script type="text/javascript">
23
//<![CDATA[
23
//<![CDATA[
24
[% IF ( opacuserlogin ) %][% IF ( RequestOnOpac ) %]
24
[% IF ( opacuserlogin ) %][% IF ( RequestOnOpac ) %]
25
function holdMultiple() {
25
function holdMultiple() {
Lines 89-114 function tagAdded() { Link Here
89
    KOHA.Tags.add_multitags_button(bibs, tag);
89
    KOHA.Tags.add_multitags_button(bibs, tag);
90
    return false;
90
    return false;
91
}[% END %]
91
}[% END %]
92
[% IF ( OpacHighlightedWords ) %]
93
var q_array = new Array();  // holds search terms if available
94
95
function highlightOff() {
96
    $("td").removeHighlight();
97
    $(".highlight_toggle").toggle();
98
}
99
function highlightOn() {
100
    var x;
101
    for (x in q_array) {
102
        q_array[x] = q_array[x].replace(/\w*:([\w])/, "$1");
103
        if ( q_array[x].length > 0 ) {
104
            $(".title").highlight(q_array[x]);
105
            $(".author").highlight(q_array[x]);
106
            $(".results_summary").highlight(q_array[x]);
107
        }
108
    }
109
    $(".highlight_toggle").toggle();
110
}
111
[% END %]
112
$(document).ready(function(){
92
$(document).ready(function(){
113
    [% IF ( OpacHighlightedWords ) %]
93
    [% IF ( OpacHighlightedWords ) %]
114
        $('a.title').each(function() {
94
        $('a.title').each(function() {
115
- 

Return to bug 11270