version 1.101, 2021/12/24 11:07:42
|
version 1.103, 2025/01/27 18:43:23
|
Line 217 function submitSmiles() {
|
Line 217 function submitSmiles() {
|
} |
} |
} |
} |
function openHelpWindow() { |
function openHelpWindow() { |
window.open("http://peter-ertl.com/jsme/2013_03/help.html","","scrollbars=yes,resizable=yes,width=500,height=600"); |
window.open("https://jsme-editor.github.io/help.html","","scrollbars=yes,resizable=yes,width=500,height=600"); |
} |
} |
|
|
</script> |
</script> |
Line 558 sub start_organicstructure {
|
Line 558 sub start_organicstructure {
|
my $width=&Apache::lonxml::get_param('width',$parstack,$safeeval); |
my $width=&Apache::lonxml::get_param('width',$parstack,$safeeval); |
my $molecule=&Apache::lonxml::get_param('molecule',$parstack,$safeeval); |
my $molecule=&Apache::lonxml::get_param('molecule',$parstack,$safeeval); |
my $options=&Apache::lonxml::get_param('options',$parstack,$safeeval); |
my $options=&Apache::lonxml::get_param('options',$parstack,$safeeval); |
|
my $alttext=&Apache::lonxml::get_param('alt',$parstack,$safeeval); |
|
if ($alttext eq '') { |
|
$alttext = &mt('Organic structure'); |
|
} |
|
$alttext = &HTML::Entities::encode($alttext,'<>&"'); |
my $id=&Apache::loncommon::get_cgi_id(); |
my $id=&Apache::loncommon::get_cgi_id(); |
$result="<img src='/cgi-bin/convertjme.pl?$id'"; |
$result="<img src='/cgi-bin/convertjme.pl?$id'"; |
if ($options =~ /border/) { $result.= ' border="1"'; } |
if ($options =~ /border/) { $result.= ' border="1"'; } |
$result.=' />'; |
$result.=' alt="'.$alttext.'" />'; |
&Apache::lonnet::appenv( |
&Apache::lonnet::appenv( |
{'cgi.'.$id.'.JME' => &escape($molecule), |
{'cgi.'.$id.'.JME' => &escape($molecule), |
'cgi.'.$id.'.PNG' => 1, |
'cgi.'.$id.'.PNG' => 1, |
Line 610 sub start_organicstructure {
|
Line 615 sub start_organicstructure {
|
[ ['reaction','Is a reaction'], |
[ ['reaction','Is a reaction'], |
['border','Draw a border'] ], |
['border','Draw a border'] ], |
$token); |
$token); |
|
$result .= '<br />'.&Apache::edit::text_arg('Alt text in JME img tag:','alt',$token,30). |
|
' ('.&mt('student-viewable in HTML source').')'; |
$result .=&Apache::edit::end_row(); |
$result .=&Apache::edit::end_row(); |
} elsif ($target eq 'modified') { |
} elsif ($target eq 'modified') { |
my $constructtag=&Apache::edit::get_new_args($token,$parstack, |
my $constructtag=&Apache::edit::get_new_args($token,$parstack, |
$safeeval,'molecule', |
$safeeval,'molecule', |
'width','texwidth', |
'width','texwidth', |
'options'); |
'options','alt'); |
if ($constructtag) { $result = &Apache::edit::rebuild_tag($token); } |
if ($constructtag) { $result = &Apache::edit::rebuild_tag($token); } |
} |
} |
return $result; |
return $result; |