From 8f99ce734d44999ce35fac868c2ae9f78aae43bb Mon Sep 17 00:00:00 2001 From: mdipierro Date: Fri, 21 Mar 2014 01:02:38 -0500 Subject: [PATCH] issue 1903:SQLTABLE - 'even' and 'odd' css classes are opposite to real row type, thanks Paolo --- VERSION | 2 +- gluon/sqlhtml.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index ecb3164c..de8a9a77 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.9.5-stable+timestamp.2014.03.20.17.51.58 +Version 2.9.5-stable+timestamp.2014.03.21.01.01.28 diff --git a/gluon/sqlhtml.py b/gluon/sqlhtml.py index 4b2cb4f3..e4a1b14a 100644 --- a/gluon/sqlhtml.py +++ b/gluon/sqlhtml.py @@ -2538,7 +2538,7 @@ class SQLFORM(FORM): trcols.append(row_buttons) if buttons_placement in ['left', 'both']: trcols.insert(0, row_buttons) - if numrec % 2 == 0: + if numrec % 2 == 1: classtr = 'w2p_even even' else: classtr = 'w2p_odd odd' @@ -2981,7 +2981,7 @@ class SQLTABLE(TABLE): tbody = [] for (rc, record) in enumerate(sqlrows): row = [] - if rc % 2 == 0: + if rc % 2 == 1: _class = 'w2p_even even' else: _class = 'w2p_odd odd'