|
@@ -151,14 +304,21 @@ $js
$java_not_enabled
$molecule
-
-JME Editor courtesy of Peter Ertl, Novartis
+
+JME Editor courtesy of Peter Ertl, Novartis
+CHEMPAGE
+ }
+ $body .= <
$insert_answer
-
+
+
CHEMPAGE
@@ -169,25 +329,28 @@ CHEMPAGE
my $display=&mt('Draw Molecule');
if (defined($shown_text)) { $display=&mt($shown_text); }
my $iconpath=$Apache::lonnet::perlvar{'lonIconsURL'};
- my $function =
+ my $function =
'LONCAPA_draw_molecule_'.&get_uniq_name();
my $result=<
function $function() {
editor=window.open($nothing,'jmeedit','width=500,height=500,menubar=no,scrollbars=no,resizable=yes');
- editor.$docopen;
- editor.document.write('$start_page $body $end_page');
- editor.document.close();
- editor.focus();
+ if (editor) {
+ editor.$docopen;
+ editor.document.write('$start_page $body $resizejs $end_page');
+ editor.document.close();
+ editor.focus();
+ }
}
CHEMINPUT
+ my $jscall = "javascript:$function();void(0);";
if ($shown_text eq '') {
- $result .=<
+ $result .=<
PENCIL
} else {
- $result .= '';
+ $result .= '';
}
return $result;
}
|