[Erp5-report] r18952 - /erp5/trunk/products/ERP5Form/ScribusUtils.py

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Jan 31 17:41:00 CET 2008


Author: fabien
Date: Thu Jan 31 17:41:00 2008
New Revision: 18952

URL: http://svn.erp5.org?rev=18952&view=rev
Log:
- add a new parameter space_between_pages that permit to define the sapce between
two pages
- modify the margin-top attribute of the page_end section, this is more logical
  to have the same spaces than the space between two pages after the last page
  than a page height (before this commit, a empty page space was displayed
  after the last page)

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

Modified: erp5/trunk/products/ERP5Form/ScribusUtils.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Form/ScribusUtils.py?rev=18952&r1=18951&r2=18952&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Form/ScribusUtils.py (original)
+++ erp5/trunk/products/ERP5Form/ScribusUtils.py Thu Jan 31 17:41:00 2008
@@ -856,7 +856,8 @@
                         , page_iterator
                         , page_gap
                         , keep_page
-                        , properties_page):
+                        , properties_page
+                        , space_between_pages):
     """
     recover all CSS data relative to the current page_object (field)
     and save these informations in the output dict
@@ -918,7 +919,8 @@
         str(12) + 'px'
       properties_css_object_error['font-size'] = \
         str(12) + 'px'
-    properties_css_object_err_d['margin-left'] = str(page_width + 20 ) + 'px'
+    properties_css_object_err_d['margin-left'] = str(page_width +
+        space_between_pages ) + 'px'
     properties_css_object_stand['margin-top'] = \
       str((scaling_factor2 *float(properties_field['position_y']))) + 'px'
     properties_css_object_error['margin-top'] = \
@@ -1146,7 +1148,8 @@
   security.declarePublic('setFinalProperties')
   def setFinalProperties( self
                         , properties_css_dict
-                        , page_height):
+                        , page_height
+                        , space_between_pages):
     """
     adding 'page_end' class to add a div at the end of the last page
     in order to display the full last page under Konqueror
@@ -1155,7 +1158,7 @@
     """
     properties_css_page = {}
     properties_css_page['position'] = 'relative'
-    properties_css_page['margin-top'] = "%spx" % str(page_height)
+    properties_css_page['margin-top'] = "%spx" % str(space_between_pages)
     properties_css_dict['head']['page_end'] = properties_css_page
     return properties_css_dict
 




More information about the Erp5-report mailing list