version 1.39, 2004/09/27 20:59:21
|
version 1.40, 2004/09/28 20:32:00
|
Line 121 $molecule
|
Line 121 $molecule
|
CHEMPAGE |
CHEMPAGE |
$body=&HTML::Entities::encode($body,'<>&"'); |
$body=&HTML::Entities::encode($body,'<>&"'); |
$body=~s/\n/ /g; |
$body=~s/\n/ /g; |
my $nothing= &Apache::lonhtmlcommon::javascript_nothing(); |
|
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.document.open($nothing,'replace');editor.document.writeln('$body')" /> |
<input type="button" value="Draw Molecule" onClick="javascript:editor=window.open('','','width=500,height=500,scrollbars=no,resizable=yes');editor.document.open('text/html','replace');editor.document.writeln('$body')" /> |
CHEMINPUT |
CHEMINPUT |
return $result; |
return $result; |
} |
} |
Line 309 sub edit_reaction_button {
|
Line 308 sub edit_reaction_button {
|
my $id_es=&Apache::lonnet::escape($id); |
my $id_es=&Apache::lonnet::escape($id); |
my $field_es=&Apache::lonnet::escape($field); |
my $field_es=&Apache::lonnet::escape($field); |
my $reaction_es=&Apache::lonnet::escape($reaction); |
my $reaction_es=&Apache::lonnet::escape($reaction); |
my $nothing= &Apache::lonhtmlcommon::javascript_nothing(); |
|
my $result=<<EDITREACTION; |
my $result=<<EDITREACTION; |
<script type="text/javascript"> |
<script type="text/javascript"> |
function create_reaction_window_${id}_${field} () { |
function create_reaction_window_${id}_${field} () { |
editor=window.open('','','width=500,height=270,scrollbars=no,resizable=yes'); |
editor=window.open('','','width=500,height=270,scrollbars=no,resizable=yes'); |
editor.document.open($nothing,'replace'); |
editor.document.open('text/html','replace'); |
editor.document.writeln('<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"><html> <head><title>LON-CAPA Reaction Editor</title></head><frameset rows="30%,*" border="0"> <frame src="/res/adm/pages/reactionresponse/reaction_viewer.html?inhibitmenu=yes" name="viewer" scrolling="no" /> <frame src="/res/adm/pages/reactionresponse/reaction_editor.html?inhibitmenu=yes&reaction=$reaction_es&id=$id_es&field=$field_es" name="editor" scrolling="no" /> </frameset> </html>'); |
editor.document.writeln('<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"><html> <head><title>LON-CAPA Reaction Editor</title></head><frameset rows="30%,*" border="0"> <frame src="/res/adm/pages/reactionresponse/reaction_viewer.html?inhibitmenu=yes" name="viewer" scrolling="no" /> <frame src="/res/adm/pages/reactionresponse/reaction_editor.html?inhibitmenu=yes&reaction=$reaction_es&id=$id_es&field=$field_es" name="editor" scrolling="no" /> </frameset> </html>'); |
} |
} |
</script> |
</script> |