changeset 531:f6a74f85b9d7

fix tableclass attr for gui editor imported from: moin--main--1.5--patch-535
author Thomas Waldmann <tw@waldmann-edv.de>
date Fri, 07 Apr 2006 20:45:45 +0000
parents ab842e426102
children 8d9c44948a7d
files ChangeLog MoinMoin/converter/text_html_text_x_moin.py MoinMoin/formatter/text_gedit.py docs/CHANGES
diffstat 4 files changed, 24 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Apr 07 19:41:47 2006 +0000
+++ b/ChangeLog	Fri Apr 07 20:45:45 2006 +0000
@@ -2,6 +2,21 @@
 # arch-tag: automatic-ChangeLog--arch@arch.thinkmo.de--2003-archives/moin--main--1.5
 #
 
+2006-04-07 21:45:45 GMT	Thomas Waldmann <tw@waldmann-edv.de>	patch-535
+
+    Summary:
+      fix tableclass attr for gui editor
+    Revision:
+      moin--main--1.5--patch-535
+
+    fix tableclass attr for gui editor
+    
+
+    modified files:
+     ChangeLog MoinMoin/converter/text_html_text_x_moin.py
+     MoinMoin/formatter/text_gedit.py docs/CHANGES
+
+
 2006-04-07 20:41:47 GMT	Thomas Waldmann <tw@waldmann-edv.de>	patch-534
 
     Summary:
--- a/MoinMoin/converter/text_html_text_x_moin.py	Fri Apr 07 19:41:47 2006 +0000
+++ b/MoinMoin/converter/text_html_text_x_moin.py	Fri Apr 07 20:45:45 2006 +0000
@@ -866,6 +866,8 @@
             result.append('tablealign="%s"' % value)
         if node.hasAttribute("style"):
             result.append('tablestyle="%s"' % node.getAttribute("style"))
+        if node.hasAttribute("class"):
+            result.append('tableclass="%s"' % node.getAttribute("class"))
         return " ".join(result)
 
     def _row_style(self, node):
--- a/MoinMoin/formatter/text_gedit.py	Fri Apr 07 19:41:47 2006 +0000
+++ b/MoinMoin/formatter/text_gedit.py	Fri Apr 07 20:45:45 2006 +0000
@@ -128,7 +128,7 @@
 
     def _style_to_attributes(self, attrs):
         if not attrs.has_key('style'):
-            return
+            return attrs
         unknown = []
         for entry in attrs['style'].split(';'):
             try:
@@ -148,8 +148,12 @@
         return attrs
 
     def _checkTableAttr(self, attrs, prefix):
+        #self.request.log(repr(attrs))
         attrs = text_html.Formatter._checkTableAttr(self, attrs, prefix)
-        return self._style_to_attributes(attrs)
+        #self.request.log(repr(attrs))
+        attrs = self._style_to_attributes(attrs)
+        #self.request.log(repr(attrs))
+        return attrs
 
     _allowed_table_attrs = {
         'table': ['class', 'id', 'style', 'bgcolor', 'width', ],
--- a/docs/CHANGES	Fri Apr 07 19:41:47 2006 +0000
+++ b/docs/CHANGES	Fri Apr 07 20:45:45 2006 +0000
@@ -54,6 +54,7 @@
       Martin Wilck for the patch. I didn't apply the <ol> patch, because this
       is no real problem, just a problem of a bad standard.
     * Fixed gui editor *bgcolor crash.
+    * Support/Fix tableclass attr with gui editor.
 
   Other changes:
     * Moved back UserPreferences action link from menu to top of page (renaming