Lines 40-61
my $builder = sub {
Link Here
|
40 |
<script type=\"text/javascript\"> |
40 |
<script type=\"text/javascript\"> |
41 |
//<![CDATA[ |
41 |
//<![CDATA[ |
42 |
|
42 |
|
43 |
function Focus$function_name(subfield_managed) { |
43 |
function Focus$function_name(event) { |
44 |
if (!document.getElementById(\"$params->{id}\").value) { |
44 |
if (!document.getElementById(event.data.id).value) { |
45 |
var authtype=document.forms['f'].elements['authtypecode'].value; |
45 |
var authtype=document.forms['f'].elements['authtypecode'].value; |
46 |
var fieldval='$dateentered$defaultval'; |
46 |
var fieldval='$dateentered$defaultval'; |
47 |
if(authtype && (authtype == 'TOPIC_TERM' || authtype == 'GENRE/FORM' || authtype == 'CHRON_TERM')) { |
47 |
if(authtype && (authtype == 'TOPIC_TERM' || authtype == 'GENRE/FORM' || authtype == 'CHRON_TERM')) { |
48 |
fieldval= fieldval.substr(0,14)+'b'+fieldval.substr(15); |
48 |
fieldval= fieldval.substr(0,14)+'b'+fieldval.substr(15); |
49 |
} |
49 |
} |
50 |
document.getElementById(\"$params->{id}\").value=fieldval; |
50 |
document.getElementById(event.data.id).value=fieldval; |
51 |
} |
51 |
} |
52 |
return 1; |
52 |
return 1; |
53 |
} |
53 |
} |
54 |
|
54 |
|
55 |
function Click$function_name(i) { |
55 |
function Click$function_name(event) { |
56 |
var authtype=document.forms['f'].elements['authtypecode'].value; |
56 |
var authtype=document.forms['f'].elements['authtypecode'].value; |
57 |
defaultvalue=document.getElementById(\"$params->{id}\").value; |
57 |
defaultvalue=document.getElementById(event.data.id).value; |
58 |
newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=marc21_field_008_authorities.pl&index=$params->{id}&result=\"+defaultvalue+\"&authtypecode=\"+authtype,\"tag_editor\",'width=1000,height=600,toolbar=false,scrollbars=yes'); |
58 |
newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=marc21_field_008_authorities.pl&index=\"+ event.data.id +\"&result=\"+defaultvalue+\"&authtypecode=\"+authtype,\"tag_editor\",'width=1000,height=600,toolbar=false,scrollbars=yes'); |
59 |
|
59 |
|
60 |
} |
60 |
} |
61 |
//]]> |
61 |
//]]> |