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 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[
"""\n
<value> <string>"""\n
Print all listbox that uses the same selection name.\n
"""\n
\n
selection_name_dict = context.SkinsTool_getDuplicateSelectionNameDict()\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
return printed\n
]]></string> </value>
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
......@@ -107,7 +102,6 @@ return printed\n
<string>_getiter_</string>
<string>selection_name</string>
<string>field_list</string>
<string>len</string>
<string>repr</string>
</tuple>
</value>
......
......@@ -50,7 +50,9 @@
</item>
<item>
<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
"""\n
\n
......@@ -79,8 +81,16 @@ for field_path, field in skins_tool.ZopeFind(\n
selection_name_dict.setdefault(\n
field.get_value(\'selection_name\'), []).append(field_path)\n
\n
return selection_name_dict\n
</string> </value>
# leave only duplicating ones\n
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>
<key> <string>_code</string> </key>
......@@ -127,6 +137,11 @@ return selection_name_dict\n
<string>form</string>
<string>original_field</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>
</value>
</item>
......
616
\ No newline at end of file
617
\ 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