Diff for /loncom/interface/loncommon.pm between versions 1.972 and 1.973

version 1.972, 2010/08/07 19:23:50 version 1.973, 2010/08/08 02:00:38
Line 1072  END Line 1072  END
   
 =pod  =pod
   
 =item * &help_open_topic($topic,$text,$stayOnPage,$width,$height)  =item * &help_open_topic($topic,$text,$stayOnPage,$width,$height,$imgid)
   
 Returns a string corresponding to an HTML link to the given help  Returns a string corresponding to an HTML link to the given help
 $topic, where $topic corresponds to the name of a .tex file in  $topic, where $topic corresponds to the name of a .tex file in
Line 1090  a new window using Javascript. (Default Line 1090  a new window using Javascript. (Default
   
 $width and $height are optional numerical parameters that will  $width and $height are optional numerical parameters that will
 override the width and height of the popped up window, which may  override the width and height of the popped up window, which may
 be useful for certain help topics with big pictures included.   be useful for certain help topics with big pictures included.
   
   $imgid is the id of the img tag used for the help icon. This may be
   used in a javascript call to switch the image src.  See 
   lonhtmlcommon::htmlareaselectactive() for an example.
   
 =cut  =cut
   
 sub help_open_topic {  sub help_open_topic {
     my ($topic, $text, $stayOnPage, $width, $height) = @_;      my ($topic, $text, $stayOnPage, $width, $height, $imgid) = @_;
     $text = "" if (not defined $text);      $text = "" if (not defined $text);
     $stayOnPage = 0 if (not defined $stayOnPage);      $stayOnPage = 0 if (not defined $stayOnPage);
     $width = 350 if (not defined $width);      $width = 350 if (not defined $width);
Line 1124  sub help_open_topic { Line 1128  sub help_open_topic {
     # (Always) Add the graphic      # (Always) Add the graphic
     my $title = &mt('Online Help');      my $title = &mt('Online Help');
     my $helpicon=&lonhttpdurl("/adm/help/help.png");      my $helpicon=&lonhttpdurl("/adm/help/help.png");
       if ($imgid ne '') {
           $imgid = ' id="'.$imgid.'"';
       }
     $template.=' <a target="_top" href="'.$link.'" title="'.$title.'">'      $template.=' <a target="_top" href="'.$link.'" title="'.$title.'">'
               .'<img src="'.$helpicon.'" border="0"'                .'<img src="'.$helpicon.'" border="0"'
               .' alt="'.&mt('Help: [_1]',$topic).'"'                .' alt="'.&mt('Help: [_1]',$topic).'"'
               .' title="'.$title.'" style="vertical-align:middle;"'                 .' title="'.$title.'" style="vertical-align:middle;"'.$imgid 
               .' /></a>';                .' /></a>';
     if ($text ne "") {      if ($text ne "") {
         $template.='</span>';          $template.='</span>';

Removed from v.1.972  
changed lines
  Added in v.1.973


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