Diff for /loncom/interface/loncommon.pm between versions 1.193 and 1.205.2.1

version 1.193, 2004/07/03 18:49:42 version 1.205.2.1, 2004/09/24 20:52:32
Line 250  of the element the selection from the se Line 250  of the element the selection from the se
 =cut  =cut
   
 sub browser_and_searcher_javascript {  sub browser_and_searcher_javascript {
       my ($mode)=@_;
       if (!defined($mode)) { $mode='edit'; }
     my $resurl=&lastresurl();      my $resurl=&lastresurl();
     return <<END;      return <<END;
     var editbrowser = null;      var editbrowser = null;
Line 259  sub browser_and_searcher_javascript { Line 261  sub browser_and_searcher_javascript {
             url += 'launch=1&';              url += 'launch=1&';
         }          }
         url += 'catalogmode=interactive&';          url += 'catalogmode=interactive&';
         url += 'mode=edit&';          url += 'mode=$mode&';
         url += 'form=' + formname + '&';          url += 'form=' + formname + '&';
         if (only != null) {          if (only != null) {
             url += 'only=' + only + '&';              url += 'only=' + only + '&';
Line 284  sub browser_and_searcher_javascript { Line 286  sub browser_and_searcher_javascript {
             url += 'launch=1&';              url += 'launch=1&';
         }          }
         url += 'catalogmode=interactive&';          url += 'catalogmode=interactive&';
         url += 'mode=edit&';          url += 'mode=$mode&';
         url += 'form=' + formname + '&';          url += 'form=' + formname + '&';
         if (titleelement != null) {          if (titleelement != null) {
             url += 'titleelement=' + titleelement + '&';              url += 'titleelement=' + titleelement + '&';
Line 648  sub help_open_menu { Line 650  sub help_open_menu {
     $width = 620 if (not defined $width);      $width = 620 if (not defined $width);
     $height = 600 if (not defined $height);      $height = 600 if (not defined $height);
     my $link='';      my $link='';
     my $title = &mt('Choose your help');      my $title = &mt('Get help');
     my $origurl = $ENV{'REQUEST_URI'};      my $origurl = $ENV{'REQUEST_URI'};
     my $timestamp = time;      my $timestamp = time;
     my %formhash = ();  
     if ($ENV{'request.course.fn'}) {  
         open(FILE,">$ENV{'request.course.fn'}.formdata");  
         &get_unprocessed_cgi($ENV{'QUERY_STRING'},undef);  
         foreach (keys %ENV) {  
             if ($_ =~ m/^form\.(.+)$/) {  
                 if (ref($ENV{$_}) eq 'ARRAY') {  
                     my $valstr = join(",",@{$ENV{$_}});  
                     print FILE "$1 = $valstr\n";  
                 } else {  
                     print FILE "$1 = $ENV{$_}\n";  
                 }  
             }  
         }  
         close(FILE);  
     }  
     foreach (\$color,\$function,\$topic,\$component_help,\$faq,\$bug,\$origurl) {      foreach (\$color,\$function,\$topic,\$component_help,\$faq,\$bug,\$origurl) {
         $$_ = &Apache::lonnet::escape($$_);          $$_ = &Apache::lonnet::escape($$_);
     }      }
   
     if (!$stayOnPage)      if (!$stayOnPage) {
     {  
          $link = "javascript:helpMenu('open')";           $link = "javascript:helpMenu('open')";
     }      } else {
     else  
     {  
         $link = "javascript:helpMenu('display')";          $link = "javascript:helpMenu('display')";
     }      }
     my $banner_link = "/adm/helpmenu?page=banner&color=$color&function=$function&topic=$topic&component_help=$component_help&faq=$faq&bug=$bug&origurl=$origurl&stamp=$timestamp";      my $banner_link = "/adm/helpmenu?page=banner&color=$color&function=$function&topic=$topic&component_help=$component_help&faq=$faq&bug=$bug&origurl=$origurl&stamp=$timestamp&stayonpage=$stayOnPage";
     my $details_link = "/adm/helpmenu?page=body&color=$color&function=$function&topic=$topic&component_help=$component_help&faq=$faq&bug=$bug&origurl=$origurl&stamp=$timestamp";      my $details_link = "/adm/helpmenu?page=body&color=$color&function=$function&topic=$topic&component_help=$component_help&faq=$faq&bug=$bug&origurl=$origurl&stamp=$timestamp";
     my $template .= <<"ENDTEMPLATE";      my $template;
       if ($text ne "") {
    $template .= 
     "<table bgcolor='#337733' cellspacing='1' cellpadding='1' border='0'><tr>".
     "<td bgcolor='#448844'><a href=\"$link\"><font color='#FFFFFF' size='2'>$text</font></a>";
       }
       $template .= <<"ENDTEMPLATE";
  <script>   <script>
 function helpMenu(caller) {  function helpMenu(caller) {
     if (caller == 'open') {      if (caller == 'open') {
Line 699  function helpMenu(caller) { Line 688  function helpMenu(caller) {
     }      }
 }  }
  </script>   </script>
  <a href="$link" title="$title"><image src="/adm/lonMisc/smallFAQ.gif" border="0" alt="(Help Menu)" /></a>   <a href="$link" title="$title"><image src="/adm/lonIcons/helpgateway.gif" border="0" alt="(Help Menu)" /></a>
 ENDTEMPLATE  ENDTEMPLATE
       if ($component_help) {
    if (!$text) {
       $template=&help_open_topic($component_help,undef,$stayOnPage,
          $width,$height).' '.$template;
    } else {
       my $help_text;
       $help_text=&Apache::lonnet::unescape($topic);
       $template='<table><tr><td>'.
    &help_open_topic($component_help,$help_text,$stayOnPage,
    $width,$height).'</td><td>'.$template.
    '</td></tr></table>';
    }
       }
       if ($text ne '') { $template.='</td></tr></table>' };
     return $template;      return $template;
 }  }
   
Line 1797  sub screenname { Line 1800  sub screenname {
 # ------------------------------------------------------------- Message Wrapper  # ------------------------------------------------------------- Message Wrapper
   
 sub messagewrapper {  sub messagewrapper {
     my ($link,$un,$do)=@_;      my ($link,$username,$domain)=@_;
     return       return 
 "<a href='/adm/email?compose=individual&recname=$un&recdom=$do'>$link</a>";          '<a href="/adm/email?compose=individual&'.
           'recname='.$username.'&recdom='.$domain.'" '.
           'title="'.&mt('Send message').'">'.$link.'</a>';
 }  }
 # --------------------------------------------------------------- Notes Wrapper  # --------------------------------------------------------------- Notes Wrapper
   
Line 1812  sub noteswrapper { Line 1817  sub noteswrapper {
   
 sub aboutmewrapper {  sub aboutmewrapper {
     my ($link,$username,$domain,$target)=@_;      my ($link,$username,$domain,$target)=@_;
     return "<a href='/adm/$domain/$username/aboutme'".      return '<a href="/adm/'.$domain.'/'.$username.'/aboutme"'.
  ($target?" target='$target'":'').">$link</a>";   ($target?' target="$target"':'').' title="'.&mt('View this users personal page').'">'.$link.'</a>';
 }  }
   
 # ------------------------------------------------------------ Syllabus Wrapper  # ------------------------------------------------------------ Syllabus Wrapper
Line 1893  returns description of a specified copyr Line 1898  returns description of a specified copyr
 sub copyrightdescription {  sub copyrightdescription {
     return &mt($cprtag{shift(@_)});      return &mt($cprtag{shift(@_)});
 }  }
   
   =pod
   
 =item * source_copyrightids()   =item * source_copyrightids() 
   
 returns list of all source copyrights  returns list of all source copyrights
Line 2548  $upperleft</td> Line 2556  $upperleft</td>
 </td></tr>  </td></tr>
 <tr>  <tr>
 <td bgcolor="$tabbg" align="right"><font size="2" face="Arial, Helvetica, sans-serif">$realm</font>&nbsp;</td></tr>  <td bgcolor="$tabbg" align="right"><font size="2" face="Arial, Helvetica, sans-serif">$realm</font>&nbsp;</td></tr>
 </table><br>  </table><br />
 ENDBODY  ENDBODY
 }  }
   
Line 3643  sub icon { Line 3651  sub icon {
     return $iconname;      return $iconname;
 }   } 
   
   sub connection_aborted {
       my ($r)=@_;
       $r->print(" ");$r->rflush();
       my $c = $r->connection;
       &Apache::lonnet::logthis("checking :".$c->aborted());
       return $c->aborted();
   }
   
 =pod  =pod
   
 =back  =back

Removed from v.1.193  
changed lines
  Added in v.1.205.2.1


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