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

(-)a/cataloguing/value_builder/unimarc_leader.pl (-7 / +6 lines)
Lines 33-49 sub plugin_javascript { Link Here
33
    my $function_name = $field_number;
33
    my $function_name = $field_number;
34
    my $res           = "
34
    my $res           = "
35
<script>
35
<script>
36
function Blur$function_name(subfield_managed) {
36
function Blur$function_name(event) {
37
	var leader_length = document.getElementById(\"$field_number\").value.length;
37
	var leader_length = document.getElementById(event.data.id).value.length;
38
    if (leader_length != 24 && leader_length !=0) {
38
    if (leader_length != 24 && leader_length !=0) {
39
        alert(_('leader has an incorrect size: ' + leader_length + ' instead of 24 chars'));
39
        alert(_('leader has an incorrect size: ' + leader_length + ' instead of 24 chars'));
40
    }
40
    }
41
    return 1;
42
}
41
}
43
42
44
function Clic$function_name(i) {
43
function Clic$function_name(event) {
45
	defaultvalue=document.getElementById(\"$field_number\").value;
44
    event.preventDefault();
46
	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_leader.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_100\",'width=1000,height=600,toolbar=false,scrollbars=yes');
45
    defaultvalue=document.getElementById(event.data.id).value;
46
    newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_leader.pl&index=\" + event.data.id + \"&result=\"+defaultvalue,\"unimarc_field_100\",'width=1000,height=600,toolbar=false,scrollbars=yes');
47
47
48
}
48
}
49
</script>
49
</script>
50
- 

Return to bug 32876