Bug 32873: Fix cataloguing/value_builder/unimarc_field_686a.pl

Use event parameter

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: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Julian Maurice 2023-02-03 11:58:55 +01:00 committed by Tomas Cohen Arazi
parent 166f13b88e
commit 9030a637e2
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F

View file

@ -31,9 +31,10 @@ my ($dbh,$record,$tagslib,$field_number) = @_;
my $function_name= $field_number;
my $res = "
<script>
function Clic$function_name(subfield_managed) {
defaultvalue=document.getElementById(\"$field_number\").value;
newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_686a.pl&result=\"+defaultvalue+\"&index=$field_number\",\"value_builder\",'width=700,height=600,toolbar=false,scrollbars=yes');
function Clic$function_name(event) {
event.preventDefault();
defaultvalue=document.getElementById(event.data.id).value;
newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_686a.pl&result=\"+defaultvalue+\"&index=\" + event.data.id, \"value_builder\",'width=700,height=600,toolbar=false,scrollbars=yes');
}
</script>