Diff for /loncom/xml/scripttag.pm between versions 1.134 and 1.135

version 1.134, 2005/12/15 19:00:36 version 1.135, 2006/03/23 23:47:56
Line 118  sub start_script { Line 118  sub start_script {
     $Apache::lonxml::evaluate--;      $Apache::lonxml::evaluate--;
     my (undef,undef,$udom,$uname)=&Apache::lonxml::whichuser();      my (undef,undef,$udom,$uname)=&Apache::lonxml::whichuser();
     my $windowopen=&Apache::lonhtmlcommon::javascript_docopen();      my $windowopen=&Apache::lonhtmlcommon::javascript_docopen();
       my $start_page =
    &Apache::loncommon::start_page('Script Vars', undef,
          {'only_body' => 1,
    'bgcolor'   => '#FFFFFF',
    'js_ready'  => 1,});
       my $end_page =
    &Apache::loncommon::end_page({'js_ready' => 1,});
   
     $result.="<script type=\"text/javascript\">      $result.="<script type=\"text/javascript\">
 // <![CDATA[  // <![CDATA[
     function LONCAPA_scriptvars_".$uname."_".$udom."_"."$Apache::lonxml::curdepth() {newWindow=open('','new_W','width=500,height=500,scrollbars=1,resizable=yes');newWindow.$windowopen;newWindow.document.writeln('<html><head><title>Script Vars</title></head><body bgcolor=\"#FFFFFF\"><pre>";      function LONCAPA_scriptvars_".$uname."_".$udom."_"."$Apache::lonxml::curdepth() {newWindow=open('','new_W','width=500,height=500,scrollbars=1,resizable=yes');newWindow.$windowopen;newWindow.document.writeln('$start_page<pre>";
     my $listing=&Apache::run::dump($target,$safeeval);      my $listing=&Apache::run::dump($target,$safeeval);
     $listing=~s/\\/\\\\/g;      $listing=~s/\\/\\\\/g;
     $listing=~s/\'/\\\'/g;      $listing=~s/\'/\\\'/g;
     $result.=$listing;      $result.=$listing;
     $result.= "</pre></body></html>');newWindow.document.close();newWindow.focus()}      $result.= "</pre>$end_page');newWindow.document.close();newWindow.focus()}
 // ]]>  // ]]>
 </script><a href=\"javascript:LONCAPA_scriptvars_".$uname."_".$udom."_$Apache::lonxml::curdepth();void(0);\">Script Vars</a><br />";  </script><a href=\"javascript:LONCAPA_scriptvars_".$uname."_".$udom."_$Apache::lonxml::curdepth();void(0);\">Script Vars</a><br />";
  }   }
Line 334  sub end_window { Line 342  sub end_window {
     if (!$width) { $width='500'; }      if (!$width) { $width='500'; }
     my $height= &Apache::lonxml::get_param('height',$parstack,$safeeval);      my $height= &Apache::lonxml::get_param('height',$parstack,$safeeval);
     if (!$height) { $height='200'; }      if (!$height) { $height='200'; }
     $result = "<script type=\"text/javascript\"> function LONCAPA_newwindow_$Apache::lonxml::curdepth() {newWindow=open('','new_W','width=$width,height=$height,scrollbars=1');newWindow.document.open('text/html','replace');newWindow.document.writeln('<html><head><title>newwindow</title></head><body bgcolor=\"#FFFFFF\"> $output </body></html>');newWindow.document.close();}</script><a href=\"javascript:LONCAPA_newwindow_$Apache::lonxml::curdepth();void(0);\">$linktext</a>";  
       my $start_page =
    &Apache::loncommon::start_page($linktext, undef,
          {'only_body' => 1,
    'bgcolor'   => '#FFFFFF',
    'js_ready'  => 1,});
       my $end_page =
    &Apache::loncommon::end_page({'js_ready' => 1,});
       $result = "<script type=\"text/javascript\"> function LONCAPA_newwindow_$Apache::lonxml::curdepth() {newWindow=open('','new_W','width=$width,height=$height,scrollbars=1');newWindow.document.open('text/html','replace');newWindow.document.writeln('$start_page $output $end_page');newWindow.document.close();}</script><a href=\"javascript:LONCAPA_newwindow_$Apache::lonxml::curdepth();void(0);\">$linktext</a>";
   } elsif ($target eq 'tex') {    } elsif ($target eq 'tex') {
       $result = '}';        $result = '}';
   } else {    } else {
Line 350  sub start_import { Line 366  sub start_import {
   
   $bodytext=Apache::run::evaluate($bodytext,$safeeval,$$parstack[$#$parstack]);    $bodytext=Apache::run::evaluate($bodytext,$safeeval,$$parstack[$#$parstack]);
   
   if ($target eq 'web' || $target eq 'grade' || $target eq 'answer' ||    if ($target eq 'web' ||  $target eq 'webgrade' || $target eq 'grade' 
       $target eq 'tex' || $target eq 'analyze' ) {        || $target eq 'answer' || $target eq 'tex' || $target eq 'analyze' ) {
     # FIXME this probably needs to be smart about construction vs.      # FIXME this probably needs to be smart about construction vs.
     # non construction space.      # non construction space.
     my $location=&Apache::lonnet::filelocation($Apache::lonxml::pwd['-1'],$bodytext);      my $location=&Apache::lonnet::filelocation($Apache::lonxml::pwd['-1'],$bodytext);

Removed from v.1.134  
changed lines
  Added in v.1.135


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>