Koha/koha-tmpl/intranet-tmpl/lib
Andreas Roussos be81f156b8
Bug 32447: Fix DataTable filtering when hidden columns are in place
The bibliographic record's details page in the Staff interface
includes a 'Holdings' table at the bottom with information for
each item attached to the record. When activating the filters
in this table, there is no input field for the barcode column
but just bold text.

This broke in v22.11.00, the related commit being 018a981b9b
from Bug 29282 where two new hidden columns were added to that
table.

We can fix this by taking advantage of the existing code in
koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc
(introduced by commit dfb7af91af from Bug 23307) which allows
us to create and hook our own custom columnsInit() function in
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt
to redraw the DataTable filters upon page load if a column is
marked as 'is_hidden: 1' in admin/columns_settings.yml, or if
a column is added/removed via the "⚙ Columns" button (both
are handled by the DataTables column-visibility.dt event).

Redrawing the filters via the above method also fixes the
issue described in Bug 32448.

Test plan:

1) Confirm the erratic DataTable behaviour outlined above
2) Apply this patch and reload all JS assets (hit CTRL-F5)
3) Confirm that you now see the correct input text field
   for the 'Barcode' column
4) Confirm that you can search for barcodes or in any other
   column successfully
5) Try toggling the visibility of the columns and making as
   many search variations as possible -- it should all now
   work without any glitches!

For extra credit ;-) you can also test the 'Other holdings'
table by setting the SeparateHoldings SysPref to 'Separate'.

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-03-31 19:19:27 +02:00
..
bootstrap Bug 30952: Fix pagination colors 2022-10-12 16:14:16 -03:00
Chocolat Bug 32308: Update Chocolat image viewer CSS to conform to redesign color scheme 2022-11-22 09:11:05 -03:00
codemirror Bug 32613: Add database tables to autocomplete 2023-03-06 14:45:29 -03:00
d3c3
datatables
dayjs Bug 30310: Add missing utc plugin 2023-01-31 10:19:45 -03:00
flatpickr Bug 30523: Quiet console warning about missing shortcut-buttons map file 2022-06-02 09:51:09 -03:00
font-awesome
greybox
jquery Bug 32447: Fix DataTable filtering when hidden columns are in place 2023-03-31 19:19:27 +02:00
js-cookie
jsdiff
keyboard
koha/cateditor Bug 27981: Add option to automatically set 001 to the biblionumber 2022-09-12 15:17:36 -03:00
leaflet
linters
select2
shortcut
tiny_mce
filesaver.js
hc-sticky.js
require.js