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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt (-8 / +9 lines)
Lines 1344-1356 Link Here
1344
        function highlightOn() {
1344
        function highlightOn() {
1345
            var x;
1345
            var x;
1346
            for (x in q_array) {
1346
            for (x in q_array) {
1347
                q_array[x] = q_array[x].replace(/\w*:([\w])/, "$1");
1347
                if ( q_array[x].length > 0 ) {
1348
                q_array[x] = q_array[x].toLowerCase();
1348
                    q_array[x] = q_array[x].replace(/\w*:([\w])/, "$1");
1349
                var myStopwords = "[% Koha.Preference('NotHighlightedWords') %]".toLowerCase().split('|');
1349
                    q_array[x] = q_array[x].toLowerCase();
1350
                if( $.inArray(q_array[x], myStopwords) == -1 ) {
1350
                    var myStopwords = "[% Koha.Preference('NotHighlightedWords') %]".toLowerCase().split('|');
1351
                    $(".title").highlight(q_array[x]);
1351
                    if( $.inArray(q_array[x], myStopwords) == -1 ) {
1352
                    $(".author").highlight(q_array[x]);
1352
                        $(".title").highlight(q_array[x]);
1353
                    $(".results_summary").highlight(q_array[x]);
1353
                        $(".author").highlight(q_array[x]);
1354
                        $(".results_summary").highlight(q_array[x]);
1355
                    }
1354
                }
1356
                }
1355
            }
1357
            }
1356
            $(".highlight_toggle").toggle();
1358
            $(".highlight_toggle").toggle();
1357
- 

Return to bug 10956