[Erp5-report] r11298 - in /erp5/trunk/bt5/erp5_pdf_style: SkinTemplateItem/portal_skins/erp...

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Nov 14 18:34:56 CET 2006


Author: jerome
Date: Tue Nov 14 18:34:53 2006
New Revision: 11298

URL: http://svn.erp5.org?rev=11298&view=rev
Log:
When guessing column width, use the translated title of the column, not only the column itself.


Modified:
    erp5/trunk/bt5/erp5_pdf_style/SkinTemplateItem/portal_skins/erp5_pdf_style/ListBox_getColumnWithDict.xml
    erp5/trunk/bt5/erp5_pdf_style/bt/revision

Modified: erp5/trunk/bt5/erp5_pdf_style/SkinTemplateItem/portal_skins/erp5_pdf_style/ListBox_getColumnWithDict.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_pdf_style/SkinTemplateItem/portal_skins/erp5_pdf_style/ListBox_getColumnWithDict.xml?rev=11298&r1=11297&r2=11298&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_pdf_style/SkinTemplateItem/portal_skins/erp5_pdf_style/ListBox_getColumnWithDict.xml (original)
+++ erp5/trunk/bt5/erp5_pdf_style/SkinTemplateItem/portal_skins/erp5_pdf_style/ListBox_getColumnWithDict.xml Tue Nov 14 18:34:53 2006
@@ -14,7 +14,9 @@
       <dictionary>
         <item>
             <key> <string>Python_magic</string> </key>
-            <value> <string encoding="base64">O/INCg==</string> </value>
+            <value>
+              <none/>
+            </value>
         </item>
         <item>
             <key> <string>Script_magic</string> </key>
@@ -66,7 +68,9 @@
         </item>
         <item>
             <key> <string>_body</string> </key>
-            <value> <string># XXX this is just a copy / paste of the old implementation\n
+            <value> <string>N_ = context.Base_translateString\n
+\n
+# XXX this is just a copy / paste of the old implementation\n
 # dirty code : if we are in domain or report tree, just use the old one, otherwise\n
 # use the new one that gives better results in list mode.\n
 if is_domain_tree_mode or is_report_tree_mode : \n
@@ -136,13 +140,12 @@
   line_width = 0\n
   col_count = 0\n
   for column_id, column_property in listboxline.getColumnItemList():\n
-    if column_property is None:    \n
-      string_property = \'\'\n
-    else:\n
-      string_property = str(column_property)\n
+    string_property = str(column_property or \'\')\n
+    if listboxline.isStatLine():\n
+      string_property = "%s longer" % string_property\n
+    elif listboxline.isTitleLine():\n
+      string_property = str(N_(string_property))\n
     line_width += len(string_property)\n
-    if listboxline.isStatLine():\n
-       string_property = "%s longer" % string_property\n
     new_column_max_len = max(len(string_property), max_line_len.get(column_id, 0))\n
     update_dict = {}\n
     update_dict[column_id] = new_column_max_len\n
@@ -163,8 +166,16 @@
             </value>
         </item>
         <item>
+            <key> <string>_dav_writelocks</string> </key>
+            <value>
+              <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
+            </value>
+        </item>
+        <item>
             <key> <string>_filepath</string> </key>
-            <value> <string>Script (Python):/nexedi/portal_skins/erp5_pdf_style/ListBox_getColumnWithDict</string> </value>
+            <value>
+              <none/>
+            </value>
         </item>
         <item>
             <key> <string>_owner</string> </key>
@@ -205,13 +216,15 @@
                             <string>is_report_tree_mode</string>
                             <string>frame_width</string>
                             <string>section_width</string>
+                            <string>_getattr_</string>
+                            <string>context</string>
+                            <string>N_</string>
                             <string>result</string>
                             <string>min_column_width</string>
                             <string>_getiter_</string>
                             <string>listboxline</string>
                             <string>line_width</string>
                             <string>col_count</string>
-                            <string>_getattr_</string>
                             <string>column_property</string>
                             <string>None</string>
                             <string>string_property</string>
@@ -264,4 +277,25 @@
       </dictionary>
     </pickle>
   </record>
+  <record id="2" aka="AAAAAAAAAAI=">
+    <pickle>
+      <tuple>
+        <tuple>
+          <string>Persistence</string>
+          <string>PersistentMapping</string>
+        </tuple>
+        <none/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>_container</string> </key>
+            <value>
+              <dictionary/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
 </ZopeData>

Modified: erp5/trunk/bt5/erp5_pdf_style/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_pdf_style/bt/revision?rev=11298&r1=11297&r2=11298&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_pdf_style/bt/revision (original)
+++ erp5/trunk/bt5/erp5_pdf_style/bt/revision Tue Nov 14 18:34:53 2006
@@ -1,0 +1,1 @@
+1




More information about the Erp5-report mailing list