Bug 32821: Fix cataloguing/value_builder/stocknumber.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>
(cherry picked from commit 97c050eacb)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
parent
bb388991ac
commit
475871b3a4
|
|
@ -39,15 +39,19 @@ my $builder = sub {
|
|||
my $js = <<END_OF_JS;
|
||||
<script>
|
||||
|
||||
function Focus$function_name(id, force) {
|
||||
function set_stocknumber(id, force) {
|
||||
if (\$('#' + id).val() == '' || force) {
|
||||
\$('#' + id).val('$nextnum');
|
||||
}
|
||||
}
|
||||
|
||||
function Focus$function_name(event) {
|
||||
set_stocknumber(event.data.id, false);
|
||||
}
|
||||
|
||||
function Click$function_name(event) {
|
||||
Focus$function_name(event.data.id, 1);
|
||||
return false;
|
||||
event.preventDefault();
|
||||
set_stocknumber(event.data.id, true);
|
||||
}
|
||||
</script>
|
||||
END_OF_JS
|
||||
|
|
|
|||
Loading…
Reference in New Issue