listing: odd/even class should happen after keep_fn.

This commit is contained in:
Andre D
2013-05-20 12:14:07 -07:00
committed by bsimpson63
parent 399f0c691d
commit b8f0d49f48
2 changed files with 5 additions and 6 deletions

View File

@@ -108,7 +108,6 @@ class Builder(object):
types = {}
wrapped = []
count = 0
modlink = {}
modlabel = {}
@@ -214,11 +213,6 @@ class Builder(object):
if not item.verdict.endswith("-approved"):
w.link_notes.append(w.verdict)
w.rowstyle = getattr(w, 'rowstyle', "")
w.rowstyle += ' ' + ('even' if (count % 2) else 'odd')
count += 1
if c.user_is_admin and getattr(item, 'ip', None):
w.ip_span = ip_span(item.ip)
else:

View File

@@ -89,6 +89,11 @@ class Listing(object):
p.update({'after':next._fullname, 'before':None, 'count':acount})
self.after = next._fullname
self.next = (request.path + utils.query_string(p))
for count, thing in enumerate(self.things):
thing.rowstyle = getattr(thing, 'rowstyle', "")
thing.rowstyle += ' ' + ('even' if (count % 2) else 'odd')
#TODO: need name for template -- must be better way
return Wrapped(self)