Lines 47-68
my $builder = sub {
Link Here
|
47 |
<script type=\"text/javascript\"> |
47 |
<script type=\"text/javascript\"> |
48 |
//<![CDATA[ |
48 |
//<![CDATA[ |
49 |
|
49 |
|
50 |
function Focus$function_name(subfield_managed) { |
50 |
function Focus$function_name(event) { |
51 |
if (!document.getElementById(\"$params->{id}\").value) { |
51 |
if (!document.getElementById(event.data.id).value) { |
52 |
var authtype=document.forms['f'].elements['authtypecode'].value; |
52 |
var authtype=document.forms['f'].elements['authtypecode'].value; |
53 |
var fieldval='$dateentered$defaultval'; |
53 |
var fieldval='$dateentered$defaultval'; |
54 |
if(authtype && (authtype == 'TOPIC_TERM' || authtype == 'GENRE/FORM' || authtype == 'CHRON_TERM')) { |
54 |
if(authtype && (authtype == 'TOPIC_TERM' || authtype == 'GENRE/FORM' || authtype == 'CHRON_TERM')) { |
55 |
fieldval= fieldval.substr(0,14)+'b'+fieldval.substr(15); |
55 |
fieldval= fieldval.substr(0,14)+'b'+fieldval.substr(15); |
56 |
} |
56 |
} |
57 |
document.getElementById(\"$params->{id}\").value=fieldval; |
57 |
document.getElementById(event.data.id).value=fieldval; |
58 |
} |
58 |
} |
59 |
return 1; |
59 |
return 1; |
60 |
} |
60 |
} |
61 |
|
61 |
|
62 |
function Click$function_name(i) { |
62 |
function Click$function_name(event) { |
63 |
var authtype=document.forms['f'].elements['authtypecode'].value; |
63 |
var authtype=document.forms['f'].elements['authtypecode'].value; |
64 |
defaultvalue=document.getElementById(\"$params->{id}\").value; |
64 |
defaultvalue=document.getElementById(event.data.id).value; |
65 |
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'); |
65 |
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'); |
66 |
|
66 |
|
67 |
} |
67 |
} |
68 |
//]]> |
68 |
//]]> |