diff options
author | Alex Vandiver <alexmv@bestpractical.com> | 2013-07-10 11:04:04 +0400 |
---|---|---|
committer | Alex Vandiver <alexmv@bestpractical.com> | 2013-07-10 11:04:04 +0400 |
commit | 8bf7f5962ba59693f20b46a7f96432987ecbc6f9 (patch) | |
tree | 295532938f0b1267bb898263d2fc05599593ea36 | |
parent | 4d441dfdc36908f68046204b84946595e0eaaeb3 (diff) | |
parent | 0a0744445fdda233c4e2c6a17e1c5603e6efd73e (diff) |
Merge branch '4.2/chart-tables'rt-4.1.17
-rw-r--r-- | lib/RT/Report/Tickets.pm | 5 | ||||
-rw-r--r-- | share/html/Search/Elements/ChartTable | 2 | ||||
-rw-r--r-- | share/static/css/base/charts.css | 7 |
3 files changed, 13 insertions, 1 deletions
diff --git a/lib/RT/Report/Tickets.pm b/lib/RT/Report/Tickets.pm index dee21c003f..4fe6127134 100644 --- a/lib/RT/Report/Tickets.pm +++ b/lib/RT/Report/Tickets.pm @@ -917,13 +917,16 @@ sub FormatTable { } @footer = ({ even => ++$i%2, cells => []}); + my $g = 0; foreach my $column ( @{ $columns{'Groups'} } ) { $i = 0; my $last; while ( my $entry = $self->Next ) { my $value = $entry->LabelValue( $column ); if ( !$last || $last->{'value'} ne $value ) { - push @{ $body[ $i++ ]{'cells'} }, $last = { type => 'label', value => $value, }; + push @{ $body[ $i++ ]{'cells'} }, $last = { type => 'label', value => $value }; + $last->{even} = $g++ % 2 + unless $column eq $columns{'Groups'}[-1]; } else { $i++; diff --git a/share/html/Search/Elements/ChartTable b/share/html/Search/Elements/ChartTable index a9557cd2b8..09378b9f66 100644 --- a/share/html/Search/Elements/ChartTable +++ b/share/html/Search/Elements/ChartTable @@ -79,6 +79,8 @@ foreach my $section (qw(thead tbody tfoot)) { my @class = ('collection-as-table'); push @class, ($cell->{'type'}) unless $cell->{'type'} eq 'head'; + push @class, $cell->{'even'} ? 'evenline' : 'oddline' + if defined $cell->{'even'}; $m->out(' class="'. $eh->( join ' ', @class ) .'"'); foreach my $dir ( grep $cell->{$_}, qw(rowspan colspan) ) { diff --git a/share/static/css/base/charts.css b/share/static/css/base/charts.css index c1b751b572..31baf7ceee 100644 --- a/share/static/css/base/charts.css +++ b/share/static/css/base/charts.css @@ -19,3 +19,10 @@ .chart-wrapper .collection-as-table th { text-shadow: 0 0 3px #ddd; } + +.chart-wrapper .collection-as-table tr th.evenline { + background: #eee; +} +.chart-wrapper .collection-as-table tr th.oddline { + background: #ddd; +} |