[LON-CAPA-cvs] cvs: loncom(version_2_9_X) /interface lonindexer.pm

raeburn raeburn@source.lon-capa.org
Thu, 13 Aug 2009 13:23:26 -0000


This is a MIME encoded message

--raeburn1250169806
Content-Type: text/plain

raeburn		Thu Aug 13 13:23:26 2009 EDT

  Modified files:              (Branch: version_2_9_X)
    /loncom/interface	lonindexer.pm 
  Log:
  - Backport 1.199.
  
  
--raeburn1250169806
Content-Type: text/plain
Content-Disposition: attachment; filename="raeburn-20090813132326.txt"

Index: loncom/interface/lonindexer.pm
diff -u loncom/interface/lonindexer.pm:1.181.4.2 loncom/interface/lonindexer.pm:1.181.4.3
--- loncom/interface/lonindexer.pm:1.181.4.2	Thu Aug 13 12:46:29 2009
+++ loncom/interface/lonindexer.pm	Thu Aug 13 13:23:26 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Directory Indexer
 #
-# $Id: lonindexer.pm,v 1.181.4.2 2009/08/13 12:46:29 raeburn Exp $
+# $Id: lonindexer.pm,v 1.181.4.3 2009/08/13 13:23:26 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -183,7 +183,7 @@
 	    $colspan=" colspan='2' ";
             my $cl=&mt('Close');
             $closebutton=<<END;
-<input type="button" name="close" value='$cl' onClick="self.close()" />
+<input type="button" name="close" value='$cl' onclick="self.close()" />
 END
         }
 	elsif ($env{'form.catalogmode'} eq 'import') {
@@ -194,11 +194,11 @@
 	    my $cl=&mt('Close');
             my $gi=&mt('Import');
             $closebutton=<<END;
-<input type="button" name="close" value='$cl' onClick="self.close()" />
+<input type="button" name="close" value='$cl' onclick="self.close()" />
 END
             $groupimportbutton=<<END;
 <input type="button" name="groupimport" value='$gi'
-onClick="javascript:select_group()" />
+onclick="javascript:select_group()" />
 END
         }
 	# Additions made by Matthew to make the browser a little easier to deal
@@ -427,13 +427,13 @@
 	    for (my $i=0; $i<=16; $i++) {
 		delete $hash{'display_attrs_'.$i};
 		if ($env{'form.attr'.$i} == 1) {
-		    $attrchk[$i] = 'checked';
+		    $attrchk[$i] = 'checked="checked"';
 		    $hash{'display_attrs_'.$i} = 1;
 		}
 	    }
 	} else {
 	    for (my $i=0; $i<=16; $i++) {
-		$attrchk[$i] = 'checked' if $hash{'display_attrs_'.$i} == 1;
+		$attrchk[$i] = 'checked="checked"' if $hash{'display_attrs_'.$i} == 1;
 	    }
 	}
 
@@ -467,32 +467,31 @@
 	$r->print(<<END);
 <fieldset>
 <legend>$lt{'hd'}</legend>
-<form method="post" name="fileattr" action="$uri"
- enctype="application/x-www-form-urlencoded">
-<label><input type="checkbox" name="attr9" value="1" $attrchk[9] onClick="this.form.submit();" /> $lt{'av'}</label>
+<form method="post" name="fileattr" action="$uri" enctype="application/x-www-form-urlencoded">
+<label><input type="checkbox" name="attr9" value="1" $attrchk[9] onclick="this.form.submit();" /> $lt{'av'}</label>
 <table border="0">
 <tr>
-<td><label><input type="checkbox" name="attr0" value="1" $attrchk[0] onClick="this.form.submit();" /> $lt{'ti'}</label></td>
-<td><label><input type="checkbox" name="attr4" value="1" $attrchk[4] onClick="this.form.submit();" /> $lt{'au'}</label></td>
-<td><label><input type="checkbox" name="attr5" value="1" $attrchk[5] onClick="this.form.submit();" /> $lt{'kw'}</label></td>
-<td><label><input type="checkbox" name="attr6" value="1" $attrchk[6] onClick="this.form.submit();" /> $lt{'ln'}</label></td>
-<td><label><input type="checkbox" name="attr13" value="1" $attrchk[13] onClick="this.form.submit();" /> $lt{'nt'}</label></td>
-<td><label><input type="checkbox" name="attr16" value="1" $attrchk[16] onClick="this.form.submit();" /> $lt{'sd'}</label></td>
+<td><label><input type="checkbox" name="attr0" value="1" $attrchk[0] onclick="this.form.submit();" /> $lt{'ti'}</label></td>
+<td><label><input type="checkbox" name="attr4" value="1" $attrchk[4] onclick="this.form.submit();" /> $lt{'au'}</label></td>
+<td><label><input type="checkbox" name="attr5" value="1" $attrchk[5] onclick="this.form.submit();" /> $lt{'kw'}</label></td>
+<td><label><input type="checkbox" name="attr6" value="1" $attrchk[6] onclick="this.form.submit();" /> $lt{'ln'}</label></td>
+<td><label><input type="checkbox" name="attr13" value="1" $attrchk[13] onclick="this.form.submit();" /> $lt{'nt'}</label></td>
+<td><label><input type="checkbox" name="attr16" value="1" $attrchk[16] onclick="this.form.submit();" /> $lt{'sd'}</label></td>
 </tr>
 <tr>
