mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-12-01 12:03:55 +01:00
see #78
At last something that works pretty well under firefox and with multiple selection possible (using Mootools HtmlTable.Select). There are some problems with IE and Chrome (the position: relative on td elements is not well supported). Mootools update (1.3) close #109 Checking limit when creating/updating a mailbox.
This commit is contained in:
+16
-1
@@ -41,6 +41,13 @@ class ImgColumn(Column):
|
||||
def render(self, value):
|
||||
return "<img src='%s' />" % value
|
||||
|
||||
class DivColumn(Column):
|
||||
def __str__(self):
|
||||
return ""
|
||||
|
||||
def render(self):
|
||||
return "<div> </div>"
|
||||
|
||||
class Table(object):
|
||||
tableid = ""
|
||||
|
||||
@@ -72,7 +79,15 @@ class Table(object):
|
||||
key = "img_%s" % c.name
|
||||
if key in row.keys():
|
||||
newcol["value"] = c.render(row[key])
|
||||
newcol["safe"] = True
|
||||
else:
|
||||
try:
|
||||
newcol["value"] = c.render(c.defvalue)
|
||||
except Exception:
|
||||
pass
|
||||
newcol["safe"] = True
|
||||
elif isinstance(c, DivColumn):
|
||||
newcol["value"] = c.render()
|
||||
newcol["safe"] = True
|
||||
elif row.has_key(c.name):
|
||||
if "class" in row.keys():
|
||||
newcol["cssclass"] += newcol["cssclass"] != "" \
|
||||
|
||||
Reference in New Issue
Block a user