[Erp5-report] r39122 ivan - in /erp5/trunk/bt5/erp5_forge: SkinTemplateItem/portal_skins/er...
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Oct 14 11:01:44 CEST 2010
Author: ivan
Date: Thu Oct 14 11:01:39 2010
New Revision: 39122
URL: http://svn.erp5.org?rev=39122&view=rev
Log:
Does filter in appropriate script rather than printout script.
Modified:
erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_toolbox/SkinsTool_checkDuplicateSelectionName.xml
erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_toolbox/SkinsTool_getDuplicateSelectionNameDict.xml
erp5/trunk/bt5/erp5_forge/bt/revision
Modified: erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_toolbox/SkinsTool_checkDuplicateSelectionName.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_toolbox/SkinsTool_checkDuplicateSelectionName.xml?rev=39122&r1=39121&r2=39122&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_toolbox/SkinsTool_checkDuplicateSelectionName.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_toolbox/SkinsTool_checkDuplicateSelectionName.xml [utf8] Thu Oct 14 11:01:39 2010
@@ -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
+ 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>
Modified: erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_toolbox/SkinsTool_getDuplicateSelectionNameDict.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_toolbox/SkinsTool_getDuplicateSelectionNameDict.xml?rev=39122&r1=39121&r2=39122&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_toolbox/SkinsTool_getDuplicateSelectionNameDict.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_toolbox/SkinsTool_getDuplicateSelectionNameDict.xml [utf8] Thu Oct 14 11:01:39 2010
@@ -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.Zope
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>
Modified: erp5/trunk/bt5/erp5_forge/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_forge/bt/revision?rev=39122&r1=39121&r2=39122&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_forge/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_forge/bt/revision [utf8] Thu Oct 14 11:01:39 2010
@@ -1 +1 @@
-616
\ No newline at end of file
+617
\ No newline at end of file
More information about the Erp5-report
mailing list