-<td><label><input type="checkbox" name="attr1" value="1" $attrchk[1] onClick="this.form.submit();" /> $lt{'si'}</label></td>
-<td><label><input type="checkbox" name="attr2" value="1" $attrchk[2] onClick="this.form.submit();" /> $lt{'la'}</label></td>
-<td><label><input type="checkbox" name="attr3" value="1" $attrchk[3] onClick="this.form.submit();" /> $lt{'lm'}</label></td>
-<td><label><input type="checkbox" name="attr10" value="1" $attrchk[10] onClick="this.form.submit();" /> $lt{'sa'}</label></td>
-<td><label><input type="checkbox" name="attr14" value="1" $attrchk[14] onClick="this.form.submit();" /> $lt{'ab'}</label></td>
+<td><label><input type="checkbox" name="attr1" value="1" $attrchk[1] onclick="this.form.submit();" /> $lt{'si'}</label></td>
+<td><label><input type="checkbox" name="attr2" value="1" $attrchk[2] onclick="this.form.submit();" /> $lt{'la'}</label></td>
+<td><label><input type="checkbox" name="attr3" value="1" $attrchk[3] onclick="this.form.submit();" /> $lt{'lm'}</label></td>
+<td><label><input type="checkbox" name="attr10" value="1" $attrchk[10] onclick="this.form.submit();" /> $lt{'sa'}</label></td>
+<td><label><input type="checkbox" name="attr14" value="1" $attrchk[14] onclick="this.form.submit();" /> $lt{'ab'}</label></td>
 <td>&nbsp;</td>
 </tr>
 <tr>
-<td><label><input type="checkbox" name="attr8" value="1" $attrchk[8] onClick="this.form.submit();" /> $lt{'st'}</label></td>
-<td><label><input type="checkbox" name="attr11" value="1" $attrchk[11] onClick="this.form.submit();" /> $lt{'li'}</label></td>
-<td><label><input type="checkbox" name="attr7" value="1" $attrchk[7] onClick="this.form.submit();" /> $lt{'sr'}</label></td>
-<td><label><input type="checkbox" name="attr12" value="1" $attrchk[12] onClick="this.form.submit();" /> $lt{'sb'}</label></td>
-<td><label><input type="checkbox" name="attr15" value="1" $attrchk[15] onClick="this.form.submit();" /> $lt{'gl'}</label></td>
+<td><label><input type="checkbox" name="attr8" value="1" $attrchk[8] onclick="this.form.submit();" /> $lt{'st'}</label></td>
+<td><label><input type="checkbox" name="attr11" value="1" $attrchk[11] onclick="this.form.submit();" /> $lt{'li'}</label></td>
+<td><label><input type="checkbox" name="attr7" value="1" $attrchk[7] onclick="this.form.submit();" /> $lt{'sr'}</label></td>
+<td><label><input type="checkbox" name="attr12" value="1" $attrchk[12] onclick="this.form.submit();" /> $lt{'sb'}</label></td>
+<td><label><input type="checkbox" name="attr15" value="1" $attrchk[15] onclick="this.form.submit();" /> $lt{'gl'}</label></td>
 <td>&nbsp;</td>
 </tr>
 </table>
@@ -550,8 +549,8 @@
 	&Apache::lonhtmlcommon::store_recent('residx',$storeuri,$storeuri);
 # -------------------------------------------------- Check All and Uncheck all
 	if ($env{'form.catalogmode'} eq 'import') {
-	    $r->print('<br /><input type="button" value="'.&mt("Check All").'" id="checkallbutton" onClick="javascript:checkAll()" />');
-	    $r->print('<input type="button" value="'.&mt("Uncheck All").'" id="uncheckallbutton" onClick="javascript:uncheckAll()" />');
+	    $r->print('<br /><input type="button" value="'.&mt("Check All").'" id="checkallbutton" onclick="javascript:checkAll()" />');
+	    $r->print('<input type="button" value="'.&mt("Uncheck All").'" id="uncheckallbutton" onclick="javascript:uncheckAll()" />');
 	}
 # ----------------- output starting row to the indexed file/directory hierarchy
         my $titleclr="#ddffff";
