[LON-CAPA-cvs] cvs: loncom /interface lonindexer.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Thu, 21 Sep 2006 22:11:12 -0000
This is a MIME encoded message
--albertel1158876672
Content-Type: text/plain
albertel Thu Sep 21 18:11:12 2006 EDT
Modified files:
/loncom/interface lonindexer.pm
Log:
- xhtml
--albertel1158876672
Content-Type: text/plain
Content-Disposition: attachment; filename="albertel-20060921181112.txt"
Index: loncom/interface/lonindexer.pm
diff -u loncom/interface/lonindexer.pm:1.151 loncom/interface/lonindexer.pm:1.152
--- loncom/interface/lonindexer.pm:1.151 Mon Jul 31 15:45:57 2006
+++ loncom/interface/lonindexer.pm Thu Sep 21 18:11:12 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Directory Indexer
#
-# $Id: lonindexer.pm,v 1.151 2006/07/31 19:45:57 albertel Exp $
+# $Id: lonindexer.pm,v 1.152 2006/09/21 22:11:12 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -172,7 +172,7 @@
# --------------------- define extra fields and buttons in case of special mode
if ($env{'form.catalogmode'} eq 'interactive') {
$extrafield='<td bgcolor="'.$fileclr.'" valign="bottom">'.
- '<a name="$anchor"><img src="'.$iconpath.'whitespace1.gif"'.
+ '<img alt="" src="'.$iconpath.'whitespace1.gif"'.
' border="0" /></td>';
$colspan=" colspan='2' ";
my $cl=&mt('Close');
@@ -182,7 +182,7 @@
}
elsif ($env{'form.catalogmode'} eq 'import') {
$extrafield='<td bgcolor="'.$fileclr.'" valign="bottom">'.
- '<a name="$anchor"><img src="'.$iconpath.'whitespace1.gif"'.
+ '<img alt="" src="'.$iconpath.'whitespace1.gif"'.
' border="0" /></td>';
$colspan=" colspan='2' ";
my $cl=&mt('Close');
@@ -580,12 +580,13 @@
# -------- recursively go through all the directories and output as appropriate
&scanDir ($r,$toplevel,$indent,\%hash);
-# ---------------------------- embed hidden information useful for group import
- $r->print("<form name='fnum'>");
- $r->print("<input type='hidden' name='fnum' value='$fnum' /></form>");
# -------------------------------------------------------------- end the tables
$r->print('</table>');
+# ---------------------------- embed hidden information useful for group import
+ $r->print("<form name='fnum' action=''>");
+ $r->print("<input type='hidden' name='fnum' value='$fnum' /></form>");
+# -------------------------------------------------------------- end the tables
$r->print('</td></tr></table>');
# --------------------------------------------------- end the output and return
@@ -842,7 +843,7 @@
&begin_form ($r,$filecom[0]);
my $anchor = $filecom[0];
$anchor =~ s/\///g;
- $r->print ('<a name="'.$anchor.'">');
+ $r->print ('<a name="'.$anchor.'"></a>');
$r->print ('<input type="hidden" name="acts" value="" />');
$r->print ('<input src="'.$iconpath.'folder_pointer_'.
$diropen.'.gif"');
@@ -850,7 +851,7 @@
"\n");
my $quotable_filecom = &Apache::loncommon::escape_single($filecom[0]);
$r->print ('<a href="javascript:gothere(\''.$quotable_filecom.
- '\')"><img src="'.$iconpath.'server.gif"');
+ '\')"><img alt="" src="'.$iconpath.'server.gif"');
$r->print (' border="0" /></a>'."\n");
$r->print (&mt("Domain")." - $listname ");
if ($Apache::lonnet::domaindescription{$listname}) {
@@ -869,7 +870,7 @@
my $anchor = $curdir;
$anchor =~ s/\///g;
&begin_form ($r,$curdir);
- $r->print ('<a name="'.$anchor.'"><img src="'.$iconpath.
+ $r->print ('<a name="'.$anchor.'"></a><img alt="" src="'.$iconpath.
'whitespace1.gif" border="0" />'."\n");
$r->print ('<input type="hidden" name="acts" value="" />');
$r->print ('<input src="'.$iconpath.'folder_pointer_'.$diropen.
@@ -878,7 +879,7 @@
"\n");
my $quotable_curdir = &Apache::loncommon::escape_single($curdir);
$r->print ('<a href="javascript:gothere(\''.$quotable_curdir
- .'\')"><img src='.
+ .'\')"><img alt="" src='.
$iconpath.'quill.gif border="0" name="'.$msg.
'" height="22" /></a>');
my $domain=(split(m|/|,$startdir))[2];
@@ -910,11 +911,11 @@
my $quotable_filelink = &Apache::loncommon::escape_single($filelink);
$r->print("<a href=\"javascript:select_data(\'",
$quotable_filelink,"')\">");
- $r->print("<img src='",$iconpath,"select.gif' border='0' /></a>".
+ $r->print("<img alt=\"\" src='",$iconpath,"select.gif' border='0' /></a>".
"\n");
$r->print("</td><td nowrap>");
} elsif ($env{'form.catalogmode'} eq 'import') {
- $r->print("<form name='form$fnum'>\n");
+ $r->print("<form name='form$fnum' action=''>\n");
$r->print("<input type='checkbox' name='filelink"."' ".
"value='$filelink' onClick='".
"javascript:queue(\"form$fnum\")' ");
@@ -936,18 +937,18 @@
}
# General indentation
if ($indent > 0 and $indent < 11) {
- $r->print("<img src=",$iconpath,"whitespace",$indent,
+ $r->print("<img alt=\"\" src=",$iconpath,"whitespace",$indent,
".gif border='0' />\n");
} elsif ($indent >0) {
my $ten = int($indent/10.);
my $rem = $indent%10.0;
my $count = 0;
while ($count < $ten) {
- $r->print("<img src=",$iconpath,
+ $r->print("<img alt=\"\" src=",$iconpath,
"whitespace10.gif border='0' />\n");
$count++;
}
- $r->print("<img src=",$iconpath,"whitespace",$rem,
+ $r->print("<img alt=\"\" src=",$iconpath,"whitespace",$rem,
".gif border='0' />\n") if $rem > 0;
}
# Sequence open/close icon
@@ -956,23 +957,23 @@
my $anchor = $curdir;
$anchor =~ s/\///g;
$r->print ('<input type="hidden" name="acts" value="" />');
- $r->print ('<a name="'.$anchor.'"><input src="'.$iconpath.
+ $r->print ('<a name="'.$anchor.'"></a><input src="'.$iconpath.
'folder_pointer_'.$diropen.'.gif"');
$r->print (' name="'.$msg.'" height="22" type="image" border="0" />'.
"\n");
}
# Filetype icons
- $r->print("<img src='$iconname' border='0' />\n");
+ $r->print("<img alt=\"\" src='$iconname' border='0' />\n");
my $quotable_filelink = &Apache::loncommon::escape_single($filelink);
$r->print (" <a href=\"javascript:openWindow('".$quotable_filelink.
- "', 'previewfile', '450', '500', 'no', 'yes','yes')\";".
- " TARGET=_self>$listname</a> ");
+ "', 'previewfile', '450', '500', 'no', 'yes','yes');\"".
+ " target=\"_self\">$listname</a> ");
$r->print (" (<a href=\"javascript:openWindow('".$quotable_filelink.
- ".meta', 'metadatafile', '500', '550', 'no', 'yes','no')\"; ".
- "TARGET=_self>metadata</a>) ");
+ ".meta', 'metadatafile', '500', '550', 'no', 'yes','no');\" ".
+ " target=\"_self\">metadata</a>) ");
# Close form to open/close sequence
if ($filelink=~/\.(page|sequence)$/) {
$r->print('</form>');
@@ -1037,8 +1038,8 @@
my $quotable_sourcelink = &Apache::loncommon::escape_single($sourcelink);
$r->print('<td>'."<a href=\"javascript:openWindow('"
.$quotable_sourcelink.
- "', 'previewsource', '700', '700', 'no', 'yes','yes')\";".
- " TARGET=_self>Yes</a> "."</td>\n");
+ "', 'previewsource', '700', '700', 'no', 'yes','yes');\"".
+ " target=\"_self\">Yes</a> "."</td>\n");
} else { #A cuddled else. :P
$r->print("<td> </td>\n");
}
@@ -1073,31 +1074,32 @@
&begin_form ($r,$curdir);
my $indentm1 = $indent-1;
if ($indentm1 < 11 and $indentm1 > 0) {
- $r->print("<img src=",$iconpath,"whitespace",$indentm1,
+ $r->print("<img alt=\"\" src=",$iconpath,"whitespace",$indentm1,
".gif border='0' />\n");
} else {
my $ten = int($indentm1/10.);
my $rem = $indentm1%10.0;
my $count = 0;
while ($count < $ten) {
- $r->print ("<img src=",$iconpath
+ $r->print ("<img alt=\"\" src=",$iconpath
,"whitespace10.gif border='0' />\n");
$count++;
}
- $r->print ("<img src=",$iconpath,"whitespace",$rem,
+ $r->print ("<img alt=\"\" src=",$iconpath,"whitespace",$rem,
".gif border='0' />\n") if $rem > 0;
}
$r->print ('<input type="hidden" name="acts" value="" />');
- $r->print ('<a name="'.$anchor.'"><input src="'.$iconpath.
+ $r->print ('<a name="'.$anchor.'"></a><input src="'.$iconpath.
'folder_pointer_'.$diropen.'.gif"');
$r->print (' name="'.$msg.'" height="22" type="image" border="0" />'.
"\n");
my $quotable_curdir = &Apache::loncommon::escape_single($curdir);
$r->print ('<a href="javascript:gothere(\''
- .$quotable_curdir.'\')"><img src="'.
+ .$quotable_curdir.'\')">'
+ .'<img alt="'.&mt('Open Folder').'"src="'.
$iconpath.'folder_'.$diropen.'.gif" border="0" /></a>'.
"\n");
- $r->print ("$listname</td>\n");
+ $r->print ("$listname</form></td>\n");
# Attributes
my $filelink = $startdir.$filecom[0].'/default';
@@ -1145,7 +1147,7 @@
if ($hash{'display_attrs_7'} == 1) {
$r->print('<td> </td>');
}
- $r->print('</form></tr>');
+ $r->print('</tr>');
}
}
@@ -1196,9 +1198,9 @@
}
$output='<font size="-2">'.$output.'</font>';
} elsif ($embstyle eq 'img') {
- $output='<img src="'.$filelink.'" />';
+ $output='<img alt="'.&mt('Preview').'" src="'.$filelink.'" />';
} elsif ($filelink=~/^\/res\/(\w+)\/(\w+)\//) {
- $output='<img src="http://'.
+ $output='<img alt="'.&mt('Preview').'" src="http://'.
$Apache::lonnet::hostname{&Apache::lonnet::homeserver($2,$1)}.
'/cgi-bin/thumbnail.gif?url='.$filelink.'" />';
}
--albertel1158876672--