[Erp5-report] r35904 ivan - in /erp5/trunk/products/ERP5/bootstrap/erp5_core: SkinTemplateI...

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Jun 2 16:44:51 CEST 2010


Author: ivan
Date: Wed Jun  2 16:44:49 2010
New Revision: 35904

URL: http://svn.erp5.org?rev=35904&view=rev
Log:
Make it possible to edit portal type icon from ERP5 UI.
Encode again as utf-8 random text excerpts.

Added:
    erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BaseType_view/my_type_icon.xml
Modified:
    erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BaseType_view.xml
    erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_showFoundText.xml
    erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BaseType_view.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BaseType_view.xml?rev=35904&r1=35903&r2=35904&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BaseType_view.xml [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BaseType_view.xml [utf8] Wed Jun  2 16:44:49 2010
@@ -105,6 +105,7 @@
                         <string>my_type_acquire_local_role</string>
                         <string>my_type_property_sheet_list</string>
                         <string>my_type_base_category_list</string>
+                        <string>my_type_icon</string>
                       </list>
                     </value>
                 </item>

Added: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BaseType_view/my_type_icon.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BaseType_view/my_type_icon.xml?rev=35904&view=auto
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BaseType_view/my_type_icon.xml (added)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BaseType_view/my_type_icon.xml [utf8] Wed Jun  2 16:44:49 2010
@@ -1,0 +1,99 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
+        <tuple/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>delegated_list</string> </key>
+            <value>
+              <list>
+                <string>title</string>
+              </list>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>my_type_icon</string> </value>
+        </item>
+        <item>
+            <key> <string>message_values</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>external_validator_failed</string> </key>
+                    <value> <string>The input failed the external validator.</string> </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+        <item>
+            <key> <string>overrides</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>field_id</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>form_id</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>target</string> </key>
+                    <value> <string></string> </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+        <item>
+            <key> <string>tales</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>field_id</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>form_id</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>target</string> </key>
+                    <value> <string></string> </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+        <item>
+            <key> <string>values</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>field_id</string> </key>
+                    <value> <string>my_string_field</string> </value>
+                </item>
+                <item>
+                    <key> <string>form_id</string> </key>
+                    <value> <string>Base_viewFieldLibrary</string> </value>
+                </item>
+                <item>
+                    <key> <string>target</string> </key>
+                    <value> <string>Click to edit the target</string> </value>
+                </item>
+                <item>
+                    <key> <string>title</string> </key>
+                    <value> <string>Icon</string> </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_showFoundText.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_showFoundText.xml?rev=35904&r1=35903&r2=35904&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_showFoundText.xml [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_showFoundText.xml [utf8] Wed Jun  2 16:44:49 2010
@@ -63,6 +63,7 @@
 """\n
 from Products.ERP5.Document.Document import NotConvertedError\n
 \n
+encoding = \'utf-8\'\n
 is_gadget_mode = context.REQUEST.get(\'is_gadget_mode\', 0)\n
 \n
 if is_gadget_mode:\n
@@ -73,9 +74,9 @@
 def getRandomDocumentTextExcerpt(document_text):\n
   # try to get somewhat arbitrary choice of searchable attrs\n
   if isinstance(document_text, str) and document_text!=\'\':\n
-    document_text = document_text.decode(\'utf-8\', \'ignore\')\n
+    document_text = document_text.decode(encoding, \'ignore\')\n
     start = min(len(document_text) - 300, 200)\n
-    return \'... %s ...\' %document_text[start:start + max_text_length]\n
+    return \'... %s ...\' %document_text[start:start + max_text_length].encode(encoding)\n
   else:\n
     return \'\'\n
 \n
@@ -124,8 +125,8 @@
   result = \' \'.join(map(str, found_text_fragments))\n
 \n
   # Document may contains charactors which utf8 codec cannot decode.\n
-  unicode_result = result.decode(\'utf-8\', \'ignore\')\n
-  result = unicode_result.encode(\'utf-8\')\n
+  unicode_result = result.decode(encoding, \'ignore\')\n
+  result = unicode_result.encode(encoding)\n
 \n
   return result\n
 
@@ -172,6 +173,7 @@
                             <string>max_text_length</string>
                             <string>Products.ERP5.Document.Document</string>
                             <string>NotConvertedError</string>
+                            <string>encoding</string>
                             <string>_getattr_</string>
                             <string>context</string>
                             <string>is_gadget_mode</string>

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision?rev=35904&r1=35903&r2=35904&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision [utf8] Wed Jun  2 16:44:49 2010
@@ -1,1 +1,1 @@
-1596
+1597




More information about the Erp5-report mailing list