Bug 39423: Fix column checkboxes in batch item modification hide incorrect columns

In batch item modification, unchecking any column hides the previous column.

This is caused by new HTML in table header :
<span class="dt-column-title"></span><span class="dt-column-order"></span>

This patch fixed by adding ".dt-column-title" to function guess_nb_cols().

Test plan :
1) Go to batch item modification
2) In "Show/hide columns:" click on "Home library" column
=> Check correct column is hidden
3) Go to another batch item modification
=> Check column "Home library" is hidden (from cookie storage)

Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7c501cc381)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This commit is contained in:
Fridolin Somers 2025-08-06 10:18:06 +02:00 committed by Paul Derscheid
parent 82ac526335
commit ee3bf78fd4
No known key found for this signature in database
GPG Key ID: C25F9FD44CED595B
1 changed files with 1 additions and 1 deletions

View File

@ -5,7 +5,7 @@ date.setTime(date.getTime() + 365 * 24 * 60 * 60 * 1000);
function guess_nb_cols() {
// This is a bit ugly, we are trying to know if there are checkboxes in the first column of the table
if ($("#itemst tr:first th:first").html() == "") {
if ($("#itemst tr:first th:first .dt-column-title").html() == "") {
// First header is empty, it's a checkbox
return 3;
} else {