version 1.47, 2005/02/18 05:37:42
|
version 1.49, 2005/02/22 21:33:27
|
Line 85 JMESECTION
|
Line 85 JMESECTION
|
<head> |
<head> |
<title>Molecule Editor</title> |
<title>Molecule Editor</title> |
<script type="text/javascript"> |
<script type="text/javascript"> |
// <!-- |
|
function submitSmiles() { |
function submitSmiles() { |
jmeFile = document.applets.JME.jmeFile(); |
jmeFile = document.applets.JME.jmeFile(); |
if (jmeFile == "") { |
if (jmeFile == "") { |
Line 99 function submitSmiles() {
|
Line 98 function submitSmiles() {
|
function openHelpWindow() { |
function openHelpWindow() { |
window.open("/adm/jme/jme_help.html","","scrollbars=yes,resizable=yes,width=500,height=600"); |
window.open("/adm/jme/jme_help.html","","scrollbars=yes,resizable=yes,width=500,height=600"); |
} |
} |
// --> |
|
</script> |
</script> |
</head> |
</head> |
<body bgcolor="#ffffff"> |
<body bgcolor="#ffffff"> |
Line 109 You have to enable Java and JavaScript o
|
Line 107 You have to enable Java and JavaScript o
|
$molecule |
$molecule |
<param name="options" value="$options" /> |
<param name="options" value="$options" /> |
</applet><br /> |
</applet><br /> |
<font face="arial,helvetica,sans-serif" size=-1><a href="http://www.molinspiration.com/jme/index.html">JME Editor</a> courtesy of Peter Ertl, Novartis</font> |
<font face="arial,helvetica,sans-serif" size="-1"><a href="http://www.molinspiration.com/jme/index.html">JME Editor</a> courtesy of Peter Ertl, Novartis</font> |
<form> |
<form> |
<input type="button" name="submit" value="Insert Answer" onclick = "submitSmiles();" /> |
<input type="button" name="submit" value="Insert Answer" onclick = "submitSmiles();" /> |
<br /> |
<br /> |
Line 125 CHEMPAGE
|
Line 123 CHEMPAGE
|
$body=~s/\n/ /g; |
$body=~s/\n/ /g; |
my $docopen=&Apache::lonhtmlcommon::javascript_docopen(); |
my $docopen=&Apache::lonhtmlcommon::javascript_docopen(); |
my $result=<<CHEMINPUT; |
my $result=<<CHEMINPUT; |
<input type="button" value="Draw Molecule" onclick="javascript:editor=window.open('','','width=500,height=500,scrollbars=no,resizable=yes');editor.$docopen;editor.document.writeln('$body')" /> |
<input type="button" value="Draw Molecule" onclick="javascript:editor=window.open('/rat/adm/empty.html','jmeedit','width=500,height=500,menubar=yes,scrollbars=no,resizable=yes');editor.$docopen;editor.document.write('$body');editor.document.close();editor.focus()" /> |
CHEMINPUT |
CHEMINPUT |
return $result; |
return $result; |
} |
} |
Line 438 sub end_reactionresponse {
|
Line 436 sub end_reactionresponse {
|
sub start_chem { |
sub start_chem { |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style) = @_; |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style) = @_; |
my $result = ''; |
my $result = ''; |
|
my $inside = &Apache::lonxml::get_all_text_unbalanced("/chem",$parser); |
if ($target eq 'tex' || $target eq 'web') { |
if ($target eq 'tex' || $target eq 'web') { |
&Apache::lonxml::startredirection(); |
$inside=&Apache::run::evaluate($inside,$safeeval,$$parstack[-1]); |
|
if (!$Apache::lonxml::default_homework_loaded) { |
|
&Apache::lonxml::default_homework_load($safeeval); |
|
} |
|
@Apache::scripttag::parser_env = @_; |
|
$result=&Apache::run::run("return &chemparse(q\0$inside\0);",$safeeval); |
} |
} |
return $result; |
return $result; |
} |
} |
Line 447 sub start_chem {
|
Line 451 sub start_chem {
|
sub end_chem { |
sub end_chem { |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style) = @_; |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style) = @_; |
my $result = ''; |
my $result = ''; |
if ($target eq 'tex' || $target eq 'web') { |
|
@Apache::scripttag::parser_env = @_; |
|
if (!$Apache::lonxml::default_homework_loaded) { |
|
&Apache::lonxml::default_homework_load($safeeval); |
|
} |
|
my $innards=&Apache::lonxml::endredirection(); |
|
$result=&Apache::run::run("return &chemparse(q\0$innards\0);",$safeeval); |
|
} |
|
return $result; |
return $result; |
} |
} |
|
|