Diff for /loncom/xml/londefdef.pm between versions 1.456.2.5 and 1.462

version 1.456.2.5, 2020/09/10 00:33:39 version 1.462, 2016/08/13 19:39:40
Line 98  sub start_m { Line 98  sub start_m {
             # On top of that, MathJax will render math without $, but              # On top of that, MathJax will render math without $, but
             # it will fail with tth. This is worth a warning.              # it will fail with tth. This is worth a warning.
             # (even though some people might just use latex for printing)              # (even though some people might just use latex for printing)
             &Apache::lonxml::warning(&mt('Missing $ in [_1].','<m>'));              &Apache::lonxml::warning(&mt("Missing \$ in <m>."));
         }          }
  my $eval=&Apache::lonxml::get_param('eval',$parstack,$safeeval);   my $eval=&Apache::lonxml::get_param('eval',$parstack,$safeeval);
  if ($eval eq 'on') {   if ($eval eq 'on') {
Line 646  sub edit_controls { Line 646  sub edit_controls {
     }      }
     $result .= '      $result .= '
 <div><input type="submit" name="editmode" accesskey="e" value="'.&mt('Edit').'" />';  <div><input type="submit" name="editmode" accesskey="e" value="'.&mt('Edit').'" />';
       if ($env{'browser.type'} ne 'explorer' || $env{'browser.version'} > 9) {
           my $uri = $env{'request.uri'};
           my $daxeurl = '/daxepage'.$uri;
           $result .= '<input type="button" value="'.&mt('Edit with Daxe').'" '.
                     'onclick="window.open(\''.$daxeurl.'\',\'_blank\');" />';
       }
     if (($env{'request.course.id'}) && ($env{'form.forceedit'})) {      if (($env{'request.course.id'}) && ($env{'form.forceedit'})) {
         my $url=&Apache::lonnet::hreflocation('',$env{'request.filename'});          my $url=&Apache::lonnet::hreflocation('',$env{'request.filename'});
         if ($url =~ /\.html?$/i) {          if ($url =~ /\.html?$/i) {
Line 820  sub end_h1 { Line 826  sub end_h1 {
  $currentstring .= $token->[2];   $currentstring .= $token->[2];
     } elsif ($target eq 'tex') {      } elsif ($target eq 'tex') {
  my $post='\vskip 0 mm ';   my $post='\vskip 0 mm ';
  my $align=lc(&Apache::lonxml::get_param('align',$parstack,$safeeval,undef,1));   my $align=&Apache::lonxml::get_param('align',$parstack,$safeeval,undef,1);
  if ($align eq 'center') {   if ($align eq 'center') {
     $post='\end{center}';      $post='\end{center}';
  } elsif ($align eq 'left') {   } elsif ($align eq 'left') {
Line 2866  sub start_img { Line 2872  sub start_img {
         my $only = join(',',&Apache::loncommon::filecategorytypes('Pictures'));          my $only = join(',',&Apache::loncommon::filecategorytypes('Pictures'));
  $currentstring .=&Apache::edit::tag_start($target,$token);   $currentstring .=&Apache::edit::tag_start($target,$token);
  $currentstring .=&Apache::edit::text_arg('Image Url:','src',$token,70).   $currentstring .=&Apache::edit::text_arg('Image Url:','src',$token,70).
     &Apache::edit::browse('src',undef,'alt',$only).' '.                           &Apache::edit::browse_or_search('src',undef,'alt',$only,undef,1).
     &Apache::edit::search('src',undef,'alt').'<br />';                           '<br />';
  $currentstring .=&Apache::edit::text_arg('Description:','alt',$token,70).'<br />';   $currentstring .=&Apache::edit::text_arg('Description:','alt',$token,70).'<br />';
  $currentstring .=&Apache::edit::text_arg('width (pixel):','width',$token,5);   $currentstring .=&Apache::edit::text_arg('width (pixel):','width',$token,5);
  $currentstring .=&Apache::edit::text_arg('height (pixel):','height',$token,5).'<br />';   $currentstring .=&Apache::edit::text_arg('height (pixel):','height',$token,5).'<br />';
Line 2889  sub start_img { Line 2895  sub start_img {
  my $src=    &Apache::lonxml::get_param('src',$parstack,$safeeval);   my $src=    &Apache::lonxml::get_param('src',$parstack,$safeeval);
  my $width=  &Apache::lonxml::get_param('width',$parstack,$safeeval);   my $width=  &Apache::lonxml::get_param('width',$parstack,$safeeval);
  my $height= &Apache::lonxml::get_param('height',$parstack,$safeeval);   my $height= &Apache::lonxml::get_param('height',$parstack,$safeeval);
           my $element = &Apache::edit::get_element('src'); 
           my $text;
         if ($token->[2]{'src'}=~/\$/) {          if ($token->[2]{'src'}=~/\$/) {
            $currentstring.=&mt('Variable image source');             $text = &mt('Variable image source');
         } elsif ($token->[2]{'src'}=~/\S/) {          } elsif ($token->[2]{'src'}=~/\S/) {
    $currentstring .= '<img src="'.$src.'" alt="'.$alt.'" ';     $currentstring .= '<img src="'.$src.'" alt="'.$alt.'" ';
    if ($width) { $currentstring.=' width="'.$width.'" '; }     if ($width) { $currentstring.=' width="'.$width.'" '; }
    if ($height) { $currentstring.=' height="'.$height.'" '; }     if ($height) { $currentstring.=' height="'.$height.'" '; }
    $currentstring .= ' />';     $currentstring .= ' id="previewimg_'.$element.'" />';
         } else {          } else {
            $currentstring.=&mt("No image source specified");             $text = &mt("No image source specified");
         }          }
           $currentstring .= ' <span id="showimg_'.$element.'">'.$text.'</span>';
     } elsif ($target eq 'modified') {      } elsif ($target eq 'modified') {
  my ($osrc,$owidth,$oheight)=   my ($osrc,$owidth,$oheight)=
     ($token->[2]{'src'},$token->[2]{'width'},$token->[2]{'height'});      ($token->[2]{'src'},$token->[2]{'width'},$token->[2]{'height'});

Removed from v.1.456.2.5  
changed lines
  Added in v.1.462


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