[LON-CAPA-cvs] cvs: loncom /interface lonparmset.pm
bisitz
bisitz@source.lon-capa.org
Tue, 30 Jun 2009 14:59:17 -0000
bisitz Tue Jun 30 14:59:17 2009 EDT
Modified files:
/loncom/interface lonparmset.pm
Log:
Optimized Indentation for Folder Display in Table Mode:
Use same method as in lonnavmaps.pm (whitespace image)
Now, indentation is clearly visible and is consistent with e.g. course content
Index: loncom/interface/lonparmset.pm
diff -u loncom/interface/lonparmset.pm:1.463 loncom/interface/lonparmset.pm:1.464
--- loncom/interface/lonparmset.pm:1.463 Tue Jun 30 14:30:26 2009
+++ loncom/interface/lonparmset.pm Tue Jun 30 14:59:17 2009
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set parameters for assessments
#
-# $Id: lonparmset.pm,v 1.463 2009/06/30 14:30:26 bisitz Exp $
+# $Id: lonparmset.pm,v 1.464 2009/06/30 14:59:17 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1636,9 +1636,16 @@
.'</label></td>'
.&Apache::loncommon::end_data_table_row()
);
+ my $whitespace = '<img src="'
+ .&Apache::loncommon::lonhttpdurl("/adm/lonIcons/whitespace_21.gif")
+ .'" alt="" />';
foreach my $mapid (@{$tree}) {
+ # Indentation
my $depth = $treeinfo->{$mapid}->{'depth'};
- my $indent = (' 'x$depth);
+ my $indent;
+ for (my $i = 0; $i < $depth; $i++) {
+ $indent.= $whitespace;
+ }
$icon = '<img src="/adm/lonIcons/navmap.folder.open.gif" alt="" />';
if ($treeinfo->{$mapid}->{'type'} eq 'page') {
$icon = '<img src="/adm/lonIcons/navmap.page.open.gif" alt="" />';