diff -r 3dc3ad02d091 -r aaed3f813ef8 web/htmlwidgets.py --- a/web/htmlwidgets.py Fri Feb 26 13:12:01 2010 +0100 +++ b/web/htmlwidgets.py Fri Feb 26 13:19:14 2010 +0100 @@ -15,7 +15,7 @@ from logilab.mtconverter import xml_escape from cubicweb.utils import UStringIO -from cubicweb.uilib import toggle_action, limitsize, htmlescape +from cubicweb.uilib import toggle_action, htmlescape from cubicweb.web import jsonize # XXX HTMLWidgets should have access to req (for datadir / static urls, @@ -316,7 +316,7 @@ self.w(u'%s' % (' '.join(attrs), column.name)) self.w(u'') self.w(u'') - for rowindex, row in enumerate(self.model.get_rows()): + for rowindex in xrange(len(self.model.get_rows())): klass = (rowindex%2==1) and 'odd' or 'even' self.w(u'' % (klass, self.highlight)) for column, sortvalue in self.itercols(rowindex): @@ -373,14 +373,10 @@ budget = self.budget if budget == 0: pourcent = 100 - todo_pourcent = 0 else: pourcent = done*100./budget - todo_pourcent = min(todo*100./budget, 100-pourcent) - bar_pourcent = pourcent if pourcent > 100.1: color = 'red' - bar_pourcent = 100 elif todo+done > self.red_threshold*budget: color = 'red' elif todo+done > self.orange_threshold*budget: