Commit 6ceaf9c3 authored by Rafael Monnerat's avatar Rafael Monnerat

Added variables and improve comments to make it easier to understand.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@20503 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 708819d7
...@@ -577,12 +577,13 @@ properties_structure[\'frame\'][\'planning_content\'] = content_dict\n ...@@ -577,12 +577,13 @@ properties_structure[\'frame\'][\'planning_content\'] = content_dict\n
\n \n
\n \n
# processing blocks in the planning content\n # processing blocks in the planning content\n
block_border_width = 1\n
for block_object in planning.content:\n for block_object in planning.content:\n
block_dict = {\n block_dict = {\n
\'position\': \'absolute\',\n \'position\': \'absolute\',\n
\'border-style\': \'solid\',\n \'border-style\': \'solid\',\n
\'border-color\': \'#53676e\',\n \'border-color\': \'#53676e\',\n
\'border-width\': 1,\n \'border-width\': block_border_width,\n
}\n }\n
\n \n
if block_object.error == 1: # task has error (not validated)\n if block_object.error == 1: # task has error (not validated)\n
...@@ -605,8 +606,12 @@ for block_object in planning.content:\n ...@@ -605,8 +606,12 @@ for block_object in planning.content:\n
if block_object.parent_activity.height is not None:\n if block_object.parent_activity.height is not None:\n
block_dict[\'height\'] = block_dict[\'height\']*block_object.parent_activity.height\n block_dict[\'height\'] = block_dict[\'height\']*block_object.parent_activity.height\n
\n \n
# width - border width * 2 to prevent wrong edition\n # the width - border width * 2 (left and right)\n
block_dict[\'width\'] = (block_object.position_x.relative_range * size_planning_width) - 2\n # When you edit one object, border was added as a part of size. So 2*border-width pixels \n
# was added every edition. 2 is because left and right.\n
# the width - border-width * 2 (left and right)\n
block_dict[\'width\'] = (block_object.position_x.relative_range * size_planning_width) - \\\n
(2*block_border_width)\n
#block_dict[\'height\'] = block_object.position_y.relative_range * size_planning_height\n #block_dict[\'height\'] = block_object.position_y.relative_range * size_planning_height\n
block_dict[\'margin-left\'] = block_object.position_x.relative_begin * size_planning_width\n block_dict[\'margin-left\'] = block_object.position_x.relative_begin * size_planning_width\n
block_dict[\'margin-top\'] = block_object.position_y.relative_begin * size_planning_height\n block_dict[\'margin-top\'] = block_object.position_y.relative_begin * size_planning_height\n
...@@ -837,6 +842,7 @@ return properties_structure\n ...@@ -837,6 +842,7 @@ return properties_structure\n
<string>lane_axis_info_dict</string> <string>lane_axis_info_dict</string>
<string>lane_axis_line_dict</string> <string>lane_axis_line_dict</string>
<string>content_dict</string> <string>content_dict</string>
<string>block_border_width</string>
<string>block_object</string> <string>block_object</string>
<string>block_dict</string> <string>block_dict</string>
<string>context</string> <string>context</string>
......
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