From 8a5555238da6671320ef4cd46cb122bdabf784c1 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 16 Jun 2026 07:20:07 +0200 Subject: [PATCH] Bug 41604: Save user decision per column when visibility changes - Modify column-visibility.dt event handler to store the visibility preference of the user - Improve _dt_force_visibility() to correctly pick the correctly visibility value depending on visibility_condition, is_hidden, and the user preference - Add _dt_get_expected_column_visibility() to guess what's the expected visibility - Force boolean true/false (vs 1/0) using !! - Rely on a global variable kohaTableUserChoices to store the user choice. It will be part of the state and store in localStorage. Signed-off-by: Jason Robb Signed-off-by: Victor Grousset/tuxayo Signed-off-by: Lucas Gass --- .../prog/en/modules/acqui/basket.tt | 9 +- .../prog/en/modules/members/holdshistory.tt | 3 +- .../prog/en/modules/tools/modborrowers.tt | 9 +- koha-tmpl/intranet-tmpl/prog/js/checkouts.js | 12 +- koha-tmpl/intranet-tmpl/prog/js/datatables.js | 157 ++++++++++++------ .../integration/KohaTable/KohaTable_spec.ts | 60 ++++++- 6 files changed, 170 insertions(+), 80 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt index 81a3a925d0..6685a9d3d2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt @@ -1450,19 +1450,16 @@ diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt index 7773823b8a..41333bdfce 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt @@ -191,8 +191,7 @@