Diff for /loncom/interface/lonhtmlcommon.pm between versions 1.305 and 1.306

version 1.305, 2012/03/26 02:47:46 version 1.306, 2012/03/26 10:24:08
Line 1309  sub htmlareaselectactive { Line 1309  sub htmlareaselectactive {
                 $.fn.jPicker.defaults.images.clientPath="/adm/jpicker/images/";                  $.fn.jPicker.defaults.images.clientPath="/adm/jpicker/images/";
                 $(".colorchooser").jPicker();                  $(".colorchooser").jPicker();
   
                 // Only define the countdown if a dueDate variable is defined:  
   
                if (typeof(dueDate) != "undefined") {  
                   $("#duedatecountdown").countdown({until: dueDate, compact: true,   
                                                   layout: "<b>'.&mt("Due in: {dn} {dl} {hnn}{sep}{mnn}{sep}{snn}").'</b>",  
                                                   onTick: function (periods) {  
                          if($.countdown.periodsToSeconds(periods) < 60) {  
                              $(this).css("color", "red");   //Highlight last minute.  
                          }  
                       }  
                   });  
                }  
   
  });   });
 ';  ';
       # Code to put a due date countdown in 'duedatecountdown' span.
       # This is currently located in the breadcrumb headers.
       # note that the dueDateLayout is internatinoalized below.
       # Here document is used to support the substitution into the javascript below.
       # ..which unfortunately necessitates escaping the $'s in the javascript.
   
       my $dueDateLayout = '<b>' .  &mt('Due in: {dn} {dl} {hnn}{sep}{mnn}{sep}{snn}') . '</b>';
       $output .= <<JAVASCRIPT;
   \$(document).ready(function() {
      if (typeof(dueDate) != "undefined") {
         \$("#duedatecountdown").countdown({until: dueDate, compact: true, 
            layout: "$dueDateLayout",
            onTick: function (periods) {
               if(\$.countdown.periodsToSeconds(periods) < 60) {
                  \$(this).css("color", "red");   //Highlight last minute.
               }
            }
         });
      }
   });
   JAVASCRIPT
     if ($dragmath_prefix ne '') {      if ($dragmath_prefix ne '') {
         $output .= '          $output .= '
   

Removed from v.1.305  
changed lines
  Added in v.1.306


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