[LON-CAPA-cvs] cvs: loncom /interface lonhtmlcommon.pm

bisitz bisitz@source.lon-capa.org
Mon, 03 Aug 2009 16:34:16 -0000


bisitz		Mon Aug  3 16:34:16 2009 EDT

  Modified files:              
    /loncom/interface	lonhtmlcommon.pm 
  Log:
  Date Selector / Date Setter
  XHTML: selected="selected", optimized white spacing
  
  
Index: loncom/interface/lonhtmlcommon.pm
diff -u loncom/interface/lonhtmlcommon.pm:1.227 loncom/interface/lonhtmlcommon.pm:1.228
--- loncom/interface/lonhtmlcommon.pm:1.227	Tue Jul 14 17:56:13 2009
+++ loncom/interface/lonhtmlcommon.pm	Mon Aug  3 16:34:16 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common html routines
 #
-# $Id: lonhtmlcommon.pm,v 1.227 2009/07/14 17:56:13 bisitz Exp $
+# $Id: lonhtmlcommon.pm,v 1.228 2009/08/03 16:34:16 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -505,9 +505,9 @@
     unshift(@Months,'If you can read this an error occurred');
     if ($includeempty) { $monthselector.="<option value=''></option>"; }
     for(my $m = 1;$m <=$#Months;$m++) {
-        $monthselector .= qq{      <option value="$m" };
-        $monthselector .= "selected " if ($m-1 eq $month);
-        $monthselector .= '> '.&mt($Months[$m]).' </option>';
+        $monthselector .= qq{      <option value="$m"};
+        $monthselector .= ' selected="selected"' if ($m-1 eq $month);
+        $monthselector .= '> '.&mt($Months[$m]).' </option>'."\n";
     }
     $monthselector.= '  </select>';
     # Day
@@ -520,8 +520,8 @@
         $hourselector.=qq{<option value=''></option>};
     }
     for (my $h = 0;$h<24;$h++) {
-        $hourselector .= qq{<option value="$h" };
-        $hourselector .= "selected " if (defined($hour) && $hour == $h);
+        $hourselector .= qq{<option value="$h"};
+        $hourselector .= ' selected="selected"' if (defined($hour) && $hour == $h);
         $hourselector .= ">";
         my $timest='';
         if ($h == 0) {