diff --git a/gen/ui/appy.css b/gen/ui/appy.css index 9d81cb2..5b1d468 100644 --- a/gen/ui/appy.css +++ b/gen/ui/appy.css @@ -65,7 +65,7 @@ img {border: 0;} .list { border: 1px solid grey; margin-bottom: 3px;} .list td, .list th { border: 1px solid grey; padding-left: 5px; padding-right: 5px; padding-top: 3px;} -.list th { background-color: #cbcbcb; font-style: italic; font-weight: normal;} +.list th { background-color: #D4D4D4; font-style: italic; font-weight: normal;} .grid th { font-style: italic; font-weight: normal; border-bottom: 2px solid grey; padding: 2px 2px;} .grid td { padding-right: 5px; } diff --git a/gen/ui/gotoSource.png b/gen/ui/gotoSource.png index 0c65ca2..32cb1ef 100644 Binary files a/gen/ui/gotoSource.png and b/gen/ui/gotoSource.png differ diff --git a/gen/ui/widgets/list.pt b/gen/ui/widgets/list.pt index 118ed1f..e435f7c 100644 --- a/gen/ui/widgets/list.pt +++ b/gen/ui/widgets/list.pt @@ -18,10 +18,11 @@ The whole table, edit or view. - + tal:attributes="id python: 'list_%s' % name; + class python: isEdit and 'grid' or 'list'"> Header + Rows of data diff --git a/gen/ui/widgets/show.pt b/gen/ui/widgets/show.pt index 5cf53d4..f82bdb2 100644 --- a/gen/ui/widgets/show.pt +++ b/gen/ui/widgets/show.pt @@ -108,8 +108,8 @@ id tagId; name tagId"> First row: the tabs.
-
- - +
+ ' def endRow(self): - self.res += '' % self.tns + if not self.html: + self.res += '' % self.tns + else: + self.res += '' def startTable(self): - self.res += '<%stable %sname="%s">' % (self.tns, self.tns, self.name) - self.res += '<%stable-column %snumber-columns-repeated="%d"/>' % \ - (self.tns, self.tns, self.nbOfCols) + if not self.html: + self.res += '<%stable %sname="%s">' % (self.tns, self.tns, + self.name) + self.res += '<%stable-column %snumber-columns-repeated="%d"/>' % \ + (self.tns, self.tns, self.nbOfCols) + else: + css = '' + if self.name: css = ' class="%s"' % self.name + self.res += '' % css def endTable(self): - self.res += '' % self.tns + if not self.html: + self.res += '' % self.tns + else: + self.res += '
' % \ - (self.tns, self.tns, cellStyle, self.tns, span) - self.res += '<%sp %sstyle-name="%s">%s' % \ - (self.txns, self.txns, paraStyle, cgi.escape(str(content)), - self.txns) - self.res += '' % self.tns + if not self.html: + self.res += '<%stable-cell %sstyle-name="%s" ' \ + '%snumber-columns-spanned="%d">' % \ + (self.tns, self.tns, cellStyle, self.tns, span) + self.res += '<%sp %sstyle-name="%s">%s' % \ + (self.txns, self.txns, paraStyle, + cgi.escape(str(content)), self.txns) + self.res += '' % self.tns + else: + tag = header and 'th' or 'td' + self.res += '<%s colspan="%d">%s' % \ + (tag, span, cgi.escape(str(content)), tag) def startRow(self): - self.res += '<%stable-row>' % self.tns + if not self.html: + self.res += '<%stable-row>' % self.tns + else: + self.res += '
' def dumpFloat(self, number): return str(round(number, 2)) def get(self): '''Returns the whole table.''' - return self.res.decode('utf-8') + if self.html: + return self.res + else: + return self.res.decode('utf-8') # ------------------------------------------------------------------------------