From 962fe2ae261cffb50ce9e6e3e440d42c9918b7e6 Mon Sep 17 00:00:00 2001 From: Earl Miles Date: Fri, 25 Sep 2009 00:04:44 +0000 Subject: [PATCH] #458194 by voxpelli: Add first and last row classes to table style. --- CHANGELOG.txt | 1 + theme/theme.inc | 3 +++ 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 3f2c0278..522934d0 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -68,6 +68,7 @@ Views 2.x-dev o #534680 by dagmar: Visual indicator if checkbox will expand options. o #512650 by sdboyer: Multiple many to one arguments on the same relationship were not relationship safe. o #536994 by dboulet: Store result in variables for use in unformatted style. + o #458194 by voxpelli: Add first and last row classes to table style. Views 2.6 Bugs fixed: diff --git a/theme/theme.inc b/theme/theme.inc index db8b0602..8ff32929 100644 --- a/theme/theme.inc +++ b/theme/theme.inc @@ -377,6 +377,9 @@ function template_preprocess_views_view_table(&$vars) { $vars['row_classes'][$num][] = ($num % 2 == 0) ? 'odd' : 'even'; } + $vars['row_classes'][0][] = 'views-row-first'; + $vars['row_classes'][count($vars['row_classes']) - 1][] = 'views-row-last'; + $vars['class'] = 'views-table'; if (!empty($options['sticky'])) { drupal_add_js('misc/tableheader.js'); -- 2.22.2