Diff for /loncom/interface/lonmenu.pm between versions 1.49 and 1.53

version 1.49, 2003/04/03 00:52:21 version 1.53, 2003/04/03 20:25:08
Line 73  ENDMAINMENU Line 73  ENDMAINMENU
 </script>  </script>
 <a href="/adm/menu" target="_top">Main Menu</a>  <a href="/adm/menu" target="_top">Main Menu</a>
 <a href="/adm/remote?action=launch" target="_top">Launch Remote Control</a>  <a href="/adm/remote?action=launch" target="_top">Launch Remote Control</a>
   <br />
 <script>  <script>
 // END LON-CAPA Internal  // END LON-CAPA Internal
 </script>  </script>
Line 98  sub registerurl { Line 99  sub registerurl {
                 "\n</script>\n";                  "\n</script>\n";
     }      }
     if (($ENV{'browser.interface'} eq 'textual') ||      if (($ENV{'browser.interface'} eq 'textual') ||
           ($ENV{'environment.remote'} eq 'off') ||
         ((($ENV{'request.publicaccess'}) ||           ((($ENV{'request.publicaccess'}) || 
          (!&Apache::lonnet::is_on_map($ENV{'REQUEST_URI'}))) &&           (!&Apache::lonnet::is_on_map($ENV{'REQUEST_URI'}))) &&
         (!$forcereg))) {          (!$forcereg))) {
Line 364  sub startupremote { Line 366  sub startupremote {
 # The Remote actually gets launched!  # The Remote actually gets launched!
 #  #
     my $configmenu=&rawconfig();      my $configmenu=&rawconfig();
       my $esclowerurl=&Apache::lonnet::escape($lowerurl);
   
     return(<<ENDREMOTESTARTUP);      return(<<ENDREMOTESTARTUP);
 <script>  <script>
   
Line 393  function wait() { Line 397  function wait() {
          $configmenu           $configmenu
          window.location='$lowerurl';             window.location='$lowerurl';  
       } else {        } else {
          alert("Remote Control timed out. It is possible that it was blocked by pop-up window filters.");    window.location='/adm/remote?action=collapse&url=$esclowerurl';
       }        }
    } else {     } else {
       wheelswitch();        wheelswitch();
Line 402  function wait() { Line 406  function wait() {
 }  }
   
 function main() {  function main() {
    canceltim=setTimeout('tim=1;',60000);     canceltim=setTimeout('tim=1;',30000);
    window.status='-';     window.status='-';
    wait();     wait();
 }  }
Line 484  sub switch { Line 488  sub switch {
     $act=~s/\$udom/$udom/g;      $act=~s/\$udom/$udom/g;
     unless (($ENV{'browser.interface'} eq 'textual')  ||      unless (($ENV{'browser.interface'} eq 'textual')  ||
             ($ENV{'environment.remote'} eq 'off')) {              ($ENV{'environment.remote'} eq 'off')) {
   # Remote
        return "\n".         return "\n".
  qq(window.status+='.';swmenu.switchbutton($row,$col,"$img","$top","$bot","$act","$desc"););   qq(window.status+='.';swmenu.switchbutton($row,$col,"$img","$top","$bot","$act","$desc"););
      } elsif ($ENV{'browser.interface'} eq 'textual') {
   # Accessibility
          if ($nobreak==2) { return ''; }
          my $text=$top.' '.$bot;
          $text=~s/\- //;
          return "\n".($nobreak?' ':'<br />').
           '<a href="javascript:'.$act.';" target="_top">'.$text.'</a> '.
           ($nobreak?'':$desc);
    } else {     } else {
   # Inline Remote
        if ($nobreak==2) { return ''; }         if ($nobreak==2) { return ''; }
        my $text=$top.' '.$bot;         my $text=$top.' '.$bot;
        $text=~s/\- //;         $text=~s/\- //;
Line 630  sub footer { Line 644  sub footer {
 }  }
   
 sub utilityfunctions {  sub utilityfunctions {
     unless ($ENV{'browser.interface'} eq 'textual') { return ''; }      unless (($ENV{'browser.interface'} eq 'textual')  ||
           ($ENV{'environment.remote'} eq 'off')) { return ''; }
     my $currenturl=$ENV{'REQUEST_URI'};      my $currenturl=$ENV{'REQUEST_URI'};
     my $currentsymb=$ENV{'request.symb'};      my $currentsymb=$ENV{'request.symb'};
 return (<<ENDUTILITY)  return (<<ENDUTILITY)
Line 691  sub handler { Line 706  sub handler {
     $r->send_http_header;      $r->send_http_header;
     return OK if $r->header_only;      return OK if $r->header_only;
   
     my $utility=&utilityfunctions();  
     my $form=&serverform();      my $form=&serverform();
     my $bodytag=&Apache::loncommon::bodytag('Main Menu');      my $bodytag=&Apache::loncommon::bodytag('Main Menu');
 # ------------------------------------------------------------ Print the screen  # ---- Print the screen, pretent to be in text mode to generate text-based menu
       unless ($ENV{'brower.interface'} eq 'textual') {
    $ENV{'environment.remote'}='off';
       }
       my $utility=&utilityfunctions();
     $r->print(<<ENDHEADER);      $r->print(<<ENDHEADER);
 <html><head>  <html><head>
 <title>LON-CAPA Main Menu</title>  <title>LON-CAPA Main Menu</title>

Removed from v.1.49  
changed lines
  Added in v.1.53


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