Lines 326-339
Link Here
|
326 |
return $("#" + tab_id + "_status select").val(); |
326 |
return $("#" + tab_id + "_status select").val(); |
327 |
}; |
327 |
}; |
328 |
|
328 |
|
329 |
let offset = 2; |
329 |
let filters_options = {}; |
330 |
[% UNLESS Koha.Preference('LocalCoverImages') %]offset--;[% END %] |
330 |
|
331 |
let filters_options = { |
331 |
let itype_col = $("#" + tab_id + "_table thead th[data-colname='itype']").index(); |
332 |
[offset] : () => all_item_types, |
332 |
let holdingbranch_col = $("#" + tab_id + "_table thead th[data-colname='holdingbranch']").index(); |
333 |
[offset+1] : () => all_libraries, |
333 |
let homebranch_col = $("#" + tab_id + "_table thead th[data-colname='homebranch']").index(); |
334 |
[offset+2] : () => all_libraries, |
334 |
let status_col = $("#" + tab_id + "_table thead th[data-colname='status']").index(); |
335 |
[offset+7] : () => all_statuses, |
335 |
|
336 |
}; |
336 |
if ( itype_col >= 0 ) filters_options[itype_col] = () => all_item_types; |
|
|
337 |
if ( holdingbranch_col >= 0 ) filters_options[holdingbranch_col] = () => all_libraries; |
338 |
if ( homebranch_col >= 0 ) filters_options[homebranch_col] = () => all_libraries; |
339 |
if ( status_col >= 0 ) filters_options[status_col] = () => all_statuses; |
337 |
|
340 |
|
338 |
var items_table = $("#" + tab_id + '_table').kohaTable({ |
341 |
var items_table = $("#" + tab_id + '_table').kohaTable({ |
339 |
ajax: { url: item_table_url }, |
342 |
ajax: { url: item_table_url }, |
340 |
- |
|
|