Commit b488ec27 authored by Ivan Tyagov's avatar Ivan Tyagov

Does filter in appropriate script rather than printout script.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@39122 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 90f26a2c
...@@ -50,20 +50,15 @@ ...@@ -50,20 +50,15 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string>"""\n
"""\n
Print all listbox that uses the same selection name.\n Print all listbox that uses the same selection name.\n
"""\n """\n
\n \n
selection_name_dict = context.SkinsTool_getDuplicateSelectionNameDict()\n selection_name_dict = context.SkinsTool_getDuplicateSelectionNameDict()\n
for selection_name, field_list in selection_name_dict.items():\n for selection_name, field_list in selection_name_dict.items():\n
if len(field_list) > 1:\n print repr(selection_name), \'\\n\\t\', \'\\n\\t\'.join(field_list)\n
print repr(selection_name), \'\\n\\t\', \'\\n\\t\'.join(field_list)\n
return printed\n return printed\n
</string> </value>
]]></string> </value>
</item> </item>
<item> <item>
<key> <string>_code</string> </key> <key> <string>_code</string> </key>
...@@ -107,7 +102,6 @@ return printed\n ...@@ -107,7 +102,6 @@ return printed\n
<string>_getiter_</string> <string>_getiter_</string>
<string>selection_name</string> <string>selection_name</string>
<string>field_list</string> <string>field_list</string>
<string>len</string>
<string>repr</string> <string>repr</string>
</tuple> </tuple>
</value> </value>
......
...@@ -50,7 +50,9 @@ ...@@ -50,7 +50,9 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>"""\n <value> <string encoding="cdata"><![CDATA[
"""\n
Get all listbox fields that uses the same selection name.\n Get all listbox fields that uses the same selection name.\n
"""\n """\n
\n \n
...@@ -79,8 +81,16 @@ for field_path, field in skins_tool.ZopeFind(\n ...@@ -79,8 +81,16 @@ for field_path, field in skins_tool.ZopeFind(\n
selection_name_dict.setdefault(\n selection_name_dict.setdefault(\n
field.get_value(\'selection_name\'), []).append(field_path)\n field.get_value(\'selection_name\'), []).append(field_path)\n
\n \n
return selection_name_dict\n # leave only duplicating ones\n
</string> </value> duplicating_selection_name_dict = {}\n
for selection_name, field_list in selection_name_dict.items():\n
if len(field_list) > 1:\n
duplicating_selection_name_dict[selection_name] = field_list\n
\n
return duplicating_selection_name_dict\n
]]></string> </value>
</item> </item>
<item> <item>
<key> <string>_code</string> </key> <key> <string>_code</string> </key>
...@@ -127,6 +137,11 @@ return selection_name_dict\n ...@@ -127,6 +137,11 @@ return selection_name_dict\n
<string>form</string> <string>form</string>
<string>original_field</string> <string>original_field</string>
<string>None</string> <string>None</string>
<string>duplicating_selection_name_dict</string>
<string>selection_name</string>
<string>field_list</string>
<string>len</string>
<string>_write_</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
616 617
\ 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