Lines 530-535
Link Here
|
530 |
[% END # / IF serialcollection %] |
530 |
[% END # / IF serialcollection %] |
531 |
|
531 |
|
532 |
[% WRAPPER tab_panel tabname="holdings" %] |
532 |
[% WRAPPER tab_panel tabname="holdings" %] |
|
|
533 |
<input style="margin-bottom:10px; "type="text" placeholder="Search holdings" id="holdings_search_input"> |
533 |
[% IF too_many_items %] |
534 |
[% IF too_many_items %] |
534 |
<p>This record has many physical items ([% items_count | html %]). <a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | uri %]&viewallitems=1">View all the physical items.</a></p> |
535 |
<p>This record has many physical items ([% items_count | html %]). <a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | uri %]&viewallitems=1">View all the physical items.</a></p> |
535 |
[% ELSIF ( itemloop.size ) %] |
536 |
[% ELSIF ( itemloop.size ) %] |
Lines 2047-2052
Link Here
|
2047 |
$("#libraryInfoModalLabel, #libraryInfo").html(""); |
2048 |
$("#libraryInfoModalLabel, #libraryInfo").html(""); |
2048 |
$("#libraryInfoLink").attr("href", ""); |
2049 |
$("#libraryInfoLink").attr("href", ""); |
2049 |
}); |
2050 |
}); |
|
|
2051 |
|
2052 |
// Search holdings rows: |
2053 |
const elsTr = $("#holdingst tbody tr"); |
2054 |
const elSearch = $("#holdings_search_input"); |
2055 |
const regEsc = (v) => v.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'); |
2056 |
|
2057 |
const filterRows = (evt) => { |
2058 |
const val = evt.currentTarget.value.trim(); // Trim from whitespaces |
2059 |
const reg = new RegExp(regEsc(val), "i"); // "i" = case insensitive |
2060 |
|
2061 |
$.each(elsTr, function(index, elTr) { |
2062 |
if(!reg.test(elTr.textContent)){ |
2063 |
$(elTr).addClass('d-none'); |
2064 |
}else{ |
2065 |
$(elTr).removeClass('d-none'); |
2066 |
} |
2067 |
}); |
2068 |
}; |
2069 |
|
2070 |
$('#holdings_search_input').on('input',function(e){ |
2071 |
filterRows(e); |
2072 |
}); |
2050 |
}); |
2073 |
}); |
2051 |
|
2074 |
|
2052 |
function showBsTab( container, panelid ){ |
2075 |
function showBsTab( container, panelid ){ |
2053 |
- |
|
|