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

(-)a/cataloguing/value_builder/unimarc_field_115a.pl (-3 / +4 lines)
Lines 32-38 sub plugin_javascript { Link Here
32
    my ( $dbh, $record, $tagslib, $field_number ) = @_;
32
    my ( $dbh, $record, $tagslib, $field_number ) = @_;
33
    my $res = "
33
    my $res = "
34
    <script>
34
    <script>
35
    function Clic$field_number(i) {
35
    function Clic$field_number(event) {
36
        event.preventDefault();
37
        const i = event.data.id;
36
        var defaultvalue;
38
        var defaultvalue;
37
        try {
39
        try {
38
            defaultvalue = document.getElementById(i).value;
40
            defaultvalue = document.getElementById(i).value;
Lines 40-46 sub plugin_javascript { Link Here
40
            alert('error when getting '+i);
42
            alert('error when getting '+i);
41
            return;
43
            return;
42
        }
44
        }
43
    	window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_115a.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_115a\",'width=1200,height=600,toolbar=false,scrollbars=yes');
45
        window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_115a.pl&index=\" + i + \"&result=\"+defaultvalue,\"unimarc_field_115a\",'width=1200,height=600,toolbar=false,scrollbars=yes');
44
    }
46
    }
45
47
46
    </script>
48
    </script>
47
- 

Return to bug 32828