Bug 10777: (follow-up) improve CSS3 for Zebra-striping report email output
authorGalen Charlton <gmc@esilibrary.com>
Tue, 11 Mar 2014 14:57:26 +0000 (14:57 +0000)
committerGalen Charlton <gmc@esilibrary.com>
Tue, 11 Mar 2014 14:57:26 +0000 (14:57 +0000)
This patch improves the CSS used to attempt to Zebra-stripe the
output of emailed reports.  This will work with some email clients,
but other email clients (e.g., Gmail) don't handle style elements in the
body or head element.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
misc/cronjobs/runreport.pl

index 18e175d..41e9761 100755 (executable)
@@ -244,7 +244,7 @@ foreach my $report_id (@ARGV) {
     if ($email){
         my %mail;
         if ($format eq 'html') {
-                $message = "<html><head><style>tr:nth-child(n+1) { background-color: #ccc;}</style></head><body>$message</body></html>";
+                $message = "<html><head><style>tr:nth-child(2n+1) { background-color: #ccc;}</style></head><body>$message</body></html>";
            %mail = (
               To      => $to,
               From    => $from,