Bug 32814: Fix cataloguing/value_builder/callnumber-KU.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: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Julian Maurice 2023-02-03 11:58:51 +01:00 committed by Tomas Cohen Arazi
parent 13e1e55fb8
commit a925b07f7b
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F

View file

@ -46,8 +46,9 @@ my $builder = sub {
my ( $params ) = @_;
my $res="
<script>
function Click$params->{id}() {
var code = document.getElementById('$params->{id}');
function Click$params->{id}(ev) {
ev.preventDefault();
var code = document.getElementById(ev.data.id);
var url = '../cataloguing/plugin_launcher.pl?plugin_name=callnumber-KU.pl&code=' + code.value;
var req = \$.get(url);
req.done(function(resp){