fixed issue 1761:Add <col> elements to the grid for easier column formatting, thanks Anthony
This commit is contained in:
@@ -1 +1 @@
|
||||
Version 2.7.4-stable+timestamp.2013.11.01.17.44.38
|
||||
Version 2.7.4-stable+timestamp.2013.11.01.18.00.16
|
||||
|
||||
+9
-1
@@ -2411,7 +2411,9 @@ class SQLFORM(FORM):
|
||||
limitby = None
|
||||
|
||||
if rows:
|
||||
htmltable = TABLE(THEAD(head))
|
||||
cols = [TAG.col(_id=str(c).replace('.','-'),data={'position':i})
|
||||
for i,c in enumerate(columns)]
|
||||
htmltable = TABLE(TAG.colgroup(*cols),THEAD(head))
|
||||
tbody = TBODY()
|
||||
numrec = 0
|
||||
for row in rows:
|
||||
@@ -2863,6 +2865,7 @@ class SQLTABLE(TABLE):
|
||||
selectid=None,
|
||||
renderstyle=False,
|
||||
cid=None,
|
||||
colgroup=False,
|
||||
**attributes
|
||||
):
|
||||
|
||||
@@ -2886,6 +2889,11 @@ class SQLTABLE(TABLE):
|
||||
(t, f) = c.split('.')
|
||||
field = sqlrows.db[t][f]
|
||||
headers[c] = field.label
|
||||
if colgroup:
|
||||
cols = [TAG.col(_id=c.replace('.','-'),data={'position':i})
|
||||
for i,c in enumerate(columns)]
|
||||
components.append(TAG.colgroup(*cols))
|
||||
|
||||
if headers is None:
|
||||
headers = {}
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user