Commit ea0c59ed authored by Rafael Monnerat's avatar Rafael Monnerat

Updated the Business Template Installation UI.

- Changed Selection to a CheckBox
- Removed Unused Actions

Now the behavior is :
- do the action showed when clicked
- or (Do Nothing or Keep Original) when it is uncheck.

It supports multiple check or uncheck using shift.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@22569 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 3d7e04f6
...@@ -97,35 +97,22 @@ for object_id in keys:\n ...@@ -97,35 +97,22 @@ for object_id in keys:\n
object_state, object_class = modified_object_list[object_id]\n object_state, object_class = modified_object_list[object_id]\n
line = newTempBase(context, \'tmp_install_%s\' %(str(i)))\n line = newTempBase(context, \'tmp_install_%s\' %(str(i)))\n
if object_state == \'New\':\n if object_state == \'New\':\n
line.edit(object_id=object_id, object_state=object_state,\n choice_item_list=[[\'Install\', \'install\']]\n
object_class=object_class,\n
choice_item_list=[[\'Install\', \'install\'],\n
[\'Do Nothing\', \'nothing\']])\n
elif object_state == \'Modified\':\n elif object_state == \'Modified\':\n
if object_class in no_backup_dict:\n if object_class in no_backup_dict:\n
line.edit(object_id=object_id, object_state=object_state,\n choice_item_list=[[\'Upgrade\', \'install\']]\n
object_class=object_class,\n
choice_item_list=[[\'Upgrade\', \'install\'],\n
[\'Keep Original\', \'nothing\']])\n
else:\n else:\n
line.edit(object_id=object_id, object_state=object_state,\n choice_item_list=[[\'Backup And Upgrade\', \'backup\']]\n
object_class=object_class,\n
choice_item_list=[[\'Backup And Upgrade\', \'backup\'],\n
[\'Upgrade\', \'install\'],\n
[\'Keep Original\', \'nothing\']])\n
elif object_state == \'Removed\':\n elif object_state == \'Removed\':\n
if object_class in no_backup_dict:\n if object_class in no_backup_dict:\n
line.edit(object_id=object_id,\n choice_item_list=[[\'Remove\', \'remove\']]\n
object_state=object_state,\n
object_class=object_class,\n
choice_item_list=[[\'Remove\', \'remove\'],\n
[\'Keep Original\', \'nothing\']])\n
else:\n else:\n
line.edit(object_id=object_id, object_state=object_state,\n choice_item_list=[[\'Backup And Remove\', \'save_and_remove\']]\n
\n
line.edit(object_id=object_id,\n
object_state=object_state,\n
object_class=object_class,\n object_class=object_class,\n
choice_item_list=[[\'Backup And Remove\', \'save_and_remove\'],\n choice_item_list=choice_item_list)\n
[\'Remove\', \'remove\'],\n
[\'Keep Original\', \'nothing\']])\n
line.setUid(\'new_%s\' % object_id)\n line.setUid(\'new_%s\' % object_id)\n
object_list.append(line)\n object_list.append(line)\n
i += 1 \n i += 1 \n
...@@ -202,6 +189,7 @@ return object_list\n ...@@ -202,6 +189,7 @@ return object_list\n
<string>object_class</string> <string>object_class</string>
<string>str</string> <string>str</string>
<string>line</string> <string>line</string>
<string>choice_item_list</string>
<string>_inplacevar_</string> <string>_inplacevar_</string>
</tuple> </tuple>
</value> </value>
...@@ -221,6 +209,12 @@ return object_list\n ...@@ -221,6 +209,12 @@ return object_list\n
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>BusinessTemplate_getModifiedObject</string> </value> <value> <string>BusinessTemplate_getModifiedObject</string> </value>
</item> </item>
<item>
<key> <string>uid</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<key> <string>warnings</string> </key> <key> <string>warnings</string> </key>
<value> <value>
......
...@@ -3,11 +3,8 @@ ...@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <tuple>
<tuple> <global name="ListBox" module="Products.ERP5Form.ListBox"/>
<string>Products.ERP5Form.ListBox</string> <tuple/>
<string>ListBox</string>
</tuple>
<none/>
</tuple> </tuple>
</pickle> </pickle>
<pickle> <pickle>
...@@ -333,6 +330,10 @@ ...@@ -333,6 +330,10 @@
<key> <string>alternate_name</string> </key> <key> <string>alternate_name</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>anchor</string> </key>
<value> <int>0</int> </value>
</item>
<item> <item>
<key> <string>columns</string> </key> <key> <string>columns</string> </key>
<value> <value>
...@@ -537,11 +538,8 @@ ...@@ -537,11 +538,8 @@
<record id="2" aka="AAAAAAAAAAI="> <record id="2" aka="AAAAAAAAAAI=">
<pickle> <pickle>
<tuple> <tuple>
<tuple> <global name="Method" module="Products.Formulator.MethodField"/>
<string>Products.Formulator.MethodField</string> <tuple/>
<string>Method</string>
</tuple>
<none/>
</tuple> </tuple>
</pickle> </pickle>
<pickle> <pickle>
......
...@@ -3,11 +3,8 @@ ...@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <tuple>
<tuple> <global name="MultiCheckBoxField" module="Products.Formulator.StandardFields"/>
<string>Products.Formulator.StandardFields</string> <tuple/>
<string>ListField</string>
</tuple>
<none/>
</tuple> </tuple>
</pickle> </pickle>
<pickle> <pickle>
...@@ -67,18 +64,10 @@ ...@@ -67,18 +64,10 @@
<key> <string>external_validator</string> </key> <key> <string>external_validator</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>extra_item</string> </key> <key> <string>extra_item</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>first_item</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>hidden</string> </key> <key> <string>hidden</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
...@@ -88,11 +77,11 @@ ...@@ -88,11 +77,11 @@
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>required</string> </key> <key> <string>orientation</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>size</string> </key> <key> <string>required</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
...@@ -104,7 +93,7 @@ ...@@ -104,7 +93,7 @@
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>whitespace_preserve</string> </key> <key> <string>view_separator</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
</dictionary> </dictionary>
...@@ -124,7 +113,9 @@ ...@@ -124,7 +113,9 @@
</item> </item>
<item> <item>
<key> <string>default</string> </key> <key> <string>default</string> </key>
<value> <string></string> </value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
...@@ -142,18 +133,10 @@ ...@@ -142,18 +133,10 @@
<key> <string>external_validator</string> </key> <key> <string>external_validator</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>extra_item</string> </key> <key> <string>extra_item</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>first_item</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>hidden</string> </key> <key> <string>hidden</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
...@@ -161,15 +144,15 @@ ...@@ -161,15 +144,15 @@
<item> <item>
<key> <string>items</string> </key> <key> <string>items</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value> </value>
</item> </item>
<item> <item>
<key> <string>required</string> </key> <key> <string>orientation</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>size</string> </key> <key> <string>required</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
...@@ -181,7 +164,7 @@ ...@@ -181,7 +164,7 @@
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>whitespace_preserve</string> </key> <key> <string>view_separator</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
</dictionary> </dictionary>
...@@ -197,11 +180,13 @@ ...@@ -197,11 +180,13 @@
</item> </item>
<item> <item>
<key> <string>css_class</string> </key> <key> <string>css_class</string> </key>
<value> <string></string> </value> <value> <string>shift_check_support</string> </value>
</item> </item>
<item> <item>
<key> <string>default</string> </key> <key> <string>default</string> </key>
<value> <string></string> </value> <value>
<list/>
</value>
</item> </item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
...@@ -219,17 +204,9 @@ ...@@ -219,17 +204,9 @@
<key> <string>external_validator</string> </key> <key> <string>external_validator</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>extra_item</string> </key> <key> <string>extra_item</string> </key>
<value> <string></string> </value> <value> <string>tabindex=1000 onclick="shiftCheck(event)"</string> </value>
</item>
<item>
<key> <string>first_item</string> </key>
<value> <int>1</int> </value>
</item> </item>
<item> <item>
<key> <string>hidden</string> </key> <key> <string>hidden</string> </key>
...@@ -238,49 +215,32 @@ ...@@ -238,49 +215,32 @@
<item> <item>
<key> <string>items</string> </key> <key> <string>items</string> </key>
<value> <value>
<list> <list/>
<tuple>
<string>install</string>
<string>install</string>
</tuple>
<tuple>
<string>btnew</string>
<string>btnew</string>
</tuple>
<tuple>
<string>nothing</string>
<string>nothing</string>
</tuple>
<tuple>
<string>btsave</string>
<string>btsave</string>
</tuple>
<tuple>
<string>remove</string>
<string>remove</string>
</tuple>
</list>
</value> </value>
</item> </item>
<item> <item>
<key> <string>required</string> </key> <key> <string>orientation</string> </key>
<value> <int>0</int> </value> <value> <string>horizontal</string> </value>
</item> </item>
<item> <item>
<key> <string>size</string> </key> <key> <string>required</string> </key>
<value> <int>1</int> </value> <value> <int>0</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Installation Choice</string> </value> <value> <string>listbox_choice</string> </value>
</item> </item>
<item> <item>
<key> <string>unicode</string> </key> <key> <string>unicode</string> </key>
<value> <int>0</int> </value> <value> <int>0</int> </value>
</item> </item>
<item> <item>
<key> <string>whitespace_preserve</string> </key> <key> <string>view_separator</string> </key>
<value> <int>0</int> </value> <value> <string encoding="cdata"><![CDATA[
<br />
]]></string> </value>
</item> </item>
</dictionary> </dictionary>
</value> </value>
...@@ -291,11 +251,24 @@ ...@@ -291,11 +251,24 @@
<record id="2" aka="AAAAAAAAAAI="> <record id="2" aka="AAAAAAAAAAI=">
<pickle> <pickle>
<tuple> <tuple>
<tuple> <global name="TALESMethod" module="Products.Formulator.TALESField"/>
<string>Products.Formulator.TALESField</string> <tuple/>
<string>TALESMethod</string> </tuple>
</tuple> </pickle>
<none/> <pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: cell.choice_item_list[0][1]</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple> </tuple>
</pickle> </pickle>
<pickle> <pickle>
......
...@@ -96,8 +96,8 @@ ...@@ -96,8 +96,8 @@
<key> <string>hidden</string> </key> <key> <string>hidden</string> </key>
<value> <value>
<list> <list>
<string>listbox_choice</string>
<string>listbox_object_id</string> <string>listbox_object_id</string>
<string>listbox_choice</string>
</list> </list>
</value> </value>
</item> </item>
......
...@@ -3,11 +3,8 @@ ...@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <tuple>
<tuple> <global name="MultiCheckBoxField" module="Products.Formulator.StandardFields"/>
<string>Products.Formulator.StandardFields</string> <tuple/>
<string>ListField</string>
</tuple>
<none/>
</tuple> </tuple>
</pickle> </pickle>
<pickle> <pickle>
...@@ -67,18 +64,10 @@ ...@@ -67,18 +64,10 @@
<key> <string>external_validator</string> </key> <key> <string>external_validator</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>extra_item</string> </key> <key> <string>extra_item</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>first_item</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>hidden</string> </key> <key> <string>hidden</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
...@@ -88,11 +77,11 @@ ...@@ -88,11 +77,11 @@
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>required</string> </key> <key> <string>orientation</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>size</string> </key> <key> <string>required</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
...@@ -104,7 +93,7 @@ ...@@ -104,7 +93,7 @@
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>whitespace_preserve</string> </key> <key> <string>view_separator</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
</dictionary> </dictionary>
...@@ -124,7 +113,9 @@ ...@@ -124,7 +113,9 @@
</item> </item>
<item> <item>
<key> <string>default</string> </key> <key> <string>default</string> </key>
<value> <string></string> </value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
...@@ -142,18 +133,10 @@ ...@@ -142,18 +133,10 @@
<key> <string>external_validator</string> </key> <key> <string>external_validator</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>extra_item</string> </key> <key> <string>extra_item</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>first_item</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>hidden</string> </key> <key> <string>hidden</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
...@@ -161,15 +144,15 @@ ...@@ -161,15 +144,15 @@
<item> <item>
<key> <string>items</string> </key> <key> <string>items</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value> </value>
</item> </item>
<item> <item>
<key> <string>required</string> </key> <key> <string>orientation</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>size</string> </key> <key> <string>required</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
...@@ -181,7 +164,7 @@ ...@@ -181,7 +164,7 @@
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>whitespace_preserve</string> </key> <key> <string>view_separator</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
</dictionary> </dictionary>
...@@ -197,11 +180,13 @@ ...@@ -197,11 +180,13 @@
</item> </item>
<item> <item>
<key> <string>css_class</string> </key> <key> <string>css_class</string> </key>
<value> <string></string> </value> <value> <string>bt_install_checkbox</string> </value>
</item> </item>
<item> <item>
<key> <string>default</string> </key> <key> <string>default</string> </key>
<value> <string></string> </value> <value>
<list/>
</value>
</item> </item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
...@@ -219,17 +204,9 @@ ...@@ -219,17 +204,9 @@
<key> <string>external_validator</string> </key> <key> <string>external_validator</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>extra_item</string> </key> <key> <string>extra_item</string> </key>
<value> <string></string> </value> <value> <string>tabindex=1000 onclick="clickage(event)"</string> </value>
</item>
<item>
<key> <string>first_item</string> </key>
<value> <int>1</int> </value>
</item> </item>
<item> <item>
<key> <string>hidden</string> </key> <key> <string>hidden</string> </key>
...@@ -238,49 +215,32 @@ ...@@ -238,49 +215,32 @@
<item> <item>
<key> <string>items</string> </key> <key> <string>items</string> </key>
<value> <value>
<list> <list/>
<tuple>
<string>install</string>
<string>install</string>
</tuple>
<tuple>
<string>btnew</string>
<string>btnew</string>
</tuple>
<tuple>
<string>nothing</string>
<string>nothing</string>
</tuple>
<tuple>
<string>btsave</string>
<string>btsave</string>
</tuple>
<tuple>
<string>remove</string>
<string>remove</string>
</tuple>
</list>
</value> </value>
</item> </item>
<item> <item>
<key> <string>required</string> </key> <key> <string>orientation</string> </key>
<value> <int>0</int> </value> <value> <string>horizontal</string> </value>
</item> </item>
<item> <item>
<key> <string>size</string> </key> <key> <string>required</string> </key>
<value> <int>1</int> </value> <value> <int>0</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Installation Choice</string> </value> <value> <string>listbox_choice</string> </value>
</item> </item>
<item> <item>
<key> <string>unicode</string> </key> <key> <string>unicode</string> </key>
<value> <int>0</int> </value> <value> <int>0</int> </value>
</item> </item>
<item> <item>
<key> <string>whitespace_preserve</string> </key> <key> <string>view_separator</string> </key>
<value> <int>0</int> </value> <value> <string encoding="cdata"><![CDATA[
<br />
]]></string> </value>
</item> </item>
</dictionary> </dictionary>
</value> </value>
...@@ -291,11 +251,24 @@ ...@@ -291,11 +251,24 @@
<record id="2" aka="AAAAAAAAAAI="> <record id="2" aka="AAAAAAAAAAI=">
<pickle> <pickle>
<tuple> <tuple>
<tuple> <global name="TALESMethod" module="Products.Formulator.TALESField"/>
<string>Products.Formulator.TALESField</string> <tuple/>
<string>TALESMethod</string> </tuple>
</tuple> </pickle>
<none/> <pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: cell.choice_item_list[0][1]</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple> </tuple>
</pickle> </pickle>
<pickle> <pickle>
......
881 882
\ No newline at end of file \ 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