From 43a06151e47d2c59b833cbd8c26d97865ee850b6 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Thu, 7 Jun 2012 00:56:06 -0700 Subject: starting to work... --- rt/share/html/Elements/CollectionAsTable/Header | 4 ++-- rt/share/html/Elements/CollectionAsTable/ParseFormat | 3 ++- rt/share/html/Elements/CollectionAsTable/Row | 7 +++---- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'rt/share/html/Elements/CollectionAsTable') diff --git a/rt/share/html/Elements/CollectionAsTable/Header b/rt/share/html/Elements/CollectionAsTable/Header index 878a77e70..81d8bbb27 100644 --- a/rt/share/html/Elements/CollectionAsTable/Header +++ b/rt/share/html/Elements/CollectionAsTable/Header @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -126,7 +126,7 @@ foreach my $col ( @Format ) { my $new_order = 'ASC'; $new_order = $Order[0] eq 'ASC'? 'DESC': 'ASC' - if $OrderBy[0] && $OrderBy[0] eq $attr; + if $OrderBy[0] && ($OrderBy[0] eq $attr or "$attr|$OrderBy[0]" =~ /^(Created|id)\|(Created|id)$/); $m->out( '{'title'} = $1; + $colref->{'last_attribute'} = ''; } elsif ( $col =~ /__(.*?)__/io ) { my @subcols; diff --git a/rt/share/html/Elements/CollectionAsTable/Row b/rt/share/html/Elements/CollectionAsTable/Row index 9037e5d11..f91520952 100644 --- a/rt/share/html/Elements/CollectionAsTable/Row +++ b/rt/share/html/Elements/CollectionAsTable/Row @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -60,7 +60,6 @@ $Classes => '' $m->out( '' . "\n" ); -use HTML::Entities; my $item; foreach my $column (@Format) { if ( defined $column->{title} && $column->{title} eq 'NEWLINE' ) { @@ -77,7 +76,7 @@ foreach my $column (@Format) { next; } - my $class = $column->{class} ? encode_entities( $column->{class}, q{'"&<>} ) : 'collection-as-table'; + my $class = $column->{class} ? $m->interp->apply_escapes($column->{class}, 'h') : 'collection-as-table'; $m->out(qq{ [$record, $i], ); } - s/\n/
/gs for grep { defined } @out; + s/\n/
/gs for grep defined $_, @out; $m->out( $_ .'="'. $m->interp->apply_escapes( $attrs{$_} => 'h' ) .'"' ) foreach grep $attrs{$_}, qw(align style colspan); -- cgit v1.2.1 From c24d6e2242ae0e026684b8f95decf156aba6e75e Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Thu, 7 Jun 2012 16:55:45 -0700 Subject: rt 4.0.6 --- rt/share/html/Elements/CollectionAsTable/Header | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'rt/share/html/Elements/CollectionAsTable') diff --git a/rt/share/html/Elements/CollectionAsTable/Header b/rt/share/html/Elements/CollectionAsTable/Header index 81d8bbb27..20586f9c3 100644 --- a/rt/share/html/Elements/CollectionAsTable/Header +++ b/rt/share/html/Elements/CollectionAsTable/Header @@ -129,11 +129,11 @@ foreach my $col ( @Format ) { if $OrderBy[0] && ($OrderBy[0] eq $attr or "$attr|$OrderBy[0]" =~ /^(Created|id)\|(Created|id)$/); $m->out( - '
interp->apply_escapes($BaseURL . $m->comp( '/Elements/QueryString', %$generic_query_args, OrderBy => $attr, Order => $new_order - ) + ), 'h') . '">'. loc($title) .'' ); } -- cgit v1.2.1