[Rt-commit] rt branch, 4.0/blank-search-column, created. rt-4.0.4-114-gc75589a

Kevin Falcone falcone at bestpractical.com
Wed Dec 7 18:17:28 EST 2011


The branch, 4.0/blank-search-column has been created
        at  c75589acdac30becd9e3ce2ff3ae2340e3c7d526 (commit)

- Log -----------------------------------------------------------------
commit 08da9c77c0d2d27db49dd10ad02952b4eead1018
Author: sinky <marco at my-azur.de>
Date:   Wed Nov 9 09:07:33 2011 +0100

    Added ability to add a blank column on the GUI

diff --git a/share/html/Search/Elements/BuildFormatString b/share/html/Search/Elements/BuildFormatString
index 89ac642..1230a48 100644
--- a/share/html/Search/Elements/BuildFormatString
+++ b/share/html/Search/Elements/BuildFormatString
@@ -96,6 +96,7 @@ my @fields = qw(
     Bookmark
 
     NEWLINE
+    NBSP
 ); # loc_qw
 
 $m->callback( CallbackOnce => 1, CallbackName => 'SetFieldsOnce', Fields => \@fields );

commit c75589acdac30becd9e3ce2ff3ae2340e3c7d526
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Wed Dec 7 18:15:20 2011 -0500

    Adding NBSP as a column in 08da9c7 adds a warning
    
    CollectionAsTable/Row tries to look up the style and align data for each
    column using the attribute/last_attribute of the column.  NEWLINE and
    NBSP only set title before because NEWLINE was hardcoded to open a new
    <tr> and NBSP was only used by core RT in the Titles of collection
    lists.
    
    Setting last_attribute allows it to correctly fall through and print
    nothing in the <td></td> without warning about undef values.

diff --git a/share/html/Elements/CollectionAsTable/ParseFormat b/share/html/Elements/CollectionAsTable/ParseFormat
index e9d3143..e56f919 100644
--- a/share/html/Elements/CollectionAsTable/ParseFormat
+++ b/share/html/Elements/CollectionAsTable/ParseFormat
@@ -77,6 +77,7 @@ while ($Format =~ /($RE{delimited}{-delim=>qq{\'"}}|[{}\w.]+)/go) {
     }
     elsif ( $col =~ /^__(NEWLINE|NBSP)__$/ || $col =~ /^(NEWLINE|NBSP)$/ ) {
         $colref->{'title'} = $1;
+        $colref->{'last_attribute'} = '';
     }
     elsif ( $col =~ /__(.*?)__/io ) {
         my @subcols;

-----------------------------------------------------------------------


More information about the Rt-commit mailing list