Diff for /loncom/xml/lonplot.pm between versions 1.21 and 1.22

version 1.21, 2001/12/28 15:49:38 version 1.22, 2001/12/28 19:04:56
Line 26 Line 26
 # http://www.lon-capa.org/  # http://www.lon-capa.org/
 #  #
 # 12/15/01 Matthew  # 12/15/01 Matthew
 # 12/17 12/18 12/19 12/20 12/21 12/27 Matthew  # 12/17 12/18 12/19 12/20 12/21 12/27 12/28 Matthew
 package Apache::lonplot;  package Apache::lonplot;
   
 use strict;  use strict;
Line 363  sub start_title { Line 363  sub start_title {
     if ($target eq 'web') {      if ($target eq 'web') {
  $title = &Apache::lonxml::get_all_text("/title",$$parser[-1]);   $title = &Apache::lonxml::get_all_text("/title",$$parser[-1]);
     } elsif ($target eq 'edit') {      } elsif ($target eq 'edit') {
    $result.=&Apache::edit::tag_start($target,$token);
    my $text=&Apache::lonxml::get_all_text("/title",$$parser[-1]);
    $result.='</td></tr><tr><td colspan="3">'.
       &Apache::edit::editfield('',$text,'',20,1).
       &Apache::edit::end_table();
     } elsif ($target eq 'modified') {      } elsif ($target eq 'modified') {
  my $text=$$parser[-1]->get_text("/function");   my $text=$$parser[-1]->get_text("/function");
  $result.=&Apache::edit::modifiedfield($token);   $result.=&Apache::edit::modifiedfield($token);
Line 375  sub end_title { Line 380  sub end_title {
     my $result = '';      my $result = '';
     if ($target eq 'web') {      if ($target eq 'web') {
     } elsif ($target eq 'edit') {      } elsif ($target eq 'edit') {
    $result.=&Apache::edit::tag_end($target,$token);
     }      }
     return $result;      return $result;
 }  }
Line 385  sub start_xlabel { Line 391  sub start_xlabel {
     if ($target eq 'web') {      if ($target eq 'web') {
  $xlabel = &Apache::lonxml::get_all_text("/xlabel",$$parser[-1]);   $xlabel = &Apache::lonxml::get_all_text("/xlabel",$$parser[-1]);
     } elsif ($target eq 'edit') {      } elsif ($target eq 'edit') {
    $result.=&Apache::edit::tag_start($target,$token);
    my $text=&Apache::lonxml::get_all_text("/xlabel",$$parser[-1]);
    $result.='</td></tr><tr><td colspan="3">'.
       &Apache::edit::editfield('',$text,'',20,1).
       &Apache::edit::end_table();
     } elsif ($target eq 'modified') {      } elsif ($target eq 'modified') {
  my $text=$$parser[-1]->get_text("/function");   my $text=$$parser[-1]->get_text("/function");
  $result.=&Apache::edit::modifiedfield($token);   $result.=&Apache::edit::modifiedfield($token);
Line 397  sub end_xlabel { Line 408  sub end_xlabel {
     my $result = '';      my $result = '';
     if ($target eq 'web') {      if ($target eq 'web') {
     } elsif ($target eq 'edit') {      } elsif ($target eq 'edit') {
    $result.=&Apache::edit::tag_end($target,$token);
     }      }
     return $result;      return $result;
 }  }
Line 408  sub start_ylabel { Line 420  sub start_ylabel {
     if ($target eq 'web') {      if ($target eq 'web') {
  $ylabel = &Apache::lonxml::get_all_text("/ylabel",$$parser[-1]);   $ylabel = &Apache::lonxml::get_all_text("/ylabel",$$parser[-1]);
     } elsif ($target eq 'edit') {      } elsif ($target eq 'edit') {
    $result .= &Apache::edit::tag_start($target,$token);
    my $text = &Apache::lonxml::get_all_text("/ylabel",$$parser[-1]);
    $result .= '</td></tr><tr><td colspan="3">'.
       &Apache::edit::editfield('',$text,'',20,1).
       &Apache::edit::end_table();
     } elsif ($target eq 'modified') {      } elsif ($target eq 'modified') {
  my $text=$$parser[-1]->get_text("/function");   my $text=$$parser[-1]->get_text("/function");
  $result.=&Apache::edit::modifiedfield($token);   $result.=&Apache::edit::modifiedfield($token);
Line 420  sub end_ylabel { Line 437  sub end_ylabel {
     my $result = '';      my $result = '';
     if ($target eq 'web') {      if ($target eq 'web') {
     } elsif ($target eq 'edit') {      } elsif ($target eq 'edit') {
    $result.=&Apache::edit::tag_end($target,$token);
     }      }
     return $result;      return $result;
 }  }
Line 441  sub start_label { Line 459  sub start_label {
     } elsif ($target eq 'edit') {      } elsif ($target eq 'edit') {
  $result .= &Apache::edit::tag_start($target,$token);   $result .= &Apache::edit::tag_start($target,$token);
  $result .= &edit_attributes($target,$token,\%label_defaults);   $result .= &edit_attributes($target,$token,\%label_defaults);
    my $text = &Apache::lonxml::get_all_text("/label",$$parser[-1]);
    $result .= '</td></tr><tr><td colspan="3">'.
       &Apache::edit::editfield('',$text,'',20,1).
       &Apache::edit::end_table();
     } elsif ($target eq 'modified') {      } elsif ($target eq 'modified') {
  my $constructtag=&Apache::edit::get_new_args   my $constructtag=&Apache::edit::get_new_args
     ($token,$parstack,$safeeval,keys %label_defaults);      ($token,$parstack,$safeeval,keys %label_defaults);
Line 448  sub start_label { Line 470  sub start_label {
     $result = &Apache::edit::rebuild_tag($token);      $result = &Apache::edit::rebuild_tag($token);
     $result.= &Apache::edit::handle_insert();      $result.= &Apache::edit::handle_insert();
  }   }
  my $text=$$parser[-1]->get_text("/function");   my $text=$$parser[-1]->get_text("/label");
  $result.=&Apache::edit::modifiedfield($token);   $result.=&Apache::edit::modifiedfield($token);
     }      }
     return $result;      return $result;
Line 513  sub start_function { Line 535  sub start_function {
  $curves[-1]->{'function'} =    $curves[-1]->{'function'} = 
     &Apache::lonxml::get_all_text("/function",$$parser[-1]);      &Apache::lonxml::get_all_text("/function",$$parser[-1]);
     } elsif ($target eq 'edit') {      } elsif ($target eq 'edit') {
  $result.=&Apache::edit::tag_start($target,$token);   $result .= &Apache::edit::tag_start($target,$token);
  my $text=&Apache::lonxml::get_all_text("/function",$$parser[-1]);   my $text = &Apache::lonxml::get_all_text("/function",$$parser[-1]);
  $result.='</td></tr><tr><td colspan="3">'.   $result .= '</td></tr><tr><td colspan="3">'.
     &Apache::edit::editfield('',$text,'',20,1).      &Apache::edit::editfield('',$text,'',20,1).
     &Apache::edit::end_table();      &Apache::edit::end_table();
   
     } elsif ($target eq 'modified') {      } elsif ($target eq 'modified') {
  # Why do I do this?   # Why do I do this?
  my $text=$$parser[-1]->get_text("/function");   my $text=$$parser[-1]->get_text("/function");
Line 575  sub start_data { Line 598  sub start_data {
  }   }
  push  @{$curves[-1]->{'data'}},\@data;   push  @{$curves[-1]->{'data'}},\@data;
     } elsif ($target eq 'edit') {      } elsif ($target eq 'edit') {
    $result .= &Apache::edit::tag_start($target,$token);
    my $text = &Apache::lonxml::get_all_text("/data",$$parser[-1]);
    $result .= '</td></tr><tr><td colspan="3">'.
       &Apache::edit::editfield('',$text,'',20,1).
       &Apache::edit::end_table();
     } elsif ($target eq 'modified') {      } elsif ($target eq 'modified') {
  my $text=$$parser[-1]->get_text("/data");   my $text=$$parser[-1]->get_text("/data");
  $result.=&Apache::edit::modifiedfield($token);   $result.=&Apache::edit::modifiedfield($token);

Removed from v.1.21  
changed lines
  Added in v.1.22


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