@@ -880,7 +879,7 @@
 	$r->print("<td>\n");
 	$r->print ('<form method="post" name="dirpathUP" action="'.$updir.
 		   '/" '.
-		   'onSubmit="return rep_dirpath(\'UP\','.
+		   'onsubmit="return rep_dirpath(\'UP\','.
 		   'document.forms.fileattr.acts.value)" '.
 		   'enctype="application/x-www-form-urlencoded"'.
                    '>'."\n");
@@ -889,7 +888,7 @@
 		   $startdir.'" />'."\n");
 	$r->print ('<input type="hidden" name="acts" value="" />'."\n");
 	$r->print ('<input src="'.$iconpath.'arrow_up.gif"');
-	$r->print (' name="'.$msg.'" type="image" class="LC_indexer_icon" />'.
+	$r->print (' name="'.$msg.'" alt="'.$msg.'" type="image" class="LC_indexer_icon" />'.
 		   "\n");
 	$r->print(&mt("Up")."</form>$tabtag</tr>\n");
 	return OK;
@@ -914,7 +913,7 @@
 	$r->print ('<input type="hidden" name="acts" value="" />');
 	$r->print ('<input src="'.$iconpath.'folder_pointer_'.
 		   $diropen.'.gif"'); 
-	$r->print (' name="'.$msg.'" type="image" class="LC_indexer_icon" />'.
+	$r->print (' name="'.$msg.'" alt="'.$msg.'" type="image" class="LC_indexer_icon" />'.
 		   "\n");
 	my $quotable_filecom = &Apache::loncommon::escape_single($filecom[0]);
 	$r->print ('<a href="javascript:gothere(\''.$quotable_filecom.
@@ -942,7 +941,7 @@
 	$r->print ('<input type="hidden" name="acts" value="" />');
 	$r->print ('<input src="'.$iconpath.'folder_pointer_'.$diropen.
 		   '.gif"'); 
-	$r->print (' name="'.$msg.'" type="image" class="LC_indexer_icon" />'.
+	$r->print (' name="'.$msg.'" alt="'.$msg.'" type="image" class="LC_indexer_icon" />'.
 		   "\n");
 	my $quotable_curdir = &Apache::loncommon::escape_single($curdir);
 	$r->print ('<a href="javascript:gothere(\''.$quotable_curdir
@@ -988,7 +987,7 @@
 	} elsif ($env{'form.catalogmode'} eq 'import') {
 	    $r->print("<form name='form$fnum' action=''>\n");
 	    $r->print("<input type='checkbox' name='filelink"."' ".
-		      "value='$filelink' onClick='".
+		      "value='$filelink' onclick='".
 		      "javascript:queue(\"form$fnum\")' ");
 	    if ($hash{'store_'.$filelink}) {
 		$r->print("checked");
@@ -1032,7 +1031,7 @@
 	    $r->print ('<input type="hidden" name="acts" value="" />');
 	    $r->print ('<a name="'.$anchor.'"></a><input src="'.$iconpath.
 		       'folder_pointer_'.$diropen.'.gif"');
-	    $r->print (' name="'.$msg.'" type="image" class="LC_indexer_icon" />'.
+	    $r->print (' name="'.$msg.'" alt="'.$msg.'" type="image" class="LC_indexer_icon" />'.
 		       "\n");
 	}
 # Filetype icons
@@ -1186,7 +1185,7 @@
 	$r->print ('<input type="hidden" name="acts" value="" />');
 	$r->print ('<a name="'.$anchor.'"></a><input src="'.$iconpath.
 		   'folder_pointer_'.$diropen.'.gif"');
-	$r->print (' name="'.$msg.'" type="image" class="LC_indexer_icon" />'.
+	$r->print (' name="'.$msg.'" alt="'.$msg.'" type="image" class="LC_indexer_icon" />'.
 		   "\n");
 	my $quotable_curdir = &Apache::loncommon::escape_single($curdir);
 	$r->print ('<a href="javascript:gothere(\''
@@ -1352,7 +1351,7 @@
     $uri=&Apache::loncommon::escape_single($uri);
     $r->print ('<form method="post" name="dirpath'.$dnum.'" action="'.$uri.
 	       '#'.$anchor.
-	       '" onSubmit="return rep_dirpath(\''.$dnum.'\''.
+	       '" onsubmit="return rep_dirpath(\''.$dnum.'\''.
 	       ',document.forms.fileattr.acts.value)" '.
 	       'enctype="application/x-www-form-urlencoded">'."\n");
     $r->print ('<input type="hidden" name="openuri" value="'.$uri.'" />'.

--raeburn1250169806--