--- loncom/xml/scripttag.pm 2001/01/10 14:12:03 1.30 +++ loncom/xml/scripttag.pm 2001/02/19 20:43:00 1.33 @@ -10,8 +10,7 @@ use Apache::lonnet; sub BEGIN { &Apache::lonxml::register('Apache::scripttag',('script','scriptlib', 'parserlib','import', - 'window','meta')); - 'footnote','display')); + 'window','display')); } sub start_script { @@ -29,7 +28,7 @@ sub start_script { &Apache::run::run($bodytext,$safeeval); } elsif ($target eq "edit" ) { &Apache::run::run($bodytext,$safeeval); - $result="
<$token->[1]> output:
$bodytext
Source:
"; + $result="
<$token->[1]> output:
$bodytext
Source:
"; $result.=&editfield($token->[1],$bodytext); } } else { @@ -67,7 +66,7 @@ sub start_display { } if ($target eq "edit" ) { $result = - "
<$token->[1]> output:
$bodytext
Source:
"; + "
<$token->[1]> output:
$bodytext
Source:
"; $result.=&editfield($token->[1],$bodytext); } return $result; @@ -91,7 +90,7 @@ sub start_scriptlib { return ""; } &Apache::run::run($script,$safeeval); - #&Apache::lonxml::debug("ran $bodytext:
".&Apache::lonnet::getfile($bodytext)."
"); + #&Apache::lonxml::debug("ran $bodytext:
".&Apache::lonnet::getfile($bodytext)."
"); if ($target eq "edit" ) { $result.=&editfield($token->[1],$bodytext); @@ -130,34 +129,29 @@ sub end_parserlib { sub start_window { my ($target,$token,$parstack,$parser,$safeeval,$style)=@_; my $result = ''; - if ($target eq 'web') { - $Apache::lonxml::redirection = 0; - } elsif ($target eq 'tex') { - $result = '\footnote{'; - } + if ($target eq 'web') { + $Apache::lonxml::redirection = 0; + } return $result; } sub end_window { my ($target,$token,$parstack,$parser,$safeeval,$style)=@_; my $result; - if ($target eq 'web') { - $Apache::lonxml::outputstack =~ s/\"/\"\;/g; - $result = "newwindow $Apache::lonxml::outputstack \');newWindow.document.close();void(0);\">*"; - $Apache::lonxml::outputstack = ""; - $Apache::lonxml::redirection = 1; - } elsif ($target eq 'tex') { - $result = '}'; + if ($target eq 'web') { + $Apache::lonxml::outputstack =~ s/\"/\"\;/g; + $result = "newwindow $Apache::lonxml::outputstack \');newWindow.document.close();void(0);\">*"; + $Apache::lonxml::outputstack = ""; + $Apache::lonxml::redirection = 1; } else { - $result = ''; + $result = ''; } return $result; } sub start_import { my ($target,$token,$parstack,$parser,$safeeval,$style)=@_; - my $bodytext=&Apache::lonxml::get_all_text("/import",$$parser[$#$parser]); -# my $bodytext=$$parser[$#$parser]->get_text("/import"); + my $bodytext=$$parser[$#$parser]->get_text("/import"); my $result =""; $bodytext=Apache::run::evaluate($bodytext,$safeeval,$$parstack[$#$parstack]); @@ -175,7 +169,7 @@ sub start_import { if ($target eq "edit" ) { $result.=&editfield($token->[1],$bodytext); - $result.="Clickhere to edit

" + $result.="Clickhere to edit
" } return ''; } @@ -198,12 +192,6 @@ sub start_meta { sub end_meta { } - - - - - - sub editfield { my ($tag,$data)=@_; @@ -213,7 +201,7 @@ sub editfield { if (length($_) > $maxlength) { $maxlength = length ($_); } } split ("\n", $data); - return "

\n<$tag>

\n   

\n</$tag>

\n"; + return "
\n<$tag>
\n   
\n</$tag>
\n"; } sub getfilenothere {