Lines 47-54
my $builder = sub {
Link Here
|
47 |
my ( $params ) = @_; |
47 |
my ( $params ) = @_; |
48 |
my $res = qq{ |
48 |
my $res = qq{ |
49 |
<script> |
49 |
<script> |
50 |
function Click$params->{id}() { |
50 |
function Click$params->{id}(ev) { |
51 |
var code = document.getElementById('$params->{id}'); |
51 |
ev.preventDefault(); |
|
|
52 |
var code = document.getElementById(ev.data.id); |
52 |
\$.ajax({ |
53 |
\$.ajax({ |
53 |
url: '/cgi-bin/koha/cataloguing/plugin_launcher.pl', |
54 |
url: '/cgi-bin/koha/cataloguing/plugin_launcher.pl', |
54 |
type: 'POST', |
55 |
type: 'POST', |
Lines 57-63
my $builder = sub {
Link Here
|
57 |
'code' : code.value, |
58 |
'code' : code.value, |
58 |
}, |
59 |
}, |
59 |
success: function(data){ |
60 |
success: function(data){ |
60 |
var field = document.getElementById('$params->{id}'); |
61 |
var field = document.getElementById(ev.data.id); |
61 |
field.value = data; |
62 |
field.value = data; |
62 |
return 1; |
63 |
return 1; |
63 |
} |
64 |
} |
64 |
- |
|
|