Lines 326-343
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 %] |
|
|
331 |
|
330 |
|
332 |
let status_column = offset + 7; |
331 |
let itype_col = $("#" + tab_id + "_table thead th[data-colname='itype']").index(); |
333 |
[% UNLESS item_level_itypes %]status_column--;[% END %] |
332 |
let holdingbranch_col = $("#" + tab_id + "_table thead th[data-colname='holdingbranch']").index(); |
|
|
333 |
let homebranch_col = $("#" + tab_id + "_table thead th[data-colname='homebranch']").index(); |
334 |
let status_col = $("#" + tab_id + "_table thead th[data-colname='status']").index(); |
334 |
|
335 |
|
335 |
let filters_options = { |
336 |
if ( itype_col >= 0 ) filters_options[itype_col] = () => all_item_types; |
336 |
[offset] : () => all_item_types, |
337 |
if ( holdingbranch_col >= 0 ) filters_options[holdingbranch_col] = () => all_libraries; |
337 |
[offset+1] : () => all_libraries, |
338 |
if ( homebranch_col >= 0 ) filters_options[homebranch_col] = () => all_libraries; |
338 |
[offset+2] : () => all_libraries, |
339 |
if ( status_col >= 0 ) filters_options[status_col] = () => all_statuses; |
339 |
[status_column] : () => all_statuses, |
|
|
340 |
}; |
341 |
|
340 |
|
342 |
var items_table = $("#" + tab_id + '_table').kohaTable({ |
341 |
var items_table = $("#" + tab_id + '_table').kohaTable({ |
343 |
ajax: { url: item_table_url }, |
342 |
ajax: { url: item_table_url }, |
344 |
- |
|
|