Commit 49b5fb69 authored by Jérome Perrin's avatar Jérome Perrin

support new style matrix box configuration

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@30168 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 99f1d041
......@@ -142,10 +142,23 @@ def editMatrixBox(matrixbox_field, matrixbox):\n
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
......
1352
\ No newline at end of file
1355
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment