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 <oleonard@myacpl.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Julian Maurice 2023-02-03 11:58:50 +01:00 committed by Tomas Cohen Arazi
parent f42dcf9c51
commit 8327b7d86e
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F

View file

@ -86,14 +86,16 @@ END_OF_JS
my $js = <<END_OF_JS;
<script>
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);
}
</script>
END_OF_JS