[Erp5-report] r30168 - in /erp5/trunk/products/ERP5/bootstrap/erp5_core: SkinTemplateItem/p...

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Oct 30 17:17:35 CET 2009


Author: jerome
Date: Fri Oct 30 17:17:32 2009
New Revision: 30168

URL: http://svn.erp5.org?rev=30168&view=rev
Log:
support new style matrix box configuration

Modified:
    erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_edit.xml
    erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_edit.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_edit.xml?rev=30168&r1=30167&r2=30168&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_edit.xml [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_edit.xml [utf8] Fri Oct 30 17:17:32 2009
@@ -142,10 +142,23 @@
         for k in hidden_attributes:\n
           gv[k] = getattr(request, k, None)\n
       if matrixbox_field.get_value(\'update_cell_range\'):\n
-        # Update cell range each time it is modified\n
-        lines = matrixbox_field.get_value(\'lines\')\n
-        columns = matrixbox_field.get_value(\'columns\')\n
-        tabs = matrixbox_field.get_value(\'tabs\')\n
+        as_cell_range_script_id = matrixbox_field.get_value(\n
+                \'as_cell_range_script_id\')\n
+        lines = []\n
+        columns = []\n
+        tabs = []\n
+        if as_cell_range_script_id:\n
+          cell_range = getattr(context, as_cell_range_script_id)(matrixbox=True)\n
+          if len(cell_range) == 1:\n
+            lines, = cell_range\n
+          elif len(cell_range) == 2:\n
+            lines, columns = cell_range\n
+          elif len(cell_range) == 3:\n
+            lines, columns, tabs = cell_range\n
+        else:\n
+          lines = matrixbox_field.get_value(\'lines\')\n
+          columns = matrixbox_field.get_value(\'columns\')\n
+          tabs = matrixbox_field.get_value(\'tabs\')\n
 \n
         column_ids = map(lambda x: x[0], columns)\n
         line_ids = map(lambda x: x[0], lines)\n

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=30168&r1=30167&r2=30168&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision [utf8] Fri Oct 30 17:17:32 2009
@@ -1,1 +1,1 @@
-1352
+1355




More information about the Erp5-report mailing list