Koha/koha-tmpl/intranet-tmpl/lib
Andreas Roussos 805c5d8072 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>
(cherry picked from commit be81f156b8)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
2023-04-16 18:10:38 +01: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 27643: Add CodeMirror custom syntax highlighting for SQL runtime parameters 2021-02-08 17:09:34 +01:00
d3c3
datatables Bug 26471: Remove invalid Map URL 2021-05-10 10:28:00 +02:00
dayjs Bug 30310: Add missing utc plugin 2023-02-01 15:43:09 +00: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-04-16 18:10:38 +01:00
js-cookie Bug 23944: Phase out use of jquery.cookie.js in favor of js.cookie.js 2020-01-29 09:08:30 +00:00
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 Bug 24193: Add CodeMirror linting of JavaScript, CSS, HTML, and YAML 2020-03-02 10:44:14 +00:00
select2 Bug 25727: Upgrade the Select2 JS lib to version 4 2020-08-24 11:19:03 +02:00
shortcut
tiny_mce Bug 26949: Upgrade TinyMCE in the staff interface from 5.0.16 to 5.9.2 2021-10-05 10:58:13 +02:00
filesaver.js
hc-sticky.js
require.js