From 40acf0bcf1565ab321f0d233b3240e094d665d94 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 (cherry picked from commit 8327b7d86e35d9b34e815d5aa686dea6d8814cfe) Signed-off-by: Martin Renvoize (cherry picked from commit 47272d22398a39a037d8c27639e1eee6574f86c6) Signed-off-by: Lucas Gass --- 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 8fcd45beae..f9b83a44e1 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