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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-highlight.inc (+27 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>
27
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results-grouped.tt (-17 lines)
Lines 341-363 $(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
	    q_array[x] = q_array[x].toLowerCase();
354
	    var myStopwords = "[% Koha.Preference('HighlightedStopWords') %]".toLowerCase().split('|');
355
	    if ( (q_array[x].length > 0) && ($.inArray(q_array[x], myStopwords) == -1) ) {
356
		    $("td").highlight(q_array[x]);
357
	    }
358
    }
359
    $(".highlight_toggle").toggle();
360
}
361
//]]>
344
//]]>
362
</script>
345
</script>
363
[% END %]
346
[% END %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt (-24 / +2 lines)
Lines 551-558 Link Here
551
[% IF ( OpacStarRatings == 'all' || Koha.Preference('Babeltheque') ) %]<script type="text/javascript" src="[% interface %]/[% theme %]/lib/jquery/plugins/jquery.rating.js"></script>[% END %]
551
[% IF ( OpacStarRatings == 'all' || Koha.Preference('Babeltheque') ) %]<script type="text/javascript" src="[% interface %]/[% theme %]/lib/jquery/plugins/jquery.rating.js"></script>[% END %]
552
[% IF ( OverDriveEnabled ) %]<script type="text/javascript" src="[% interface %]/[% theme %]/js/overdrive.js"></script>[% END %]
552
[% IF ( OverDriveEnabled ) %]<script type="text/javascript" src="[% interface %]/[% theme %]/js/overdrive.js"></script>[% END %]
553
<script type="text/javascript" src="[% interface %]/[% theme %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
553
<script type="text/javascript" src="[% interface %]/[% theme %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
554
[% IF ( OpacHighlightedWords ) %]<script type="text/javascript" src="[% interface %]/[% theme %]/lib/jquery/plugins/jquery.highlight-3.js"></script>
554
[% IF ( OpacHighlightedWords ) %][% INCLUDE 'opac-highlight.inc' %][% END %]
555
[% END %]<script type="text/javascript">
555
<script type="text/javascript">
556
//<![CDATA[
556
//<![CDATA[
557
[% IF ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'RequestOnOpac' ) == 1 ) %]
557
[% IF ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'RequestOnOpac' ) == 1 ) %]
558
function holdMultiple() {
558
function holdMultiple() {
Lines 637-664 function enableCheckboxActions(){ Link Here
637
    }
637
    }
638
}
638
}
639
639
640
[% IF ( OpacHighlightedWords ) %]
641
var q_array = new Array();  // holds search terms if available
642
643
function highlightOff() {
644
    $("td").removeHighlight();
645
    $(".highlight_toggle").toggle();
646
}
647
function highlightOn() {
648
    var x;
649
    for (x in q_array) {
650
        q_array[x] = q_array[x].replace(/\w*:([\w])/, "$1");
651
        q_array[x] = q_array[x].toLowerCase();
652
        var myStopwords = "[% Koha.Preference('HighlightedStopWords') %]".toLowerCase().split('|');
653
        if ( (q_array[x].length > 0) && ($.inArray(q_array[x], myStopwords) == -1) ) {
654
            $(".title").highlight(q_array[x]);
655
            $(".author").highlight(q_array[x]);
656
            $(".results_summary").highlight(q_array[x]);
657
        }
658
    }
659
    $(".highlight_toggle").toggle();
660
}
661
[% END %]
662
$(document).ready(function(){
640
$(document).ready(function(){
663
    [% IF ( OpacHighlightedWords ) %]
641
    [% IF ( OpacHighlightedWords ) %]
664
        $('a.title').each(function() {
642
        $('a.title').each(function() {
(-)a/koha-tmpl/opac-tmpl/prog/en/includes/opac-highlight.inc (+27 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>
27
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results-grouped.tt (-17 lines)
Lines 75-97 $(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
        q_array[x] = q_array[x].toLowerCase();
88
        var myStopwords = "[% Koha.Preference('HighlightedStopWords') %]".toLowerCase().split('|');
89
        if ( (q_array[x].length > 0) && ($.inArray(q_array[x], myStopwords) == -1) ) {
90
            $("td").highlight(q_array[x]);
91
        }
92
    }
93
    $(".highlight_toggle").toggle();
94
}
95
//]]>
78
//]]>
96
</script>
79
</script>
97
</head>
80
</head>
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt (-24 / +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-116 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
92
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
        q_array[x] = q_array[x].toLowerCase();
104
        var myStopwords = "[% Koha.Preference('HighlightedStopWords') %]".toLowerCase().split('|');
105
        if ( (q_array[x].length > 0) && ($.inArray(q_array[x], myStopwords) == -1) ) {
106
            $(".title").highlight(q_array[x]);
107
            $(".author").highlight(q_array[x]);
108
            $(".results_summary").highlight(q_array[x]);
109
        }
110
    }
111
    $(".highlight_toggle").toggle();
112
}
113
[% END %]
114
$(document).ready(function(){
93
$(document).ready(function(){
115
    [% IF ( OpacHighlightedWords ) %]
94
    [% IF ( OpacHighlightedWords ) %]
116
        $('a.title').each(function() {
95
        $('a.title').each(function() {
117
- 

Return to bug 11270