Diff for /loncom/interface/lonhtmlcommon.pm between versions 1.130 and 1.133

version 1.130, 2006/05/30 12:46:09 version 1.133, 2006/06/14 18:34:46
Line 150  sub get_recent { Line 150  sub get_recent {
   
 # Create hash with key as time and recent as value  # Create hash with key as time and recent as value
     my %time_hash = ();      my %time_hash = ();
       my $nfrozen = 0;
     foreach (keys %recent) {      foreach (keys %recent) {
         my $thistime=(split(/\&/,$recent{$_}))[0];          my ($thistime,$thisvalue)=(split(/\&/,$recent{$_}));
           if (($thisvalue eq 'role_frozen') && ($area='roles')) {
               $thistime=time+$nfrozen;
               $nfrozen++;
           }
         $time_hash{$thistime} = $_;          $time_hash{$thistime} = $_;
     }      }
   
Line 160  sub get_recent { Line 165  sub get_recent {
     my $idx = 1;      my $idx = 1;
     foreach (reverse sort keys %time_hash) {      foreach (reverse sort keys %time_hash) {
        $return_hash{$time_hash{$_}} =         $return_hash{$time_hash{$_}} =
                   &unescape((split(/\&/,$recent{$_}))[1]);                    &unescape((split(/\&/,$recent{$time_hash{$_}}))[1]);
        if ($n && ($idx++ >= $n)) {last;}         if ($n && ($idx++ >= $n)) {last;}
     }      }
   
Line 820  sub Create_PrgWin { Line 825  sub Create_PrgWin {
          function openpopwin () {           function openpopwin () {
          popwin=open(\'\',\'popwin\',\'width=400,height=100\');".           popwin=open(\'\',\'popwin\',\'width=400,height=100\');".
         "popwin.document.writeln(\'".$start_page.          "popwin.document.writeln(\'".$start_page.
               "<h4>$heading</h4>".                "<h4>$heading<\/h4>".
               "<form name=popremain>".                "<form name=\"popremain\" method=\"post\">".
               '<input type="text" size="'.$width.'" name="remaining" value="'.                '<input type="text" size="'.$width.'" name="remaining" value="'.
       &mt('Starting').'"></form>'.$end_page.        &mt('Starting').'" /><\\/form>'.$end_page.
               "\');".                "\');".
         "popwin.document.close();}".          "popwin.document.close();}".
         "\nwindow.setTimeout(openpopwin,0)</script>");          "\nwindow.setTimeout(openpopwin,0)</script>");
Line 948  sub r_print { Line 953  sub r_print {
 # ------------------------------------------------------- Puts directory header  # ------------------------------------------------------- Puts directory header
   
 sub crumbs {  sub crumbs {
     my ($uri,$target,$prefix,$form,$size,$noformat)=@_;      my ($uri,$target,$prefix,$form,$size,$noformat,$skiplast)=@_;
     if (! defined($size)) {      if (! defined($size)) {
         $size = '+2';          $size = '+2';
     }      }
Line 964  sub crumbs { Line 969  sub crumbs {
  foreach my $dir (split('/',$uri)) {   foreach my $dir (split('/',$uri)) {
             if (! $dir) { next; }              if (! $dir) { next; }
             $path .= $dir;              $path .= $dir;
     unless ($path eq $uri) { $path.='/'; }      if ($path eq $uri) {
    if ($skiplast) {
       $output.=$dir;
                       last;
    } 
       } else {
    $path.='/'; 
       }
             my $linkpath = &Apache::loncommon::escape_single($path);              my $linkpath = &Apache::loncommon::escape_single($path);
             if ($form) {              if ($form) {
  $linkpath=   $linkpath=
Line 998  var checkwin; Line 1010  var checkwin;
   
 function spellcheckerwindow() {  function spellcheckerwindow() {
     checkwin=window.open($nothing,'spellcheckwin','height=320,width=280,resizable=yes,scrollbars=yes,location=no,menubar=no,toolbar=no');      checkwin=window.open($nothing,'spellcheckwin','height=320,width=280,resizable=yes,scrollbars=yes,location=no,menubar=no,toolbar=no');
     checkwin.document.writeln('$start_page<form name="spellcheckform" action="/adm/spellcheck" method="post"><input type="hidden" name="text" value="" /></form>$end_page');      checkwin.document.writeln('$start_page<form name="spellcheckform" action="/adm/spellcheck" method="post"><input type="hidden" name="text" value="" /><\\/form>$end_page');
     checkwin.document.close();      checkwin.document.close();
 }  }
 // END LON-CAPA Internal -->  // END LON-CAPA Internal -->

Removed from v.1.130  
changed lines
  Added in v.1.133


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