From a5d8cfcc18521f65cc523838f856ddecf9a4147c Mon Sep 17 00:00:00 2001 From: Brendan Lawlor Date: Thu, 18 Sep 2025 17:24:08 +0000 Subject: [PATCH] Bug 30303: (follow-up) Update diff highlighting instead of swapping columns This patch makes the ui more visually consistent and intuitive Signed-off-by: Lari Taskula --- .../prog/en/modules/members/merge-patrons.tt | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/merge-patrons.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/merge-patrons.tt index 0ba7575220b..c50a52ae987 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/merge-patrons.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/merge-patrons.tt @@ -413,10 +413,10 @@ _("Field") + `
` + - _("Keep") + + _("Destination record") + `
` + - _("Delete") + + _("Source record") + `
` + _("Copy value") + @@ -450,13 +450,17 @@ $("#copy-fields .row input[type=checkbox]").on("click", function () { let ins = $(this).closest(".row").find(".col2 pre").data("og").toString(); let del = $(this).closest(".row").find(".col3 pre").data("og").toString(); - let diffs; - if ($(this).is(":checked")) { - diffs = diffString(ins, del); - } else { - diffs = diffString(del, ins); - } - $(this).closest(".row").find(".col2 pre, .col3 pre").html(diffs); + let diffs = diffString(ins, del); + + $(this).closest(".row").find(".col3 pre, .col2 pre").html(diffs); + + $(this) + .closest(".row") + .find(".col2, .col3") + .each(function () { + $(this).toggleClass("col2", "col3"); + $(this).toggleClass("col3", "col2"); + }); }); } -- 2.34.1