[Erp5-report] r8427 - in /erp5/trunk/bt5/erp5_ui_test: PathTemplateItem/portal_tests/listbo...

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Jul 13 00:27:30 CEST 2006


Author: yo
Date: Thu Jul 13 00:27:27 2006
New Revision: 8427

URL: http://svn.erp5.org?rev=8427&view=rev
Log:
2006-07-12 yo
* Do not reset selections if not present in ListBoxZuite_reset.
* Accept keyword parameters in ListBox_setPropertyList.

Added:
    erp5/trunk/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testPageTemplate.xml
    erp5/trunk/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/FooModule_renderListBox.xml
Modified:
    erp5/trunk/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/FooModule_viewFooList/listbox.xml
    erp5/trunk/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/ListBoxZuite_reset.xml
    erp5/trunk/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/ListBox_setPropertyList.xml
    erp5/trunk/bt5/erp5_ui_test/bt/change_log
    erp5/trunk/bt5/erp5_ui_test/bt/revision

Added: erp5/trunk/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testPageTemplate.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testPageTemplate.xml?rev=8427&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testPageTemplate.xml (added)
+++ erp5/trunk/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testPageTemplate.xml Thu Jul 13 00:27:27 2006
@@ -1,0 +1,110 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <tuple>
+          <string>Products.PageTemplates.ZopePageTemplate</string>
+          <string>ZopePageTemplate</string>
+        </tuple>
+        <none/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>__ac_local_roles__</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_bind_names</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>_asgns</string> </key>
+                        <value>
+                          <dictionary>
+                            <item>
+                                <key> <string>name_subpath</string> </key>
+                                <value> <string>traverse_subpath</string> </value>
+                            </item>
+                          </dictionary>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>_text</string> </key>
+            <value> <string encoding="cdata"><![CDATA[
+
+<html xmlns:tal="http://xml.zope.org/namespaces/tal"\n
+      xmlns:metal="http://xml.zope.org/namespaces/metal">\n
+<head>\n
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">\n
+<title>Test Page Template</title>\n
+</head>\n
+<body>\n
+<table cellpadding="1" cellspacing="1" border="1">\n
+<thead>\n
+<tr><td rowspan="1" colspan="3">Test Page Template</td></tr>\n
+</thead><tbody>\n
+<tal:block metal:use-macro="here/ListBoxZuite_CommonTemplate/macros/init" />\n
+<tr>\n
+\t<td>open</td>\n
+\t<td>/erp5/foo_module/FooModule_viewFooList/listbox/ListBox_setPropertyList?field_page_template=FooModule_renderListBox</td>\n
+\t<td></td>\n
+</tr>\n
+<tr>\n
+\t<td>assertTextPresent</td>\n
+\t<td>Set Successfully.</td>\n
+\t<td></td>\n
+</tr>\n
+<tr>\n
+\t<td>open</td>\n
+\t<td>/erp5/foo_module/view</td>\n
+\t<td></td>\n
+</tr>\n
+<tr>\n
+\t<td>assertTextPresent</td>\n
+\t<td>This is just a test</td>\n
+\t<td></td>\n
+</tr>\n
+\n
+</tbody></table>\n
+</body>\n
+</html>\n
+
+
+]]></string> </value>
+        </item>
+        <item>
+            <key> <string>content_type</string> </key>
+            <value> <string>text/html</string> </value>
+        </item>
+        <item>
+            <key> <string>expand</string> </key>
+            <value> <int>0</int> </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>testPageTemplate</string> </value>
+        </item>
+        <item>
+            <key> <string>title</string> </key>
+            <value> <string></string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>

Added: erp5/trunk/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/FooModule_renderListBox.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/FooModule_renderListBox.xml?rev=8427&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/FooModule_renderListBox.xml (added)
+++ erp5/trunk/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/FooModule_renderListBox.xml Thu Jul 13 00:27:27 2006
@@ -1,0 +1,74 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <tuple>
+          <string>Products.PageTemplates.ZopePageTemplate</string>
+          <string>ZopePageTemplate</string>
+        </tuple>
+        <none/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>__ac_local_roles__</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_bind_names</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>_asgns</string> </key>
+                        <value>
+                          <dictionary>
+                            <item>
+                                <key> <string>name_subpath</string> </key>
+                                <value> <string>traverse_subpath</string> </value>
+                            </item>
+                          </dictionary>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>_text</string> </key>
+            <value> <string encoding="cdata"><![CDATA[
+
+<div><p>This is just a test.</p></div>
+
+]]></string> </value>
+        </item>
+        <item>
+            <key> <string>content_type</string> </key>
+            <value> <string>text/html</string> </value>
+        </item>
+        <item>
+            <key> <string>expand</string> </key>
+            <value> <int>0</int> </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>FooModule_renderListBox</string> </value>
+        </item>
+        <item>
+            <key> <string>title</string> </key>
+            <value> <string></string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>

Modified: erp5/trunk/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/FooModule_viewFooList/listbox.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/FooModule_viewFooList/listbox.xml?rev=8427&r1=8426&r2=8427&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/FooModule_viewFooList/listbox.xml (original)
+++ erp5/trunk/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/FooModule_viewFooList/listbox.xml Thu Jul 13 00:27:27 2006
@@ -436,7 +436,7 @@
                 </item>
                 <item>
                     <key> <string>page_template</string> </key>
