[Rt-commit] r2298 - in rt/branches/3.4-RELEASE: . html/Elements/CollectionAsTable html/Elements/RT__Ticket

jesse at bestpractical.com jesse at bestpractical.com
Sun Mar 6 17:32:19 EST 2005


Author: jesse
Date: Sun Mar  6 17:32:18 2005
New Revision: 2298

Modified:
   rt/branches/3.4-RELEASE/   (props changed)
   rt/branches/3.4-RELEASE/html/Elements/CollectionAsTable/ParseFormat
   rt/branches/3.4-RELEASE/html/Elements/CollectionAsTable/Row
   rt/branches/3.4-RELEASE/html/Elements/RT__Ticket/ColumnMap
Log:
 r6454 at hualien:  jesse | 2005-03-06 14:53:48 -0500
  r2568 at hualien:  jesse | 2005-01-06 16:57:40 -0500
  RT-Ticket: 6336
  RT-Status: resolved
  RT-Update: correspond
  
  
  The attribute "align" in COLUMN_MAP wasn't usable, because it could not be
  used for a complete column, so I added a /ALIGN:.. section in 
  CollectionAsTable/ParseFormat and use it in Row.
  
  There also was a minor error to be corrected, since the old variant of 
  ParseFormat did not allow more than one /ANYTHING:... to be use (in my 
  example /TITLE:.../ALIGN:...)  --Dirk Pape
  
  
  
 


Modified: rt/branches/3.4-RELEASE/html/Elements/CollectionAsTable/ParseFormat
==============================================================================
--- rt/branches/3.4-RELEASE/html/Elements/CollectionAsTable/ParseFormat	(original)
+++ rt/branches/3.4-RELEASE/html/Elements/CollectionAsTable/ParseFormat	Sun Mar  6 17:32:18 2005
@@ -60,15 +60,19 @@
     }
 
     my $colref;
-    if ( $col =~ s/\/STYLE:(.*?)$//io ) {
+
+    if ( $col =~ s!/STYLE:([^/]+)!!io ) {
         $colref->{'style'} = $1;
     }
-    if ( $col =~ s/\/CLASS:(.*?)$//io ) {
+    if ( $col =~ s!/CLASS:([^/]+)!!io ) {
         $colref->{'class'} = $1;
     }
-    if ( $col =~ s/\/TITLE:(.*?)$//io ) {
+    if ( $col =~ s!/TITLE:([^/]+)!!io ) {
         $colref->{'title'} = $1;
     }
+    if ( $col =~ s!/ALIGN:([^\/]+)!!io ) {
+        $colref->{'align'} = $1;
+    }
     if ( $col =~ /__(.*?)__/gio ) {
         my @subcols;
         while ( $col =~ s/^(.*?)__(.*?)__//o ) {

Modified: rt/branches/3.4-RELEASE/html/Elements/CollectionAsTable/Row
==============================================================================
--- rt/branches/3.4-RELEASE/html/Elements/CollectionAsTable/Row	(original)
+++ rt/branches/3.4-RELEASE/html/Elements/CollectionAsTable/Row	Sun Mar  6 17:32:18 2005
@@ -68,7 +68,8 @@
         next;
     }
     $item++;
-    $m->out('<td class="collection-as-table">');
+	my $align = ($column->{align} || "left");
+    $m->out('<td class="collection-as-table" align="' . $align . '">');
     foreach my $subcol ( @{ $column->{output} } ) {
         if ( $subcol =~ /^__(.*?)__$/o ) {
             my $col = $1;

Modified: rt/branches/3.4-RELEASE/html/Elements/RT__Ticket/ColumnMap
==============================================================================
--- rt/branches/3.4-RELEASE/html/Elements/RT__Ticket/ColumnMap	(original)
+++ rt/branches/3.4-RELEASE/html/Elements/RT__Ticket/ColumnMap	Sun Mar  6 17:32:18 2005
@@ -293,10 +293,6 @@
     },
 
 };
-
-
-
-# }}}
 </%ONCE>
 <%init>
 $m->comp( '/Elements/Callback', COLUMN_MAP    => $COLUMN_MAP, _CallbackName => 'ColumnMap');


More information about the Rt-commit mailing list