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

(-)a/koha-tmpl/intranet-tmpl/lib/jquery/plugins/jquery.highlight-3.js (-3 / +4 lines)
Lines 1-6 Link Here
1
/*
1
/*
2
2
3
highlight v3
3
highlight v5
4
4
5
Highlights arbitrary terms.
5
Highlights arbitrary terms.
6
6
Lines 19-24 jQuery.fn.highlight = function(pat) { Link Here
19
  var skip = 0;
19
  var skip = 0;
20
  if (node.nodeType == 3) {
20
  if (node.nodeType == 3) {
21
   var pos = node.data.toUpperCase().indexOf(pat);
21
   var pos = node.data.toUpperCase().indexOf(pat);
22
   pos -= (node.data.substr(0, pos).toUpperCase().length - node.data.substr(0, pos).length);
22
   if (pos >= 0) {
23
   if (pos >= 0) {
23
    var spannode = document.createElement('span');
24
    var spannode = document.createElement('span');
24
    spannode.className = 'term';
25
    spannode.className = 'term';
Lines 37-45 jQuery.fn.highlight = function(pat) { Link Here
37
  }
38
  }
38
  return skip;
39
  return skip;
39
 }
40
 }
40
 return this.each(function() {
41
 return this.length && pat && pat.length ? this.each(function() {
41
  innerHighlight(this, pat.toUpperCase());
42
  innerHighlight(this, pat.toUpperCase());
42
 });
43
 }) : this;
43
};
44
};
44
45
45
jQuery.fn.removeHighlight = function() {
46
jQuery.fn.removeHighlight = function() {
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc (-1 / +1 lines)
Lines 21-27 Link Here
21
[% Asset.js("lib/jquery/jquery-ui-1.13.1.min.js") | $raw %]
21
[% Asset.js("lib/jquery/jquery-ui-1.13.1.min.js") | $raw %]
22
[% Asset.js("lib/shortcut/shortcut.js") | $raw %]
22
[% Asset.js("lib/shortcut/shortcut.js") | $raw %]
23
[% Asset.js("lib/js-cookie/js.cookie-2.2.1.min.js") | $raw %]
23
[% Asset.js("lib/js-cookie/js.cookie-2.2.1.min.js") | $raw %]
24
[% Asset.js("lib/jquery/plugins/jquery.highlight-3.js") | $raw %]
24
[% Asset.js("lib/jquery/plugins/jquery.highlight-5.js") | $raw %]
25
[% Asset.js("lib/bootstrap/bootstrap.min.js") | $raw %]
25
[% Asset.js("lib/bootstrap/bootstrap.min.js") | $raw %]
26
[% Asset.js("lib/jquery/plugins/jquery.validate.min.js") | $raw %]
26
[% Asset.js("lib/jquery/plugins/jquery.validate.min.js") | $raw %]
27
<!-- koha core js -->
27
<!-- koha core js -->
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt (-1 / +1 lines)
Lines 1441-1447 Link Here
1441
1441
1442
    [% CoverImagePlugins | $raw %]
1442
    [% CoverImagePlugins | $raw %]
1443
1443
1444
    [% IF ( OpacHighlightedWords ) %][% Asset.js("lib/jquery/plugins/jquery.highlight-3.js") | $raw %][% END %]
1444
    [% IF ( OpacHighlightedWords ) %][% Asset.js("lib/jquery/plugins/jquery.highlight-5.js") | $raw %][% END %]
1445
    [% IF ( Koha.Preference('OPACDetailQRCode') ) %]
1445
    [% IF ( Koha.Preference('OPACDetailQRCode') ) %]
1446
        [% Asset.js("lib/kjua/kjua.min.js") | $raw %]
1446
        [% Asset.js("lib/kjua/kjua.min.js") | $raw %]
1447
    [% END %]
1447
    [% END %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt (-1 / +1 lines)
Lines 584-590 Link Here
584
    [% Asset.js("js/authtoresults.js") | $raw %]
584
    [% Asset.js("js/authtoresults.js") | $raw %]
585
    [% Asset.js("lib/hc-sticky.js") | $raw %]
585
    [% Asset.js("lib/hc-sticky.js") | $raw %]
586
    [% IF ( OpacHighlightedWords ) %]
586
    [% IF ( OpacHighlightedWords ) %]
587
        [% Asset.js("lib/jquery/plugins/jquery.highlight-3.js") | $raw %]
587
        [% Asset.js("lib/jquery/plugins/jquery.highlight-5.js") | $raw %]
588
    [% END %]
588
    [% END %]
589
    [% IF OpenLibraryCovers || OpenLibrarySearch %]
589
    [% IF OpenLibraryCovers || OpenLibrarySearch %]
590
        [% Asset.js("js/openlibrary.js") | $raw %]
590
        [% Asset.js("js/openlibrary.js") | $raw %]
(-)a/koha-tmpl/opac-tmpl/lib/jquery/plugins/jquery.highlight-3.js (-4 / +4 lines)
Lines 1-6 Link Here
1
/*
1
/*
2
2
3
highlight v3
3
highlight v5
4
4
5
Highlights arbitrary terms.
5
Highlights arbitrary terms.
6
6
Lines 19-24 jQuery.fn.highlight = function(pat) { Link Here
19
  var skip = 0;
19
  var skip = 0;
20
  if (node.nodeType == 3) {
20
  if (node.nodeType == 3) {
21
   var pos = node.data.toUpperCase().indexOf(pat);
21
   var pos = node.data.toUpperCase().indexOf(pat);
22
   pos -= (node.data.substr(0, pos).toUpperCase().length - node.data.substr(0, pos).length);
22
   if (pos >= 0) {
23
   if (pos >= 0) {
23
    var spannode = document.createElement('span');
24
    var spannode = document.createElement('span');
24
    spannode.className = 'term';
25
    spannode.className = 'term';
Lines 37-45 jQuery.fn.highlight = function(pat) { Link Here
37
  }
38
  }
38
  return skip;
39
  return skip;
39
 }
40
 }
40
 return this.each(function() {
41
 return this.length && pat && pat.length ? this.each(function() {
41
  innerHighlight(this, pat.toUpperCase());
42
  innerHighlight(this, pat.toUpperCase());
42
 });
43
 }) : this;
43
};
44
};
44
45
45
jQuery.fn.removeHighlight = function() {
46
jQuery.fn.removeHighlight = function() {
46
- 

Return to bug 29578