[Rt-commit] r2049 - in rt/branches/3.2-RELEASE: .
html/Elements/CollectionAsTable html/Elements/RT__Ticket
jesse at bestpractical.com
jesse at bestpractical.com
Thu Jan 6 17:00:04 EST 2005
Author: jesse
Date: Thu Jan 6 17:00:03 2005
New Revision: 2049
Modified:
rt/branches/3.2-RELEASE/ (props changed)
rt/branches/3.2-RELEASE/html/Elements/CollectionAsTable/ParseFormat
rt/branches/3.2-RELEASE/html/Elements/CollectionAsTable/Row
rt/branches/3.2-RELEASE/html/Elements/RT__Ticket/ColumnMap
Log:
r2568 at hualien: jesse | 2005-01-06T21:57:40.068650Z
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.2-RELEASE/html/Elements/CollectionAsTable/ParseFormat
==============================================================================
--- rt/branches/3.2-RELEASE/html/Elements/CollectionAsTable/ParseFormat (original)
+++ rt/branches/3.2-RELEASE/html/Elements/CollectionAsTable/ParseFormat Thu Jan 6 17:00:03 2005
@@ -43,15 +43,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.2-RELEASE/html/Elements/CollectionAsTable/Row
==============================================================================
--- rt/branches/3.2-RELEASE/html/Elements/CollectionAsTable/Row (original)
+++ rt/branches/3.2-RELEASE/html/Elements/CollectionAsTable/Row Thu Jan 6 17:00:03 2005
@@ -68,7 +68,8 @@
next;
}
$item++;
- $m->out('<td class="collection-as-table" align="left">');
+ 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.2-RELEASE/html/Elements/RT__Ticket/ColumnMap
==============================================================================
--- rt/branches/3.2-RELEASE/html/Elements/RT__Ticket/ColumnMap (original)
+++ rt/branches/3.2-RELEASE/html/Elements/RT__Ticket/ColumnMap Thu Jan 6 17:00:03 2005
@@ -307,12 +307,8 @@
},
};
-
-
-
-# }}}
-$m->comp( '/Elements/Callback', COLUMN_MAP => $COLUMN_MAP, _CallbackName => 'ColumnMap');
</%ONCE>
<%init>
+$m->comp( '/Elements/Callback', COLUMN_MAP => $COLUMN_MAP, _CallbackName => 'ColumnMap');
return ColumnMap($Name, $Attr);
</%init>
More information about the Rt-commit
mailing list