View | Details | Raw Unified | Return to bug 32875
Collapse All | Expand All

(-)a/cataloguing/value_builder/unimarc_leader_authorities.pl (-5 / +4 lines)
Lines 30-44 sub plugin_javascript { Link Here
30
    my ( $dbh, $record, $tagslib, $field_number ) = @_;
30
    my ( $dbh, $record, $tagslib, $field_number ) = @_;
31
    my $res           = "
31
    my $res           = "
32
        <script type='text/javascript'>
32
        <script type='text/javascript'>
33
            function Clic$field_number(i) {
33
            function Clic$field_number(event) {
34
                var defaultvalue;
34
                var defaultvalue;
35
                try {
35
                try {
36
                    defaultvalue = document.getElementById(i).value;
36
                    defaultvalue = document.getElementById(event.data.id).value;
37
                } catch(e) {
37
                } catch(e) {
38
                    alert('error when getting '+i);
38
                    alert('error when getting '+event.data.id);
39
                    return;
39
                    return;
40
                }
40
                }
41
                window.open(\"/cgi-bin/koha/cataloguing/plugin_launcher.pl?plugin_name=unimarc_leader_authorities.pl&index=\"+i+\"&result=\"+defaultvalue,\"unimarc_field_000\",'width=1000,height=600,toolbar=false,scrollbars=yes');
41
                window.open(\"/cgi-bin/koha/cataloguing/plugin_launcher.pl?plugin_name=unimarc_leader_authorities.pl&index=\" + event.data.id + \"&result=\"+defaultvalue,\"unimarc_field_000\",'width=1000,height=600,toolbar=false,scrollbars=yes');
42
            }
42
            }
43
        </script>
43
        </script>
44
";
44
";
45
- 

Return to bug 32875