Diff for /loncom/interface/lonhtmlcommon.pm between versions 1.86 and 1.92

version 1.86, 2004/08/05 16:59:29 version 1.92, 2004/10/12 22:55:21
Line 117  sub store_recent { Line 117  sub store_recent {
  time.'&'.&Apache::lonnet::escape($value) });   time.'&'.&Apache::lonnet::escape($value) });
 }  }
   
   sub remove_recent {
       my ($area,$names)=@_;
       my $file=&recent_filename($area);
       return &Apache::lonnet::del($file,$names);
   }
   
 sub select_recent {  sub select_recent {
     my ($area,$fieldname,$event)=@_;      my ($area,$fieldname,$event)=@_;
     my %recent=&Apache::lonnet::dump(&recent_filename($area));      my %recent=&Apache::lonnet::dump(&recent_filename($area));
Line 519  sub javascript_nothing { Line 525  sub javascript_nothing {
     return $nothing;      return $nothing;
 }  }
   
   ##############################################
   ##############################################
   sub javascript_docopen {
       # safari does not understand document.open() and loads "text/html"
       my $nothing = "''";
       my $user_browser;
       my $user_os;
       $user_browser = $ENV{'browser.type'} if (exists($ENV{'browser.type'}));
       $user_os      = $ENV{'browser.os'}   if (exists($ENV{'browser.os'}));
       if (! defined($user_browser) || ! defined($user_os)) {
           (undef,$user_browser,undef,undef,undef,$user_os) = 
                              &Apache::loncommon::decode_user_agent();
       }
       if ($user_browser eq 'safari' && $user_os =~ 'mac') {
           $nothing = "document.clear()";
       } else {
    $nothing = "document.open('text/html','replace')";
       }
       return $nothing;
   }
   
   
 ##############################################  ##############################################
 ##############################################  ##############################################
Line 777  sub Increment_PrgWin { Line 804  sub Increment_PrgWin {
     my $sec = $time_est % 60;      my $sec = $time_est % 60;
     #       # 
     my $str;      my $str;
     if ($min == 1 && $sec > 1) {      if ($min == 0 && $sec > 1) {
         $str = '[_2] seconds';          $str = '[_2] seconds';
       } elsif ($min == 1 && $sec > 1) {
           $str = '1 minute [_2] seconds';
     } elsif ($min == 1 && $sec < 2) {      } elsif ($min == 1 && $sec < 2) {
         $str = '1 minute';          $str = '1 minute';
     } elsif ($min < 10 && $sec > 1) {      } elsif ($min < 10 && $sec > 1) {
Line 875  sub spellheader { Line 904  sub spellheader {
     my $nothing = &javascript_nothing();      my $nothing = &javascript_nothing();
     return (<<ENDCHECK);      return (<<ENDCHECK);
 <script type="text/javascript">   <script type="text/javascript"> 
 // BEGIN LON-CAPA Internal  //<!-- BEGIN LON-CAPA Internal
 var checkwin;  var checkwin;
   
 function spellcheckerwindow() {  function spellcheckerwindow() {
Line 883  function spellcheckerwindow() { Line 912  function spellcheckerwindow() {
     checkwin.document.writeln('<html><body bgcolor="#DDDDDD"><form name="spellcheckform" action="/adm/spellcheck" method="post"><input type="hidden" name="text" value="" /></form></body></html>');      checkwin.document.writeln('<html><body bgcolor="#DDDDDD"><form name="spellcheckform" action="/adm/spellcheck" method="post"><input type="hidden" name="text" value="" /></form></body></html>');
     checkwin.document.close();      checkwin.document.close();
 }  }
 // END LON-CAPA Internal  // END LON-CAPA Internal -->
 </script>  </script>
 ENDCHECK  ENDCHECK
 }  }
Line 926  sub htmlareaaddbuttons { Line 955  sub htmlareaaddbuttons {
     config.registerButton('ed_math','LaTeX Inline',      config.registerButton('ed_math','LaTeX Inline',
   '/htmlarea/images/ed_math.gif',false,    '/htmlarea/images/ed_math.gif',false,
     function(editor,id) {      function(editor,id) {
       editor.surroundHTML('<m>\$','\$</m>');        editor.surroundHTML('&nbsp;<m>\$','\$</m>&nbsp;');
     }      }
   );    );
     config.registerButton('ed_math_eqn','LaTeX Equation',      config.registerButton('ed_math_eqn','LaTeX Equation',
   '/htmlarea/images/ed_math_eqn.gif',false,    '/htmlarea/images/ed_math_eqn.gif',false,
     function(editor,id) {      function(editor,id) {
       editor.surroundHTML(        editor.surroundHTML(
      '<center><m>\\\\[','\\\\]</m></center>');       '&nbsp;\\n<center><m>\\\\[','\\\\]</m></center>\\n&nbsp;');
     }      }
   );    );
     config.toolbar.push(['ed_math','ed_math_eqn']);      config.toolbar.push(['ed_math','ed_math_eqn']);
Line 1034  returns: nothing Line 1063  returns: nothing
     my @Crumbs;      my @Crumbs;
           
     sub breadcrumbs {      sub breadcrumbs {
         my ($color,$component,$component_help,$function,$domain,$menulink) =          my ($color,$component,$component_help,$function,$domain,$menulink,
     @_;      $helplink) = @_;
         if (! defined($color)) {          if (! defined($color)) {
             if (! defined($function)) {              if (! defined($function)) {
                 $function = &Apache::loncommon::get_users_function();                  $function = &Apache::loncommon::get_users_function();
Line 1097  returns: nothing Line 1126  returns: nothing
 #        if ($bug ne '') {  #        if ($bug ne '') {
 #            $icons .= &Apache::loncommon::help_open_bug($bug);  #            $icons .= &Apache::loncommon::help_open_bug($bug);
 #        }  #        }
         $icons .= &Apache::loncommon::help_open_menu($color,$component,$component_help,$function,$faq,$bug);   if ($helplink ne 'nohelp') {
       $icons .= &Apache::loncommon::help_open_menu($color,$component,$component_help,$function,$faq,$bug);
    }
         if ($icons ne '') {          if ($icons ne '') {
             $Str .= $icons.'&nbsp;';              $Str .= $icons.'&nbsp;';
         }          }

Removed from v.1.86  
changed lines
  Added in v.1.92


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