author | Sylvain Thénault <sylvain.thenault@logilab.fr> |
Wed, 14 Apr 2010 17:31:41 +0200 | |
changeset 5250 | 1c0eb5f74fd4 |
parent 4786 | df2a12bfbab6 |
child 5421 | 8167de96c523 |
permissions | -rw-r--r-- |
0 | 1 |
"""html widgets |
2 |
||
4023
eae23c40627a
drop common subpackage
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
3798
diff
changeset
|
3 |
those are in cubicweb since we need to know available widgets at schema |
0 | 4 |
serialization time |
5 |
||
6 |
:organization: Logilab |
|
4212
ab6573088b4a
update copyright: welcome 2010
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
3798
diff
changeset
|
7 |
:copyright: 2001-2010 LOGILAB S.A. (Paris, FRANCE), license is LGPL v2. |
0 | 8 |
:contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr |
1977
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1885
diff
changeset
|
9 |
:license: GNU Lesser General Public License, v2.1 - http://www.gnu.org/licenses |
0 | 10 |
""" |
11 |
||
4211
eac4b23a42ff
[views] backport progressbar template from shingouz
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
4183
diff
changeset
|
12 |
from math import floor |
eac4b23a42ff
[views] backport progressbar template from shingouz
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
4183
diff
changeset
|
13 |
import random |
eac4b23a42ff
[views] backport progressbar template from shingouz
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
4183
diff
changeset
|
14 |
|
2312
af4d8f75c5db
use xml_escape
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
1977
diff
changeset
|
15 |
from logilab.mtconverter import xml_escape |
0 | 16 |
|
940
15dcdc863965
fix imports : common.utils -> utils
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
843
diff
changeset
|
17 |
from cubicweb.utils import UStringIO |
4719
aaed3f813ef8
kill dead/useless code as suggested by pylint
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
4252
diff
changeset
|
18 |
from cubicweb.uilib import toggle_action, htmlescape |
3796
f4e924106fdc
added SimpleModel for TableWidget
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
2996
diff
changeset
|
19 |
from cubicweb.web import jsonize |
0 | 20 |
|
203
60cd67acf7fd
FacetItem now takes req as first parameter of __init__, THIS IS BACKWARD INCOMPATIBLE
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
0
diff
changeset
|
21 |
# XXX HTMLWidgets should have access to req (for datadir / static urls, |
60cd67acf7fd
FacetItem now takes req as first parameter of __init__, THIS IS BACKWARD INCOMPATIBLE
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
0
diff
changeset
|
22 |
# i18n strings, etc.) |
0 | 23 |
class HTMLWidget(object): |
24 |
||
25 |
def _initialize_stream(self, w=None): |
|
26 |
if w: |
|
27 |
self.w = w |
|
28 |
else: |
|
29 |
self._stream = UStringIO() |
|
30 |
self.w = self._stream.write |
|
31 |
||
32 |
def _render(self): |
|
33 |
raise NotImplementedError |
|
34 |
||
35 |
def render(self, w=None): |
|
36 |
self._initialize_stream(w) |
|
37 |
self._render() |
|
38 |
if w is None: |
|
39 |
return self._stream.getvalue() |
|
40 |
||
41 |
def is_empty(self): |
|
42 |
return False |
|
43 |
||
44 |
||
45 |
class BoxWidget(HTMLWidget): |
|
46 |
def __init__(self, title, id, items=None, _class="boxFrame", |
|
47 |
islist=True, shadow=True, escape=True): |
|
48 |
self.title = title |
|
49 |
self.id = id |
|
50 |
self.items = items or [] |
|
51 |
self._class = _class |
|
52 |
self.islist = islist |
|
53 |
self.shadow = shadow |
|
54 |
self.escape = escape |
|
55 |
||
56 |
def __len__(self): |
|
57 |
return len(self.items) |
|
58 |
||
59 |
def is_empty(self): |
|
60 |
return len(self) == 0 |
|
61 |
||
62 |
def append(self, item): |
|
63 |
self.items.append(item) |
|
64 |
||
2757
c8e28e1754f0
B [web.box] fix EditRelationBoxTemplate in case neither related nor unrelated
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
2312
diff
changeset
|
65 |
def extend(self, items): |
c8e28e1754f0
B [web.box] fix EditRelationBoxTemplate in case neither related nor unrelated
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
2312
diff
changeset
|
66 |
self.items.extend(items) |
c8e28e1754f0
B [web.box] fix EditRelationBoxTemplate in case neither related nor unrelated
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
2312
diff
changeset
|
67 |
|
1885
c2011d238e98
replace sideRelated with sideBox
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
1730
diff
changeset
|
68 |
title_class = 'boxTitle' |
0 | 69 |
main_div_class = 'boxContent' |
70 |
listing_class = 'boxListing' |
|
1698 | 71 |
|
0 | 72 |
def box_begin_content(self): |
73 |
self.w(u'<div class="%s">\n' % self.main_div_class) |
|
74 |
if self.islist: |
|
75 |
self.w(u'<ul class="%s">' % self.listing_class) |
|
76 |
||
77 |
def box_end_content(self): |
|
78 |
if self.islist: |
|
79 |
self.w(u'</ul>\n') |
|
80 |
self.w(u'</div>\n') |
|
81 |
if self.shadow: |
|
2996
866a2c135c33
B #345282 xhtml requires to use   instead of
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
2757
diff
changeset
|
82 |
self.w(u'<div class="shadow"> </div>') |
1698 | 83 |
|
0 | 84 |
def _render(self): |
85 |
if self.id: |
|
86 |
self.w(u'<div class="%s" id="%s">' % (self._class, self.id)) |
|
87 |
else: |
|
1698 | 88 |
self.w(u'<div class="%s">' % self._class) |
0 | 89 |
if self.title: |
90 |
if self.escape: |
|
2312
af4d8f75c5db
use xml_escape
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
1977
diff
changeset
|
91 |
title = '<span>%s</span>' % xml_escape(self.title) |
0 | 92 |
else: |
93 |
title = '<span>%s</span>' % self.title |
|
1885
c2011d238e98
replace sideRelated with sideBox
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
1730
diff
changeset
|
94 |
self.w(u'<div class="%s">%s</div>' % (self.title_class, title)) |
0 | 95 |
if self.items: |
96 |
self.box_begin_content() |
|
97 |
for item in self.items: |
|
98 |
item.render(self.w) |
|
99 |
self.box_end_content() |
|
100 |
self.w(u'</div>') |
|
101 |
||
102 |
||
103 |
class SideBoxWidget(BoxWidget): |
|
104 |
"""default CubicWeb's sidebox widget""" |
|
1885
c2011d238e98
replace sideRelated with sideBox
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
1730
diff
changeset
|
105 |
title_class = u'sideBoxTitle' |
0 | 106 |
main_div_class = u'sideBoxBody' |
107 |
listing_class = '' |
|
108 |
||
109 |
def __init__(self, title, id=None): |
|
110 |
super(SideBoxWidget, self).__init__(title, id=id, _class='sideBox', |
|
111 |
shadow=False) |
|
112 |
||
1698 | 113 |
|
0 | 114 |
class MenuWidget(BoxWidget): |
115 |
main_div_class = 'menuContent' |
|
116 |
listing_class = 'menuListing' |
|
117 |
||
118 |
def box_end_content(self): |
|
119 |
if self.islist: |
|
120 |
self.w(u'</ul>\n') |
|
121 |
self.w(u'</div>\n') |
|
1698 | 122 |
|
0 | 123 |
|
124 |
class RawBoxItem(HTMLWidget): |
|
125 |
"""a simpe box item displaying raw data""" |
|
126 |
def __init__(self, label, liclass=None): |
|
127 |
self.label = label |
|
128 |
self.liclass = liclass |
|
129 |
||
130 |
def _start_li(self): |
|
131 |
if self.liclass is None: |
|
132 |
return u'<li>' |
|
133 |
else: |
|
134 |
return u'<li class="%s">' % self.liclass |
|
1698 | 135 |
|
0 | 136 |
return self.label |
1698 | 137 |
|
0 | 138 |
def _render(self): |
139 |
self.w(u'%s%s</li>' % (self._start_li(), self.label)) |
|
140 |
||
141 |
||
142 |
class BoxMenu(RawBoxItem): |
|
143 |
"""a menu in a box""" |
|
144 |
link_class = 'boxMenu' |
|
1698 | 145 |
|
0 | 146 |
def __init__(self, label, items=None, isitem=True, liclass=None, ident=None, |
147 |
link_class=None): |
|
148 |
super(BoxMenu, self).__init__(label, liclass) |
|
149 |
self.items = items or [] |
|
150 |
self.isitem = isitem |
|
151 |
self.ident = ident or u'boxmenu_%s' % label.replace(' ', '_').replace("'", '') |
|
152 |
if link_class: |
|
153 |
self.link_class = link_class |
|
1698 | 154 |
|
0 | 155 |
def append(self, item): |
156 |
self.items.append(item) |
|
157 |
||
158 |
def _begin_menu(self, ident): |
|
159 |
self.w(u'<ul id="%s" class="hidden">' % ident) |
|
160 |
||
161 |
def _end_menu(self): |
|
162 |
self.w(u'</ul>') |
|
1698 | 163 |
|
0 | 164 |
def _render(self): |
165 |
if self.isitem: |
|
166 |
self.w(self._start_li()) |
|
167 |
ident = self.ident |
|
168 |
self.w(u'<a href="%s" class="%s">%s</a>' % ( |
|
169 |
toggle_action(ident), self.link_class, self.label)) |
|
170 |
self._begin_menu(ident) |
|
171 |
for item in self.items: |
|
172 |
item.render(self.w) |
|
173 |
self._end_menu() |
|
174 |
if self.isitem: |
|
175 |
self.w(u'</li>') |
|
176 |
||
177 |
||
178 |
class PopupBoxMenu(BoxMenu): |
|
179 |
"""like BoxMenu but uses div and specific css class |
|
180 |
in order to behave like a popup menu |
|
181 |
""" |
|
182 |
link_class = 'popupMenu' |
|
183 |
||
184 |
def _begin_menu(self, ident): |
|
185 |
self.w(u'<div class="popupWrapper"><div id="%s" class="hidden popup"><ul>' % ident) |
|
186 |
||
187 |
def _end_menu(self): |
|
188 |
self.w(u'</ul></div></div>') |
|
189 |
||
190 |
||
191 |
class BoxField(HTMLWidget): |
|
192 |
"""couples label / value meant to be displayed in a box""" |
|
193 |
def __init__(self, label, value): |
|
194 |
self.label = label |
|
195 |
self.value = value |
|
1698 | 196 |
|
0 | 197 |
def _render(self): |
2996
866a2c135c33
B #345282 xhtml requires to use   instead of
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
2757
diff
changeset
|
198 |
self.w(u'<li><div><span class="label">%s</span> ' |
1698 | 199 |
u'<span class="value">%s</span></div></li>' |
0 | 200 |
% (self.label, self.value)) |
201 |
||
202 |
class BoxSeparator(HTMLWidget): |
|
203 |
"""a menu separator""" |
|
1698 | 204 |
|
0 | 205 |
def _render(self): |
206 |
self.w(u'</ul><hr class="boxSeparator"/><ul>') |
|
207 |
||
208 |
||
209 |
class BoxLink(HTMLWidget): |
|
210 |
"""a link in a box""" |
|
211 |
def __init__(self, href, label, _class='', title='', ident='', escape=False): |
|
212 |
self.href = href |
|
213 |
if escape: |
|
2312
af4d8f75c5db
use xml_escape
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
1977
diff
changeset
|
214 |
self.label = xml_escape(label) |
0 | 215 |
else: |
216 |
self.label = label |
|
217 |
self._class = _class or '' |
|
218 |
self.title = title |
|
219 |
self.ident = ident |
|
220 |
||
221 |
def _render(self): |
|
222 |
link = u'<a href="%s" title="%s">%s</a>' % ( |
|
2312
af4d8f75c5db
use xml_escape
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
1977
diff
changeset
|
223 |
xml_escape(self.href), xml_escape(self.title), self.label) |
0 | 224 |
if self.ident: |
225 |
self.w(u'<li id="%s" class="%s">%s</li>\n' % (self.ident, self._class, link)) |
|
226 |
else: |
|
227 |
self.w(u'<li class="%s">%s</li>\n' % (self._class, link)) |
|
228 |
||
229 |
||
230 |
class BoxHtml(HTMLWidget): |
|
231 |
"""a form in a box""" |
|
232 |
def __init__(self, rawhtml): |
|
233 |
self.rawhtml = rawhtml |
|
234 |
||
235 |
def _render(self): |
|
236 |
self.w(self.rawhtml) |
|
237 |
||
238 |
||
239 |
class TableColumn(object): |
|
240 |
def __init__(self, name, rset_sortcol): |
|
241 |
""" |
|
242 |
:param name: the column's name |
|
243 |
:param rset_sortcol: the model's column used to sort this column view |
|
244 |
""" |
|
245 |
self.name = name |
|
246 |
self.cellrenderers = [] |
|
247 |
self.rset_sortcol = rset_sortcol |
|
248 |
self.cell_attrs = {} |
|
249 |
||
250 |
def append_renderer(self, cellvid, colindex): |
|
251 |
# XXX (adim) : why do we need colindex here ? |
|
252 |
self.cellrenderers.append( (cellvid, colindex) ) |
|
253 |
||
254 |
def add_attr(self, attr, value): |
|
255 |
self.cell_attrs[attr] = value |
|
256 |
||
3796
f4e924106fdc
added SimpleModel for TableWidget
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
2996
diff
changeset
|
257 |
class SimpleTableModel(object): |
f4e924106fdc
added SimpleModel for TableWidget
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
2996
diff
changeset
|
258 |
""" |
f4e924106fdc
added SimpleModel for TableWidget
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
2996
diff
changeset
|
259 |
uses a list of lists as a storage backend |
f4e924106fdc
added SimpleModel for TableWidget
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
2996
diff
changeset
|
260 |
|
f4e924106fdc
added SimpleModel for TableWidget
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
2996
diff
changeset
|
261 |
NB: the model expectes the cellvid passed to |
f4e924106fdc
added SimpleModel for TableWidget
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
2996
diff
changeset
|
262 |
TableColumn.append_renderer to be a callable accepting a single |
f4e924106fdc
added SimpleModel for TableWidget
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
2996
diff
changeset
|
263 |
argument and returning a unicode object |
f4e924106fdc
added SimpleModel for TableWidget
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
2996
diff
changeset
|
264 |
""" |
f4e924106fdc
added SimpleModel for TableWidget
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
2996
diff
changeset
|
265 |
def __init__(self, rows): |
f4e924106fdc
added SimpleModel for TableWidget
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
2996
diff
changeset
|
266 |
self._rows = rows |
f4e924106fdc
added SimpleModel for TableWidget
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
2996
diff
changeset
|
267 |
|
f4e924106fdc
added SimpleModel for TableWidget
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
2996
diff
changeset
|
268 |
|
f4e924106fdc
added SimpleModel for TableWidget
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
2996
diff
changeset
|
269 |
def get_rows(self): |
f4e924106fdc
added SimpleModel for TableWidget
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
2996
diff
changeset
|
270 |
return self._rows |
f4e924106fdc
added SimpleModel for TableWidget
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
2996
diff
changeset
|
271 |
|
f4e924106fdc
added SimpleModel for TableWidget
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
2996
diff
changeset
|
272 |
def render_cell(self, cellvid, rowindex, colindex, w): |
f4e924106fdc
added SimpleModel for TableWidget
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
2996
diff
changeset
|
273 |
value = self._rows[rowindex][colindex] |
f4e924106fdc
added SimpleModel for TableWidget
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
2996
diff
changeset
|
274 |
w(cellvid(value)) |
f4e924106fdc
added SimpleModel for TableWidget
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
2996
diff
changeset
|
275 |
|
f4e924106fdc
added SimpleModel for TableWidget
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
2996
diff
changeset
|
276 |
@htmlescape |
f4e924106fdc
added SimpleModel for TableWidget
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
2996
diff
changeset
|
277 |
@jsonize |
f4e924106fdc
added SimpleModel for TableWidget
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
2996
diff
changeset
|
278 |
def sortvalue(self, rowindex, colindex): |
f4e924106fdc
added SimpleModel for TableWidget
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
2996
diff
changeset
|
279 |
value = self._rows[rowindex][colindex] |
f4e924106fdc
added SimpleModel for TableWidget
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
2996
diff
changeset
|
280 |
if value is None: |
f4e924106fdc
added SimpleModel for TableWidget
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
2996
diff
changeset
|
281 |
return u'' |
f4e924106fdc
added SimpleModel for TableWidget
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
2996
diff
changeset
|
282 |
elif isinstance(value, int): |
4721
8f63691ccb7f
pylint style fixes
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
4719
diff
changeset
|
283 |
return u'%09d' % value |
3796
f4e924106fdc
added SimpleModel for TableWidget
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
2996
diff
changeset
|
284 |
else: |
f4e924106fdc
added SimpleModel for TableWidget
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
2996
diff
changeset
|
285 |
return unicode(value) |
f4e924106fdc
added SimpleModel for TableWidget
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
2996
diff
changeset
|
286 |
|
0 | 287 |
|
288 |
class TableWidget(HTMLWidget): |
|
3798
d2c27621cc81
[doc] added note about the required js and css in TableWidget
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
3797
diff
changeset
|
289 |
""" |
d2c27621cc81
[doc] added note about the required js and css in TableWidget
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
3797
diff
changeset
|
290 |
Display data in a Table with sortable column. |
0 | 291 |
|
3798
d2c27621cc81
[doc] added note about the required js and css in TableWidget
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
3797
diff
changeset
|
292 |
When using remember to include the required css and js with: |
d2c27621cc81
[doc] added note about the required js and css in TableWidget
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
3797
diff
changeset
|
293 |
|
4183
b5aa030bb2f9
use ._cw instead of .req (reintroduced by merge of stable)
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
4023
diff
changeset
|
294 |
self._cw.add_js('jquery.tablesorter.js') |
b5aa030bb2f9
use ._cw instead of .req (reintroduced by merge of stable)
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
4023
diff
changeset
|
295 |
self._cw.add_css(('cubicweb.tablesorter.css', 'cubicweb.tableview.css')) |
3798
d2c27621cc81
[doc] added note about the required js and css in TableWidget
Alexandre Fayolle <alexandre.fayolle@logilab.fr>
parents:
3797
diff
changeset
|
296 |
""" |
0 | 297 |
highlight = "onmouseover=\"addElementClass(this, 'highlighted');\" " \ |
298 |
"onmouseout=\"removeElementClass(this, 'highlighted');\"" |
|
1698 | 299 |
|
0 | 300 |
def __init__(self, model): |
301 |
self.model = model |
|
302 |
self.columns = [] |
|
303 |
||
304 |
def append_column(self, column): |
|
305 |
""" |
|
306 |
:type column: TableColumn |
|
307 |
""" |
|
308 |
self.columns.append(column) |
|
309 |
||
310 |
def _render(self): |
|
311 |
self.w(u'<table class="listing">') |
|
312 |
self.w(u'<thead>') |
|
313 |
self.w(u'<tr class="header">') |
|
314 |
for column in self.columns: |
|
315 |
attrs = ('%s="%s"' % (name, value) for name, value in column.cell_attrs.iteritems()) |
|
316 |
self.w(u'<th %s>%s</th>' % (' '.join(attrs), column.name)) |
|
317 |
self.w(u'</tr>') |
|
318 |
self.w(u'</thead><tbody>') |
|
4719
aaed3f813ef8
kill dead/useless code as suggested by pylint
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
4252
diff
changeset
|
319 |
for rowindex in xrange(len(self.model.get_rows())): |
0 | 320 |
klass = (rowindex%2==1) and 'odd' or 'even' |
321 |
self.w(u'<tr class="%s" %s>' % (klass, self.highlight)) |
|
322 |
for column, sortvalue in self.itercols(rowindex): |
|
323 |
attrs = dict(column.cell_attrs) |
|
324 |
attrs["cubicweb:sortvalue"] = 'json:' + sortvalue |
|
325 |
attrs = ('%s="%s"' % (name, value) for name, value in attrs.iteritems()) |
|
326 |
self.w(u'<td %s>' % (' '.join(attrs))) |
|
327 |
for cellvid, colindex in column.cellrenderers: |
|
1730
cec526a96535
fix 'render' method name conflict
sylvain.thenault@logilab.fr
parents:
1698
diff
changeset
|
328 |
self.model.render_cell(cellvid, rowindex, colindex, w=self.w) |
0 | 329 |
self.w(u'</td>') |
330 |
self.w(u'</tr>') |
|
331 |
self.w(u'</tbody>') |
|
332 |
self.w(u'</table>') |
|
333 |
||
334 |
def itercols(self, rowindex): |
|
335 |
for column in self.columns: |
|
336 |
yield column, self.model.sortvalue(rowindex, column.rset_sortcol) |
|
337 |
||
338 |