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

wenzelju wenzelju@source.lon-capa.org
Mon, 09 Aug 2010 11:49:41 -0000


wenzelju		Mon Aug  9 11:49:41 2010 EDT

  Modified files:              
    /loncom/interface	loncommon.pm 
  Log:
  - Add style 'LC_hidden' for elements which should not be displayed
  - Add additional parameter 'id' for data-table-rows, so rows can be identified by their id
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.973 loncom/interface/loncommon.pm:1.974
--- loncom/interface/loncommon.pm:1.973	Sun Aug  8 02:00:38 2010
+++ loncom/interface/loncommon.pm	Mon Aug  9 11:49:41 2010
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.973 2010/08/08 02:00:38 raeburn Exp $
+# $Id: loncommon.pm,v 1.974 2010/08/09 11:49:41 wenzelju Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -6479,6 +6479,10 @@
   padding: 0px 4px
 }
 
+.LC_hidden {
+  display: none;
+}
+
 END
 }
 
@@ -6855,18 +6859,20 @@
     }
 
     sub start_data_table_row {
-	my ($add_class) = @_;
+	my ($add_class, $id) = @_;
 	$row_count[0]++;
 	my $css_class = ($row_count[0] % 2)?'LC_odd_row':'LC_even_row';
 	$css_class = (join(' ',$css_class,$add_class)) unless ($add_class eq '');
-	return  '<tr class="'.$css_class.'">'."\n";;
+        $id = (' id="'.$id.'"') unless ($id eq '');
+        return  '<tr class="'.$css_class.'"'.$id.'>'."\n";
     }
     
     sub continue_data_table_row {
-	my ($add_class) = @_;
+	my ($add_class, $id) = @_;
 	my $css_class = ($row_count[0] % 2)?'LC_odd_row':'LC_even_row';
-	$css_class = (join(' ',$css_class,$add_class)) unless ($add_class eq '');;
-	return  '<tr class="'.$css_class.'">'."\n";;
+	$css_class = (join(' ',$css_class,$add_class)) unless ($add_class eq '');
+        $id = (' id="'.$id.'"') unless ($id eq '');
+        return  '<tr class="'.$css_class.'"'.$id.'>'."\n";
     }
 
     sub end_data_table_row {