Bug 32871: Fix cataloguing/value_builder/unimarc_field_225a.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 f7beb484eb
commit c9ddf42075
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F

View file

@ -62,8 +62,9 @@ sub plugin_javascript {
<script>
function Clic$function_name(index) {
function Clic$function_name(event) {
/* find the 010a value and the 210c. it will be used in the popup to find possibles collections */
event.preventDefault();
var isbn_found = 0;
var editor_found = 0;
@ -81,8 +82,8 @@ sub plugin_javascript {
}
}
defaultvalue = document.getElementById(\"$field_number\").value;
window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_225a.pl&index=\"+index+\"&result=\"+defaultvalue+\"&editor_found=\"+editor_found,\"unimarc225a\",'width=500,height=400,toolbar=false,scrollbars=no');
defaultvalue = document.getElementById(event.data.id).value;
window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_225a.pl&index=\"+event.data.id+\"&result=\"+defaultvalue+\"&editor_found=\"+editor_found,\"unimarc225a\",'width=500,height=400,toolbar=false,scrollbars=no');
}
</script>