Diff for /loncom/interface/lonmenu.pm between versions 1.65 and 1.68

version 1.65, 2003/04/18 17:51:32 version 1.68, 2003/05/23 21:47:27
Line 164  sub registerurl { Line 164  sub registerurl {
     my $forcereg=shift;      my $forcereg=shift;
     my $target = shift;      my $target = shift;
     my $result = '';      my $result = '';
       
       my $force_title='';
       if ($ENV{'request.state'} eq 'construct') {
    $force_title=&Apache::lonxml::display_title();
       }
     if ($target eq 'edit') {      if ($target eq 'edit') {
         $result .="<script type=\"text/javascript\">\n".          $result .="<script type=\"text/javascript\">\n".
             "if (typeof swmenu != 'undefined') {swmenu.currentURL=null;}\n".              "if (typeof swmenu != 'undefined') {swmenu.currentURL=null;}\n".
Line 176  sub registerurl { Line 180  sub registerurl {
         ((($ENV{'request.publicaccess'}) ||           ((($ENV{'request.publicaccess'}) || 
          (!&Apache::lonnet::is_on_map($ENV{'REQUEST_URI'}))) &&           (!&Apache::lonnet::is_on_map($ENV{'REQUEST_URI'}))) &&
         (!$forcereg))) {          (!$forcereg))) {
  return $result.          my $loadfunction='';
          '<script type="text/javascript">function LONCAPAreg(){;} function LONCAPAstale(){}</script>';          my $unloadfunction='';
           unless (1 || ($ENV{'browser.interface'} eq 'textual') ||
                   ($ENV{'environment.remote'} eq 'off') ||
                   ($ENV{'request.publicaccess'})) {
       my $reopen=&Apache::lonmenu::reopenmenu();
       $loadfunction='swmenu='.$reopen.'swmenu.noclient=0;';
       $unloadfunction='swmenu='.$reopen.'swmenu.noclient=1;';
   
           } 
    return $result.(<<ENDFUNCTIONS);
   <script type="text/javascript">
   function LONCAPAreg() {
      $loadfunction
   } 
   
   function LONCAPAstale() {
      $unloadfunction
   }
   </script>
   $force_title
   ENDFUNCTIONS
     }      }
 # Graphical display after login only  # Graphical display after login only
     if ($Apache::lonxml::registered && !$forcereg) { return ''; }      if ($Apache::lonxml::registered && !$forcereg) { return ''; }
     $result.=&innerregister($forcereg,$target);      $result.=&innerregister($forcereg,$target);
     return $result;      return $result.$force_title;
 }  }
   
 # =========== This gets called in order to register a URL, both with the Remote  # =========== This gets called in order to register a URL, both with the Remote
Line 367  var swmenu=null; Line 391  var swmenu=null;
   
     function LONCAPAreg() {      function LONCAPAreg() {
   swmenu=$reopen;    swmenu=$reopen;
             swmenu.noclient=0;
           swmenu.clearTimeout(swmenu.menucltim);            swmenu.clearTimeout(swmenu.menucltim);
           $timesync            $timesync
           $newmail            $newmail
Line 394  var swmenu=null; Line 419  var swmenu=null;
  'clearbut(2,1);clearbut(2,3);clearbut(8,1);clearbut(8,2);clearbut(8,3);'+   'clearbut(2,1);clearbut(2,3);clearbut(8,1);clearbut(8,2);clearbut(8,3);'+
  'clearbut(9,1);clearbut(9,2);clearbut(9,3);clearbut(6,3);clearbut(6,1)',   'clearbut(9,1);clearbut(9,2);clearbut(9,3);clearbut(6,3);clearbut(6,1)',
   2000);    2000);
             swmenu.noclient=1;
       }        }
   
 // END LON-CAPA Internal  // END LON-CAPA Internal
Line 418  var swmenu=null; Line 443  var swmenu=null;
   
     function LONCAPAreg() {      function LONCAPAreg() {
   swmenu=$reopen    swmenu=$reopen
     swmenu.noclient=0;
           $timesync            $timesync
           swmenu.currentStale=1;            swmenu.currentStale=1;
           swmenu.clearbut(2,1);            swmenu.clearbut(2,1);
Line 434  var swmenu=null; Line 460  var swmenu=null;
     }      }
   
     function LONCAPAstale() {      function LONCAPAstale() {
      swmenu=$reopen
     swmenu.noclient=1;  
     }      }
   
 // END LON-CAPA Internal  // END LON-CAPA Internal

Removed from v.1.65  
changed lines
  Added in v.1.68


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