summaryrefslogtreecommitdiff
path: root/watchnews
diff options
context:
space:
mode:
authorYves Fischer <yvesf-git@xapek.org>2015-11-22 02:19:00 +0100
committerYves Fischer <yvesf-git@xapek.org>2015-11-22 02:19:00 +0100
commitd2794bf7560db5784c8eeda31bf574c7526de88b (patch)
tree46a849796b64312d4976150d4f94d28db7bb9915 /watchnews
parent8a09780ea60fe4a67a5e8fdac23156da7d0814a3 (diff)
downloadwatchnews-d2794bf7560db5784c8eeda31bf574c7526de88b.tar.gz
watchnews-d2794bf7560db5784c8eeda31bf574c7526de88b.zip
split table
Diffstat (limited to 'watchnews')
-rw-r--r--watchnews/web.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/watchnews/web.py b/watchnews/web.py
index 05ffcdc..09fb042 100644
--- a/watchnews/web.py
+++ b/watchnews/web.py
@@ -66,7 +66,8 @@ class DiffSupport:
class Difftable(html.div, DiffSupport):
def __init__(self, to_version, from_version=None, inline_style=False):
- super().__init__()
+ html.div.__init__(self)
+ DiffSupport.__init__(self)
self.xmlname = "div"
self.inline_style = inline_style
if from_version == None:
@@ -95,7 +96,7 @@ class Difftable(html.div, DiffSupport):
from_version.title, to_version.title)
diff = difflib._mdiff(from_text, to_text)
- self.append(html.table(
+ self.append(html.div(html.table(
html.tr(html.th("Title"),
html.td(from_difftitle),
html.td(to_difftitle), **{'class': 'textdiff'}),
@@ -105,8 +106,8 @@ class Difftable(html.div, DiffSupport):
html.tr(html.th("Link"),
html.td(html.a(from_version.url, href=from_version.url)),
html.td(html.a(to_version.url, href=to_version.url))),
- html.tr(html.th("Text", colspan=3)),
- html.tr(html.td(self._diff_lines(from_text, to_text), colspan=3)),
+ html.tr(html.th("Text", colspan=3))),
+ self._diff_lines(from_text, to_text),
**{'class': "versiondiff"}
))
@@ -114,7 +115,8 @@ class Difftable(html.div, DiffSupport):
class ItemWidget(html.div, DiffSupport):
def __init__(self, item):
- super().__init__()
+ html.div.__init__(self)
+ DiffSupport.__init__(self)
self.append(html.h2(html.a(item.title,
href=url_for('item', id=item.id))))
versionsFrom = [None] + list(item.versions)[:-1]