[Erp5-report] r39191 gabriel - /erp5/trunk/products/ERP5Form/EditorField.py

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Oct 14 19:01:35 CEST 2010


Author: gabriel
Date: Thu Oct 14 19:01:31 2010
New Revision: 39191

URL: http://svn.erp5.org?rev=39191&view=rev
Log:
add Xinha option and implement code to render xinha view

Modified:
    erp5/trunk/products/ERP5Form/EditorField.py

Modified: erp5/trunk/products/ERP5Form/EditorField.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Form/EditorField.py?rev=39191&r1=39190&r2=39191&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Form/EditorField.py [utf8] (original)
+++ erp5/trunk/products/ERP5Form/EditorField.py [utf8] Thu Oct 14 19:01:31 2010
@@ -70,7 +70,8 @@ class EditorWidget(Widget.TextAreaWidget
                                    size=1,
                                    items=[('Standard Text Area', 'text_area'),
                                           ('FCK Editor', 'fck_editor'), 
-                                          ('Bespin Editor', 'bespin')])
+                                          ('Bespin Editor', 'bespin'),
+                                          ('Xinha Editor', 'xinha')])
 
   def render(self, field, key, value, REQUEST, render_prefix=None):
     """
@@ -93,6 +94,16 @@ class EditorWidget(Widget.TextAreaWidget
                           'inputvalue' : value,
                           'inputname'  : key
                         })
+    elif text_editor == "xinha":
+      xinha_support = getattr(here, 'xinha_support', None)
+      if xinha_support is None:
+        return Widget.TextAreaWidget.render(self, field, key, value, REQUEST)
+      return xinha_support.pt_render(
+           extra_context= {
+                          'field'       : field,
+                          'field_value' : value,
+                          'field_name'  : key
+                        })
     else:
       return here.fckeditor_wysiwyg_support.pt_render(
            extra_context= {




More information about the Erp5-report mailing list