From 8327b7d86e35d9b34e815d5aa686dea6d8814cfe Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Fri, 3 Feb 2023 11:58:50 +0100 Subject: [PATCH] Bug 32813: Fix cataloguing/value_builder/barcode.pl Use event parameter instead of id. This is part of the refactoring happening in bug 30975 Test plan: 1. Verify that the plugin continues to work as before Signed-off-by: Owen Leonard Signed-off-by: Marcel de Rooy Signed-off-by: Tomas Cohen Arazi --- cataloguing/value_builder/barcode.pl | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/cataloguing/value_builder/barcode.pl b/cataloguing/value_builder/barcode.pl index e5a0966a63..bd4a927ef1 100755 --- a/cataloguing/value_builder/barcode.pl +++ b/cataloguing/value_builder/barcode.pl @@ -86,14 +86,16 @@ END_OF_JS my $js = < - -function Focus$function_name(id, force) { +function set_barcode(id, force) { $scr } -function Click$function_name(id) { - Focus$function_name(id, 1); - return false; +function Focus$function_name(event) { + set_barcode(event.data.id, false); +} + +function Click$function_name(event) { + set_barcode(event.data.id, true); } END_OF_JS -- 2.39.5