Diff for /loncom/interface/lonmenu.pm between versions 1.88 and 1.95

version 1.88, 2003/09/17 01:45:14 version 1.95, 2003/09/25 17:52:26
Line 145  ENDRELOAD Line 145  ENDRELOAD
         if ($registration) {          if ($registration) {
            $reg=&innerregister($forcereg,$target);             $reg=&innerregister($forcereg,$target);
         }          }
     my $trans=&Apache::lonlocal::endreroutetrans();  
  return (<<ENDINLINEMENU);   return (<<ENDINLINEMENU);
 <script>  <script>
 // BEGIN LON-CAPA Internal  // BEGIN LON-CAPA Internal
Line 165  $navmaps Line 164  $navmaps
 <b>LON-CAPA</b></td>  <b>LON-CAPA</b></td>
 </tr>  </tr>
 </table>  </table>
 $trans  
 <script>  <script>
 // END LON-CAPA Internal  // END LON-CAPA Internal
 </script>  </script>
Line 179  ENDINLINEMENU Line 177  ENDINLINEMENU
 # ====================================== This gets called in the header section  # ====================================== This gets called in the header section
   
 sub registerurl {  sub registerurl {
       &Apache::lonlocal::reroutetrans();
     my $forcereg=shift;      my $forcereg=shift;
     my $target = shift;      my $target = shift;
     my $result = '';      my $result = '';
Line 212  sub registerurl { Line 211  sub registerurl {
 # =========== and in the body of the document  # =========== and in the body of the document
   
 sub innerregister {  sub innerregister {
       &Apache::lonlocal::reroutetrans();
     my $forcereg=shift;      my $forcereg=shift;
     my $target = shift;      my $target = shift;
     my $result = '';      my $result = '';
Line 641  sub switch { Line 641  sub switch {
        if ($nobreak==2) { return ''; }         if ($nobreak==2) { return ''; }
        my $text=$top.' '.$bot;         my $text=$top.' '.$bot;
        $text=~s/\s*\-\s*//gs;         $text=~s/\s*\-\s*//gs;
        $inlineremote[10*$row+$col]="\n".($nobreak?' ':'<br />').         if ($nobreak) {
         '<a href="javascript:'.$act.';">'.$text.'</a> '.     $inlineremote[10*$row+$col]=
         ($nobreak?'':$desc);         '<a href="javascript:'.$act.';">'.$text.'</a>';
          } else {
      $inlineremote[10*$row+$col]="\n<br />".
          '<a href="javascript:'.$act.';">'.$desc.'</a>';
          }
    } else {     } else {
 # Inline Remote  # Inline Remote
        if ($nobreak==2) { return ''; }         if ($nobreak==2) { return ''; }
        my $text=$top.' '.$bot;         my $text=$top.' '.$bot;
        $text=~s/\s*\-\s*//gs;         $text=~s/\s*\-\s*//gs;
        $inlineremote[10*$row+$col]="\n".         if ($nobreak==3) {
          ($nobreak==3?'<td width="50%" colspan="2" align="right"':'<tr><td').     $inlineremote[10*$row+$col]="\n".
          ' bgcolor="'.$tabbg.'"'.($nobreak==1?' width="50%" colspan="2"':'').       '<td width="50%" colspan="2" align="right" bgcolor="'.$tabbg.'">'.
      '"><a href="javascript:'.$act.';"><font color="'.$font.'"'.       '<a href="javascript:'.$act.';"><font color="'.$font.'" size="+1">'.$text.
           ($nobreak?' size="+1"':'').       '</font></a></td></tr>';
      '>'.$text.'</font></a></td>'.         } elsif ($nobreak) {
      ($nobreak?'':'<td colspan="3" width="80%"><font color="'.$font.'" size="-1">'.$desc.'</font>').($nobreak!=1?'</tr>':'');     $inlineremote[10*$row+$col]="\n<tr>".
        '<td width="50%" colspan="2" align="left" bgcolor="'.$tabbg.'">'.
        '<a href="javascript:'.$act.';"><font color="'.$font.'" size="+1">'.$text.
        '</font></a></td>';
          } else {
      $inlineremote[10*$row+$col]="\n<tr>".
        '<td width="50%" colspan="4" align="left" bgcolor="'.$tabbg.'">'.
        '<a href="javascript:'.$act.';"><font color="'.$font.'">'.$desc.
        '</font></a></td></tr>';       
          }
    }     }
     return '';      return '';
 }  }
Line 875  ENDSERVERFORM Line 888  ENDSERVERFORM
   
 sub handler {  sub handler {
     my $r = shift;      my $r = shift;
     $r->content_type('text/html');      &Apache::loncommon::content_type($r,'text/html');
     $r->send_http_header;      $r->send_http_header;
     return OK if $r->header_only;      return OK if $r->header_only;
   
       &Apache::lonlocal::clearreroutetrans();
   
     my $form=&serverform();      my $form=&serverform();
     my $bodytag=&Apache::loncommon::bodytag('Main Menu');      my $bodytag=&Apache::loncommon::bodytag('Main Menu');
     my $function='student';      my $function='student';
Line 911  $utility Line 926  $utility
 $bodytag  $bodytag
 ENDHEADER  ENDHEADER
     $r->print('<table>'.&inlinemenu().'</table>'.$form);      $r->print('<table>'.&inlinemenu().'</table>'.$form);
       $r->print(&Apache::lonlocal::endreroutetrans());
     $r->print('</body></html>');      $r->print('</body></html>');
     return OK;      return OK;
 }  }

Removed from v.1.88  
changed lines
  Added in v.1.95


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