-                    <value> <string></string> </value>
+                    <value> <string>FooModule_renderListBox</string> </value>
                 </item>
                 <item>
                     <key> <string>portal_types</string> </key>
@@ -497,23 +497,12 @@
                 <item>
                     <key> <string>stat_columns</string> </key>
                     <value>
-                      <list>
-                        <tuple>
-                          <string>id</string>
-                          <string>FooModule_statId</string>
-                        </tuple>
-                        <tuple>
-                          <string>title</string>
-                          <string>FooModule_statTitle</string>
-                        </tuple>
-                      </list>
+                      <list/>
                     </value>
                 </item>
                 <item>
                     <key> <string>stat_method</string> </key>
-                    <value>
-                      <persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
-                    </value>
+                    <value> <string></string> </value>
                 </item>
                 <item>
                     <key> <string>title</string> </key>
@@ -569,23 +558,4 @@
       </dictionary>
     </pickle>
   </record>
-  <record id="4" aka="AAAAAAAAAAQ=">
-    <pickle>
-      <tuple>
-        <tuple>
-          <string>Products.Formulator.MethodField</string>
-          <string>Method</string>
-        </tuple>
-        <none/>
-      </tuple>
-    </pickle>
-    <pickle>
-      <dictionary>
-        <item>
-            <key> <string>method_name</string> </key>
-            <value> <string>portal_catalog</string> </value>
-        </item>
-      </dictionary>
-    </pickle>
-  </record>
 </ZopeData>

Modified: erp5/trunk/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/ListBoxZuite_reset.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/ListBoxZuite_reset.xml?rev=8427&r1=8426&r2=8427&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/ListBoxZuite_reset.xml (original)
+++ erp5/trunk/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/ListBoxZuite_reset.xml Thu Jul 13 00:27:27 2006
@@ -87,11 +87,13 @@
 \n
 # Reset the selection.\n
 def resetSelection(selection_name):\n
-  context.portal_selections.setSelectionToAll(selection_name, reset_domain_tree=True, reset_report_tree=True)\n
-  context.portal_selections.setSelectionSortOrder(selection_name, [])\n
-  context.portal_selections.setSelectionColumns(selection_name, [])\n
-  context.portal_selections.setSelectionStats(selection_name, [])\n
-  context.portal_selections.setListboxDisplayMode(context.REQUEST, \'FlatListMode\', selection_name)\n
+  selection_tool = context.portal_selections\n
+  if selection_tool.getSelectionFor(selection_name) is not None:\n
+    selection_tool.setSelectionToAll(selection_name, reset_domain_tree=True, reset_report_tree=True)\n
+    selection_tool.setSelectionSortOrder(selection_name, [])\n
+    selection_tool.setSelectionColumns(selection_name, [])\n
+    selection_tool.setSelectionStats(selection_name, [])\n
+    selection_tool.setListboxDisplayMode(context.REQUEST, \'FlatListMode\', selection_name)\n
 \n
 resetSelection(\'foo_selection\')\n
 resetSelection(\'foo_line_selection\')\n

Modified: erp5/trunk/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/ListBox_setPropertyList.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/ListBox_setPropertyList.xml?rev=8427&r1=8426&r2=8427&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/ListBox_setPropertyList.xml (original)
+++ erp5/trunk/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/ListBox_setPropertyList.xml Thu Jul 13 00:27:27 2006
@@ -109,6 +109,7 @@
 )\n
 \n
 d.update(context.REQUEST)\n
+d.update(kw)\n
 #context.log(\'ListBox_setPropertyList\', \'kw = %r, d = %r\' % (kw, d,))\n
 r = context.form.validate(d)\n
 context.manage_edit_xmlrpc(r)\n
@@ -166,7 +167,7 @@
                             <string>dict</string>
                             <string>_getattr_</string>
                             <string>d</string>
-<string>context</string>
+                            <string>context</string>
                             <string>r</string>
                           </tuple>
                         </value>

Modified: erp5/trunk/bt5/erp5_ui_test/bt/change_log
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_ui_test/bt/change_log?rev=8427&r1=8426&r2=8427&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_ui_test/bt/change_log (original)
+++ erp5/trunk/bt5/erp5_ui_test/bt/change_log Thu Jul 13 00:27:27 2006
@@ -1,3 +1,7 @@
+2006-07-12 yo
+* Do not reset selections if not present in ListBoxZuite_reset.
+* Accept keyword parameters in ListBox_setPropertyList.
+
 2006-07-12 yo
 * Add missing properties to Listbox_setPropertyList.
 

Modified: erp5/trunk/bt5/erp5_ui_test/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_ui_test/bt/revision?rev=8427&r1=8426&r2=8427&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_ui_test/bt/revision (original)
+++ erp5/trunk/bt5/erp5_ui_test/bt/revision Thu Jul 13 00:27:27 2006
@@ -1,1 +1,1 @@
-5
+11




More information about the Erp5-report mailing list