diff --git a/bt5/erp5_ui_test/ActionTemplateItem/portal_types/Foo%20Module/do_nothing_report_jio.xml b/bt5/erp5_ui_test/ActionTemplateItem/portal_types/Foo%20Module/do_nothing_report_jio.xml new file mode 100644 index 0000000000000000000000000000000000000000..1898e3a6d9ecc5af88951e7e930ae3ab2aa25a1c --- /dev/null +++ b/bt5/erp5_ui_test/ActionTemplateItem/portal_types/Foo%20Module/do_nothing_report_jio.xml @@ -0,0 +1,91 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="ActionInformation" module="Products.CMFCore.ActionInformation"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>action</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> + <item> + <key> <string>categories</string> </key> + <value> + <tuple> + <string>action_type/object_report_jio</string> + </tuple> + </value> + </item> + <item> + <key> <string>category</string> </key> + <value> <string>object_report_jio</string> </value> + </item> + <item> + <key> <string>condition</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>icon</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>do_nothing_report_jio</string> </value> + </item> + <item> + <key> <string>language</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>permissions</string> </key> + <value> + <tuple> + <string>View</string> + </tuple> + </value> + </item> + <item> + <key> <string>portal_type</string> </key> + <value> <string>Action Information</string> </value> + </item> + <item> + <key> <string>priority</string> </key> + <value> <float>1.0</float> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Do Nothing</string> </value> + </item> + <item> + <key> <string>visible</string> </key> + <value> <int>1</int> </value> + </item> + </dictionary> + </pickle> + </record> + <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <global name="Expression" module="Products.CMFCore.Expression"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>text</string> </key> + <value> <string>string:${object_url}/Foo_viewDoNothingReportDialog</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_ui_test/ActionTemplateItem/portal_types/Foo/do_nothing_report_jio.xml b/bt5/erp5_ui_test/ActionTemplateItem/portal_types/Foo/do_nothing_report_jio.xml new file mode 100644 index 0000000000000000000000000000000000000000..1898e3a6d9ecc5af88951e7e930ae3ab2aa25a1c --- /dev/null +++ b/bt5/erp5_ui_test/ActionTemplateItem/portal_types/Foo/do_nothing_report_jio.xml @@ -0,0 +1,91 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="ActionInformation" module="Products.CMFCore.ActionInformation"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>action</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> + <item> + <key> <string>categories</string> </key> + <value> + <tuple> + <string>action_type/object_report_jio</string> + </tuple> + </value> + </item> + <item> + <key> <string>category</string> </key> + <value> <string>object_report_jio</string> </value> + </item> + <item> + <key> <string>condition</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>icon</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>do_nothing_report_jio</string> </value> + </item> + <item> + <key> <string>language</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>permissions</string> </key> + <value> + <tuple> + <string>View</string> + </tuple> + </value> + </item> + <item> + <key> <string>portal_type</string> </key> + <value> <string>Action Information</string> </value> + </item> + <item> + <key> <string>priority</string> </key> + <value> <float>1.0</float> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Do Nothing</string> </value> + </item> + <item> + <key> <string>visible</string> </key> + <value> <int>1</int> </value> + </item> + </dictionary> + </pickle> + </record> + <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <global name="Expression" module="Products.CMFCore.Expression"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>text</string> </key> + <value> <string>string:${object_url}/Foo_viewDoNothingReportDialog</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/Foo_viewDoNothingReportDialog.xml b/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/Foo_viewDoNothingReportDialog.xml new file mode 100644 index 0000000000000000000000000000000000000000..cf482701ddf92208b9864bf47b0cd7137680f1bc --- /dev/null +++ b/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/Foo_viewDoNothingReportDialog.xml @@ -0,0 +1,129 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="ERP5 Form" module="erp5.portal_type"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_objects</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>action</string> </key> + <value> <string>Base_redirect</string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>edit_order</string> </key> + <value> + <list/> + </value> + </item> + <item> + <key> <string>encoding</string> </key> + <value> <string>UTF-8</string> </value> + </item> + <item> + <key> <string>enctype</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>group_list</string> </key> + <value> + <list> + <string>left</string> + <string>right</string> + <string>center</string> + <string>bottom</string> + <string>hidden</string> + </list> + </value> + </item> + <item> + <key> <string>groups</string> </key> + <value> + <dictionary> + <item> + <key> <string>bottom</string> </key> + <value> + <list/> + </value> + </item> + <item> + <key> <string>center</string> </key> + <value> + <list/> + </value> + </item> + <item> + <key> <string>hidden</string> </key> + <value> + <list/> + </value> + </item> + <item> + <key> <string>left</string> </key> + <value> + <list/> + </value> + </item> + <item> + <key> <string>right</string> </key> + <value> + <list/> + </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>Foo_viewDoNothingReportDialog</string> </value> + </item> + <item> + <key> <string>method</string> </key> + <value> <string>POST</string> </value> + </item> + <item> + <key> <string>name</string> </key> + <value> <string>Foo_viewDoNothingReportDialog</string> </value> + </item> + <item> + <key> <string>pt</string> </key> + <value> <string>form_dialog</string> </value> + </item> + <item> + <key> <string>row_length</string> </key> + <value> <int>4</int> </value> + </item> + <item> + <key> <string>stored_encoding</string> </key> + <value> <string>UTF-8</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Please do nothing</string> </value> + </item> + <item> + <key> <string>unicode_mode</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>update_action</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>update_action_title</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_ui_test/bt/template_action_path_list b/bt5/erp5_ui_test/bt/template_action_path_list index f7f461e749302eced7a06c9a89d09f52625df75b..aee9bfb81236e0aa700b502ae57dc5e5fb5dc01e 100644 --- a/bt5/erp5_ui_test/bt/template_action_path_list +++ b/bt5/erp5_ui_test/bt/template_action_path_list @@ -5,11 +5,13 @@ Bar | view Bar | view_datetime_field Foo Bar Module | view Foo Line | view +Foo Module | do_nothing_report_jio Foo Module | list Foo Module | list_ui Foo Module | search Foo Module | sort_on Foo Module | view +Foo | do_nothing_report_jio Foo | dummy_listfield_report Foo | dummy_multicheckboxfield_report Foo | dummy_multilistfield_report diff --git a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_appcache.xml b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_appcache.xml index 6772eaf3d7aff5b12262c7c22b47aa862101cf03..10774c977a41d0efdeefe60edb9f13052b30300b 100644 --- a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_appcache.xml +++ b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_appcache.xml @@ -108,7 +108,7 @@ <value> <string encoding="cdata"><![CDATA[ CACHE MANIFEST\n -# generated on Wed, 01 Mar 2017 15:00:00 GMT\n +# generated on Wed, 03 Apr 2017 12:00:00 GMT+0200\n # XXX + fonts\n # images/ajax-loader.gif\n CACHE:\n @@ -175,6 +175,8 @@ gadget_erp5_notification.html\n gadget_erp5_notification.js\n gadget_erp5_page_action.html\n gadget_erp5_page_action.js\n +gadget_erp5_page_export.html\n +gadget_erp5_page_export.js\n gadget_erp5_page_form.html\n gadget_erp5_page_form.js\n gadget_erp5_page_front.html\n @@ -369,7 +371,7 @@ NETWORK:\n </item> <item> <key> <string>serial</string> </key> - <value> <string>957.46857.4036.21879</string> </value> + <value> <string>958.22627.55549.31829</string> </value> </item> <item> <key> <string>state</string> </key> @@ -387,7 +389,7 @@ NETWORK:\n </tuple> <state> <tuple> - <float>1488385456.73</float> + <float>1491211677.95</float> <string>UTC</string> </tuple> </state> diff --git a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_exportpage_html.html b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_exportpage_html.html new file mode 100644 index 0000000000000000000000000000000000000000..7e3adcaf34a3f9f15055d2d8926e957ed5b20d47 --- /dev/null +++ b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_exportpage_html.html @@ -0,0 +1,39 @@ +<!DOCTYPE html> +<html> + <head> + <!-- + data-i18n=Report + --> + <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> + <meta name="viewport" content="width=device-width, user-scalable=no" /> + <title>ERP5 Page Action</title> + + <!-- renderjs --> + <script src="rsvp.js" type="text/javascript"></script> + <script src="renderjs.js" type="text/javascript"></script> + + <script src="handlebars.js" type="text/javascript"></script> + + <!-- custom script --> + <script src="gadget_global.js" type="text/javascript"></script> + <script src="gadget_erp5_global.js" type="text/javascript"></script> + <script src="gadget_erp5_page_export.js" type="text/javascript"></script> + + <script id="table-template" type="text/x-handlebars-template"> + <section class="ui-content-header-plain"> + <h3 class="ui-content-title ui-body-c" data-i18n="[last]{{definition_i18n}}"> + <span class="ui-icon ui-icon-custom ui-icon-{{definition_icon}}"> </span> + {{definition_title}} + </h3> + </section> + <ul data-role="listview" data-theme="c" data-inset="true" class="document-listview"> + {{#each documentlist}} + <li><a data-i18n="{{title}}" class="ui-body-inherit" href="{{link}}">{{title}}</a></li> + {{/each}} + </ul> + </script> + + </head> + <body> + </body> +</html> \ No newline at end of file diff --git a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_exportpage_html.xml b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_exportpage_html.xml new file mode 100644 index 0000000000000000000000000000000000000000..ceb55170acfc7b63dfe36afe0d9aabaa8ed0b173 --- /dev/null +++ b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_exportpage_html.xml @@ -0,0 +1,324 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="Web Page" module="erp5.portal_type"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_Access_contents_information_Permission</string> </key> + <value> + <tuple> + <string>Anonymous</string> + <string>Assignee</string> + <string>Assignor</string> + <string>Associate</string> + <string>Auditor</string> + <string>Manager</string> + <string>Owner</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Add_portal_content_Permission</string> </key> + <value> + <tuple> + <string>Assignee</string> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Change_local_roles_Permission</string> </key> + <value> + <tuple> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Modify_portal_content_Permission</string> </key> + <value> + <tuple> + <string>Assignee</string> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_View_Permission</string> </key> + <value> + <tuple> + <string>Anonymous</string> + <string>Assignee</string> + <string>Assignor</string> + <string>Associate</string> + <string>Auditor</string> + <string>Manager</string> + <string>Owner</string> + </tuple> + </value> + </item> + <item> + <key> <string>content_md5</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>content_type</string> </key> + <value> <string>text/html</string> </value> + </item> + <item> + <key> <string>default_reference</string> </key> + <value> <string>gadget_erp5_page_export.html</string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>rjs_gadget_erp5_pt_exportpage_html</string> </value> + </item> + <item> + <key> <string>language</string> </key> + <value> <string>en</string> </value> + </item> + <item> + <key> <string>portal_type</string> </key> + <value> <string>Web Page</string> </value> + </item> + <item> + <key> <string>short_title</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Gadget ERP5 Export</string> </value> + </item> + <item> + <key> <string>version</string> </key> + <value> <string>001</string> </value> + </item> + <item> + <key> <string>workflow_history</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> + </dictionary> + </pickle> + </record> + <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <global name="PersistentMapping" module="Persistence.mapping"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>data</string> </key> + <value> + <dictionary> + <item> + <key> <string>document_publication_workflow</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> + </value> + </item> + <item> + <key> <string>edit_workflow</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent> + </value> + </item> + <item> + <key> <string>processing_status_workflow</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent> + </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </pickle> + </record> + <record id="3" aka="AAAAAAAAAAM="> + <pickle> + <global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/> + </pickle> + <pickle> + <tuple> + <none/> + <list> + <dictionary> + <item> + <key> <string>action</string> </key> + <value> <string>publish_alive</string> </value> + </item> + <item> + <key> <string>actor</string> </key> + <value> <string>zope</string> </value> + </item> + <item> + <key> <string>comment</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>error_message</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>time</string> </key> + <value> + <object> + <klass> + <global name="DateTime" module="DateTime.DateTime"/> + </klass> + <tuple> + <none/> + </tuple> + <state> + <tuple> + <float>1489072513.81</float> + <string>UTC</string> + </tuple> + </state> + </object> + </value> + </item> + <item> + <key> <string>validation_state</string> </key> + <value> <string>published_alive</string> </value> + </item> + </dictionary> + </list> + </tuple> + </pickle> + </record> + <record id="4" aka="AAAAAAAAAAQ="> + <pickle> + <global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/> + </pickle> + <pickle> + <tuple> + <none/> + <list> + <dictionary> + <item> + <key> <string>action</string> </key> + <value> <string>edit</string> </value> + </item> + <item> + <key> <string>actor</string> </key> + <value> <string>zope</string> </value> + </item> + <item> + <key> <string>comment</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>error_message</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>serial</string> </key> + <value> <string>957.58323.64047.9540</string> </value> + </item> + <item> + <key> <string>state</string> </key> + <value> <string>current</string> </value> + </item> + <item> + <key> <string>time</string> </key> + <value> + <object> + <klass> + <global name="DateTime" module="DateTime.DateTime"/> + </klass> + <tuple> + <none/> + </tuple> + <state> + <tuple> + <float>1489072645.22</float> + <string>UTC</string> + </tuple> + </state> + </object> + </value> + </item> + </dictionary> + </list> + </tuple> + </pickle> + </record> + <record id="5" aka="AAAAAAAAAAU="> + <pickle> + <global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/> + </pickle> + <pickle> + <tuple> + <none/> + <list> + <dictionary> + <item> + <key> <string>action</string> </key> + <value> <string>detect_converted_file</string> </value> + </item> + <item> + <key> <string>actor</string> </key> + <value> <string>zope</string> </value> + </item> + <item> + <key> <string>comment</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>error_message</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>external_processing_state</string> </key> + <value> <string>converted</string> </value> + </item> + <item> + <key> <string>serial</string> </key> + <value> <string>0.0.0.0</string> </value> + </item> + <item> + <key> <string>time</string> </key> + <value> + <object> + <klass> + <global name="DateTime" module="DateTime.DateTime"/> + </klass> + <tuple> + <none/> + </tuple> + <state> + <tuple> + <float>1489072502.32</float> + <string>UTC</string> + </tuple> + </state> + </object> + </value> + </item> + </dictionary> + </list> + </tuple> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_exportpage_js.js b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_exportpage_js.js new file mode 100644 index 0000000000000000000000000000000000000000..2a08f8b2b6c5c4e5dfd334da9aff3f59a242f362 --- /dev/null +++ b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_exportpage_js.js @@ -0,0 +1,97 @@ +/*global window, rJS, RSVP, Handlebars, calculatePageTitle */ +/*jslint nomen: true, indent: 2, maxerr: 3 */ +(function (window, rJS, RSVP, Handlebars, calculatePageTitle) { + "use strict"; + + ///////////////////////////////////////////////////////////////// + // Handlebars + ///////////////////////////////////////////////////////////////// + // Precompile the templates while loading the first gadget instance + var gadget_klass = rJS(window), + table_template = Handlebars.compile(gadget_klass.__template_element + .getElementById("table-template") + .innerHTML); + + gadget_klass + ///////////////////////////////////////////////////////////////// + // Acquired methods + ///////////////////////////////////////////////////////////////// + .declareAcquiredMethod("jio_getAttachment", "jio_getAttachment") + .declareAcquiredMethod("translateHtml", "translateHtml") + .declareAcquiredMethod("getUrlFor", "getUrlFor") + .declareAcquiredMethod("updateHeader", "updateHeader") + + ///////////////////////////////////////////////////////////////// + // declared methods + ///////////////////////////////////////////////////////////////// + .declareMethod("render", function (options) { + var gadget = this, + erp5_document, + result_list, + report_list; + + return gadget.jio_getAttachment(options.jio_key, "links") + .push(function (result) { + var i, i_len, + promise_list = [ + gadget.getUrlFor({command: 'change', options: {page: undefined}}) + ]; + erp5_document = result; + report_list = erp5_document._links.action_object_report_jio || []; + if (report_list.constructor !== Array) { + report_list = [report_list]; + } + for (i = 0; i < report_list.length; i += 1) { + promise_list.push( + gadget.getUrlFor({ + command: 'change', + options: { + view: report_list[i].href, + page: undefined, + editable: options.editable + } + }) + ); + } + return RSVP.all(promise_list); + }) + .push(function (all_result) { + var i, + tab_list = [], + report_tab_list = [], + html = ""; + + result_list = all_result; + + for (i = 0; i < report_list.length; i += 1) { + report_tab_list.push({ + title: report_list[i].title, + link: all_result[i + 1], + i18n: report_list[i].title + }); + } + if (i) { + html += table_template({ + definition_i18n: "Report", + definition_title: "Report", + definition_icon: "gear", + documentlist: report_tab_list + }); + } + + return RSVP.all([ + gadget.translateHtml(html), + calculatePageTitle(gadget, erp5_document) + ]); + }) + .push(function (last_result_list) { + gadget.element.innerHTML = last_result_list[0]; + + return gadget.updateHeader({ + back_url: result_list[0], + page_title: last_result_list[1] + }); + }); + }); + +}(window, rJS, RSVP, Handlebars, calculatePageTitle)); diff --git a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_exportpage_js.xml b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_exportpage_js.xml new file mode 100644 index 0000000000000000000000000000000000000000..e53e4e4268a088f8e23d5428fb580b1c78e048d7 --- /dev/null +++ b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_exportpage_js.xml @@ -0,0 +1,320 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="Web Script" module="erp5.portal_type"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_Access_contents_information_Permission</string> </key> + <value> + <tuple> + <string>Anonymous</string> + <string>Assignee</string> + <string>Assignor</string> + <string>Associate</string> + <string>Auditor</string> + <string>Manager</string> + <string>Owner</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Add_portal_content_Permission</string> </key> + <value> + <tuple> + <string>Assignee</string> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Change_local_roles_Permission</string> </key> + <value> + <tuple> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_Modify_portal_content_Permission</string> </key> + <value> + <tuple> + <string>Assignee</string> + <string>Assignor</string> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>_View_Permission</string> </key> + <value> + <tuple> + <string>Anonymous</string> + <string>Assignee</string> + <string>Assignor</string> + <string>Associate</string> + <string>Auditor</string> + <string>Manager</string> + <string>Owner</string> + </tuple> + </value> + </item> + <item> + <key> <string>content_md5</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>default_reference</string> </key> + <value> <string>gadget_erp5_page_export.js</string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>rjs_gadget_erp5_pt_exportpage_js</string> </value> + </item> + <item> + <key> <string>language</string> </key> + <value> <string>en</string> </value> + </item> + <item> + <key> <string>portal_type</string> </key> + <value> <string>Web Script</string> </value> + </item> + <item> + <key> <string>short_title</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Gadget ERP5 Export JS</string> </value> + </item> + <item> + <key> <string>version</string> </key> + <value> <string>001</string> </value> + </item> + <item> + <key> <string>workflow_history</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> + </dictionary> + </pickle> + </record> + <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <global name="PersistentMapping" module="Persistence.mapping"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>data</string> </key> + <value> + <dictionary> + <item> + <key> <string>document_publication_workflow</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> + </value> + </item> + <item> + <key> <string>edit_workflow</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent> + </value> + </item> + <item> + <key> <string>processing_status_workflow</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent> + </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </pickle> + </record> + <record id="3" aka="AAAAAAAAAAM="> + <pickle> + <global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/> + </pickle> + <pickle> + <tuple> + <none/> + <list> + <dictionary> + <item> + <key> <string>action</string> </key> + <value> <string>publish_alive</string> </value> + </item> + <item> + <key> <string>actor</string> </key> + <value> <string>zope</string> </value> + </item> + <item> + <key> <string>comment</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>error_message</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>time</string> </key> + <value> + <object> + <klass> + <global name="DateTime" module="DateTime.DateTime"/> + </klass> + <tuple> + <none/> + </tuple> + <state> + <tuple> + <float>1489072592.51</float> + <string>UTC</string> + </tuple> + </state> + </object> + </value> + </item> + <item> + <key> <string>validation_state</string> </key> + <value> <string>published_alive</string> </value> + </item> + </dictionary> + </list> + </tuple> + </pickle> + </record> + <record id="4" aka="AAAAAAAAAAQ="> + <pickle> + <global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/> + </pickle> + <pickle> + <tuple> + <none/> + <list> + <dictionary> + <item> + <key> <string>action</string> </key> + <value> <string>edit</string> </value> + </item> + <item> + <key> <string>actor</string> </key> + <value> <string>zope</string> </value> + </item> + <item> + <key> <string>comment</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>error_message</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>serial</string> </key> + <value> <string>958.23104.13268.55347</string> </value> + </item> + <item> + <key> <string>state</string> </key> + <value> <string>current</string> </value> + </item> + <item> + <key> <string>time</string> </key> + <value> + <object> + <klass> + <global name="DateTime" module="DateTime.DateTime"/> + </klass> + <tuple> + <none/> + </tuple> + <state> + <tuple> + <float>1490968345.34</float> + <string>UTC</string> + </tuple> + </state> + </object> + </value> + </item> + </dictionary> + </list> + </tuple> + </pickle> + </record> + <record id="5" aka="AAAAAAAAAAU="> + <pickle> + <global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/> + </pickle> + <pickle> + <tuple> + <none/> + <list> + <dictionary> + <item> + <key> <string>action</string> </key> + <value> <string>detect_converted_file</string> </value> + </item> + <item> + <key> <string>actor</string> </key> + <value> <string>zope</string> </value> + </item> + <item> + <key> <string>comment</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>error_message</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>external_processing_state</string> </key> + <value> <string>converted</string> </value> + </item> + <item> + <key> <string>serial</string> </key> + <value> <string>0.0.0.0</string> </value> + </item> + <item> + <key> <string>time</string> </key> + <value> + <object> + <klass> + <global name="DateTime" module="DateTime.DateTime"/> + </klass> + <tuple> + <none/> + </tuple> + <state> + <tuple> + <float>1489072580.14</float> + <string>UTC</string> + </tuple> + </state> + </object> + </value> + </item> + </dictionary> + </list> + </tuple> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_dialog_js.js b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_dialog_js.js index a26c8c93ad39197da7a86608e940d33e0af8445e..316c84d2faf45d1c2486fa3f48c194b4face42f6 100644 --- a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_dialog_js.js +++ b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_dialog_js.js @@ -1,8 +1,58 @@ /*jslint nomen: true, indent: 2, maxerr: 3 */ -/*global window, rJS, RSVP, URI, calculatePageTitle, jIO */ -(function (window, rJS, RSVP, URI, calculatePageTitle, jIO) { +/*global window, rJS, RSVP, URI, calculatePageTitle, Blob, URL, document, jIO */ +(function (window, rJS, RSVP, URI, calculatePageTitle, Blob, URL, document, jIO) { "use strict"; + function extractParamListFromContentDisposition(text) { + // text = " ATTACHMENT; FILENAME = MyFile " + // Returns -> [" ATTACHMENT", " FILENAME = MyFile "] + return text.split(";"); + } + + function parseContentDispositionParam(text) { + // text = " ATTACHMENT" + // Returns -> {name:"attachment", value:null} + // text = " FILENAME = MyFile " + // Returns -> {name:"filename", value:"MyFile"} + var i, l = text.length; + for (i = 0; i < l; i += 1) { + if (text[i] === "=") { + return {name: text.slice(0, i).trim().toLowerCase(), value: text.slice(i + 1).trim()}; + } + } + return {name: text.trim().toLowerCase(), value: null}; + } + + function parseEachContentDispositionParamToDict(paramList) { + // paramList = [" ATTACHMENT", " FILENAME = MyFile "] + // Returns -> {attachment: null, filename: "MyFile"} + var i, l = paramList.length, r = {}, p = null; + for (i = 0; i < l; i += 1) { + p = parseContentDispositionParam(paramList[i]); + r[p.name] = p.value; + } + return r; + } + + function parseContentDisposition(text) { + // text = " ATTACHMENT; FILENAME = MyFile " + // Returns -> {attachment:null, filename:"MyFile"} + return parseEachContentDispositionParamToDict(extractParamListFromContentDisposition(text)); + } + + function extractFilenameFromContentDisposition(text) { + // text = " ATTACHMENT; FILENAME = \"MyFile \" " + // Returns -> "MyFile " + var o = parseContentDisposition(text); + if (typeof o.filename === "string") { + if (o.filename[0] === "\"" && o.filename[o.filename.length - 1] === "\"") { + return o.filename.slice(1, -1); + } + return o.filename; + } + return null; + } + rJS(window) .setState({ title: "" @@ -120,6 +170,16 @@ }); }) + .declareJob("deferRevokeObjectUrlWithLink", function (object_url, a_tag) { + return new RSVP.Queue() + .push(function () { + return RSVP.delay(10); + }) + .push(function () { + URL.revokeObjectURL(object_url); + document.body.removeChild(a_tag); + }); + }) .onEvent('submit', function () { var form_gadget = this, @@ -172,6 +232,8 @@ location = evt.target.getResponseHeader("X-Location"), jio_key, list = [], + a, + object_url, message; try { message = JSON.parse(responseText).portal_status_message; @@ -183,8 +245,20 @@ list.push(form_gadget.redirect({command: 'history_previous'})); } else { if (location === undefined || location === null) { - // No redirection, stay on the same document - list.push(form_gadget.redirect({command: 'change', options: {view: "view", page: undefined, editable: form_gadget.state.editable}})); + // Download the data + if (evt.target.responseType === "blob") { + message = evt.target.response; + } else { + message = new Blob([evt.target.response], {type: evt.target.getResponseHeader("Content-Type")}); + } + object_url = URL.createObjectURL(message); + a = document.createElement("a"); + a.style = "display: none"; + a.href = object_url; + a.download = extractFilenameFromContentDisposition(evt.target.getResponseHeader("Content-Disposition")) || "untitled"; + document.body.appendChild(a); + a.click(); + form_gadget.deferRevokeObjectUrlWithLink(object_url, a); } else { jio_key = new URI(location).segment(2); if (form_gadget.state.id === jio_key) { @@ -222,4 +296,4 @@ }, false, true); -}(window, rJS, RSVP, URI, calculatePageTitle, jIO)); \ No newline at end of file +}(window, rJS, RSVP, URI, calculatePageTitle, Blob, URL, document, jIO)); \ No newline at end of file diff --git a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_list_js.js b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_list_js.js index dae8d3e3c7e509c5541c02174bae5f7f42b275f5..c9caea4a4a4ff66d73b837b5311512b880590fcc 100644 --- a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_list_js.js +++ b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_list_js.js @@ -83,6 +83,9 @@ new_content_action, form_gadget.getUrlFor({command: 'change', options: {page: "action"}}), form_gadget.getUrlFor({command: 'display', options: {}}), + form_gadget.state.erp5_document._links.action_object_report_jio ? + form_gadget.getUrlFor({command: 'change', options: {page: "export"}}) : + "", calculatePageTitle(form_gadget, form_gadget.state.erp5_document) ]); }) @@ -93,8 +96,8 @@ cut_url: "", add_url: all_gadget[0], actions_url: all_gadget[1], - export_url: "", - page_title: all_gadget[3], + export_url: all_gadget[3], + page_title: all_gadget[4], front_url: all_gadget[2], filter_action: true }); diff --git a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_js.js b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_js.js index 3f16a56c674768bc9472c6b5f8b71de4c4c11ea4..2daee4d97fff00d07d0b1c0c3dc4ecd5cb103280 100644 --- a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_js.js +++ b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_js.js @@ -65,6 +65,9 @@ gadget.getUrlFor({command: 'selection_previous'}), gadget.getUrlFor({command: 'selection_next'}), gadget.getUrlFor({command: 'change', options: {page: "tab"}}), + gadget.state.erp5_document._links.action_object_report_jio ? + gadget.getUrlFor({command: 'change', options: {page: "export"}}) : + "", calculatePageTitle(gadget, gadget.state.erp5_document) ]); }) @@ -76,8 +79,8 @@ previous_url: all_result[3], next_url: all_result[4], tab_url: all_result[5], - export_url: "", - page_title: all_result[6] + export_url: all_result[6], + page_title: all_result[7] }); }); }); diff --git a/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListExportDisabledLink.xml b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListExportDisabledLink.xml new file mode 100644 index 0000000000000000000000000000000000000000..ded96e772c9a4848dc5aaabe5d1419e206a060bb --- /dev/null +++ b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListExportDisabledLink.xml @@ -0,0 +1,58 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/> + </pickle> + <pickle> + <dictionary> + <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>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>testFormListExportDisabledLink</string> </value> + </item> + <item> + <key> <string>output_encoding</string> </key> + <value> <string>utf-8</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <unicode></unicode> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListExportDisabledLink.zpt b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListExportDisabledLink.zpt new file mode 100644 index 0000000000000000000000000000000000000000..afe4dead5f50e3daf8059e19af9d492431a79a63 --- /dev/null +++ b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListExportDisabledLink.zpt @@ -0,0 +1,37 @@ +<html xmlns:tal="http://xml.zope.org/namespaces/tal" + xmlns:metal="http://xml.zope.org/namespaces/metal"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Test Form List Export Disabled Link</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr><td rowspan="1" colspan="3">Test Default Module View</td></tr> +</thead><tbody> +<tal:block metal:use-macro="here/PTZuite_CommonTemplate/macros/init" /> + +<tr> + <td>open</td> + <td>${base_url}/web_site_module/renderjs_runner/#/bar_module</td> + <td></td> +</tr> + +<!-- Wait for gadget to be loaded --> +<tr> + <td>waitForElementPresent</td> + <td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_pt_form_list.html']</td> + <td></td> +</tr> + +<!-- Header has a link to the export page + Here, we assume that portal_types/Bar%20Module has no object_report_jio --> +<tr> + <td>waitForElementPresent</td> + <td>//div[@data-gadget-scope='header']//a[text()='Export' and contains(@class, 'ui-disabled')]</td> + <td></td> +</tr> + +</tbody></table> +</body> +</html> \ No newline at end of file diff --git a/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListExportLink.xml b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListExportLink.xml new file mode 100644 index 0000000000000000000000000000000000000000..7360bdaaa308e428d0bee1030876722a07df29b2 --- /dev/null +++ b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListExportLink.xml @@ -0,0 +1,58 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/> + </pickle> + <pickle> + <dictionary> + <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>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>testFormListExportLink</string> </value> + </item> + <item> + <key> <string>output_encoding</string> </key> + <value> <string>utf-8</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <unicode></unicode> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListExportLink.zpt b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListExportLink.zpt new file mode 100644 index 0000000000000000000000000000000000000000..b71045cb225d3871c0a3b5ada28a34c4eef5df1d --- /dev/null +++ b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListExportLink.zpt @@ -0,0 +1,57 @@ +<html xmlns:tal="http://xml.zope.org/namespaces/tal" + xmlns:metal="http://xml.zope.org/namespaces/metal"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Test Form List Actions Link</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr><td rowspan="1" colspan="3">Test Default Module View</td></tr> +</thead><tbody> +<tal:block metal:use-macro="here/PTZuite_CommonTemplate/macros/init" /> + +<tr> + <td>open</td> + <td>${base_url}/web_site_module/renderjs_runner/#/foo_module</td> + <td></td> +</tr> + +<!-- Wait for gadget to be loaded --> +<tr> + <td>waitForElementPresent</td> + <td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_pt_form_list.html']</td> + <td></td> +</tr> +<tr> + <td>waitForTextPresent</td> + <td>Foos</td> + <td></td> +</tr> + +<!-- Header has a link to the export page + Here we assume that portal_types/Foo%20Module has at least one object_report_jio --> +<tr> + <td>assertElementPresent</td> + <td>//div[@data-gadget-scope='header']//a[text()='Export' and contains(@href, '#!change') and contains(@href, 'n.page=export')]</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>//div[@data-gadget-scope='header']//a[text()='Export' and contains(@href, '#!change') and contains(@href, 'n.page=export')]</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_export.html']</td> + <td></td> +</tr> +<tr> + <td>assertTextPresent</td> + <td>Report</td> + <td></td> +</tr> + +</tbody></table> +</body> +</html> \ No newline at end of file diff --git a/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormViewExportDisabledLink.xml b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormViewExportDisabledLink.xml new file mode 100644 index 0000000000000000000000000000000000000000..4f0916c316ff7c72868a3b46c556c95d4c42004b --- /dev/null +++ b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormViewExportDisabledLink.xml @@ -0,0 +1,58 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/> + </pickle> + <pickle> + <dictionary> + <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>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>testFormViewExportDisabledLink</string> </value> + </item> + <item> + <key> <string>output_encoding</string> </key> + <value> <string>utf-8</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <unicode></unicode> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormViewExportDisabledLink.zpt b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormViewExportDisabledLink.zpt new file mode 100644 index 0000000000000000000000000000000000000000..1f483e2a44380314b84df8a03fe6fbe159f1777a --- /dev/null +++ b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormViewExportDisabledLink.zpt @@ -0,0 +1,75 @@ +<html xmlns:tal="http://xml.zope.org/namespaces/tal" + xmlns:metal="http://xml.zope.org/namespaces/metal"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Test Form View Export Disabled Link</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr><td rowspan="1" colspan="3">Test Default Module View</td></tr> +</thead><tbody> +<!--tal:block metal:use-macro="here/PTZuite_CommonTemplate/macros/init" /--> + <!-- reuse listbox suite reset to clear modules. --> + <tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" /> + <tr> + <td>open</td> + <td>${base_url}/bar_module/ListBoxZuite_reset</td> + <td></td> + </tr> + <tr> + <td>assertTextPresent</td> + <td>Reset Successfully.</td> + <td></td> + </tr> + <tr> + <td>open</td> + <!-- create a Bar --> + <td>${base_url}/bar_module/BarModule_createObjects?start:int=1&num:int=1</td> + <td></td> + </tr> + <tr> + <td>assertTextPresent</td> + <td>Created Successfully.</td> + <td></td> + </tr> + <tr> + <td>open</td> + <td>${base_url}/bar_module/Zuite_waitForActivities</td> + <td></td> + </tr> + <tr> + <td>assertTextPresent</td> + <td>Done.</td> + <td></td> + </tr> + +<tr> + <td>open</td> + <td>${base_url}/web_site_module/renderjs_runner/#/bar_module/1</td> + <td></td> +</tr> + +<!-- Wait for gadget to be loaded --> +<tr> + <td>waitForElementPresent</td> + <td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_pt_form_view.html']</td> + <td></td> +</tr> +<tr> + <td>waitForTextPresent</td> + <td>Title 1</td> + <td></td> +</tr> + +<!-- Header has a link to the export page + Here, we assume that portal_types/Bar has no object_report_jio --> +<tr> + <td>waitForElementPresent</td> + <td>//div[@data-gadget-scope='header']//a[text()='Export' and contains(@class, 'ui-disabled')]</td> + <td></td> +</tr> + +</tbody></table> +</body> +</html> \ No newline at end of file diff --git a/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormViewExportLink.xml b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormViewExportLink.xml new file mode 100644 index 0000000000000000000000000000000000000000..402a9a65ac4f58dd38d3da11a12fcc5825907a97 --- /dev/null +++ b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormViewExportLink.xml @@ -0,0 +1,58 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/> + </pickle> + <pickle> + <dictionary> + <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>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>testFormViewExportLink</string> </value> + </item> + <item> + <key> <string>output_encoding</string> </key> + <value> <string>utf-8</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <unicode></unicode> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormViewExportLink.zpt b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormViewExportLink.zpt new file mode 100644 index 0000000000000000000000000000000000000000..3044d2a5076edeb426e46551ca7192026d12521c --- /dev/null +++ b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormViewExportLink.zpt @@ -0,0 +1,57 @@ +<html xmlns:tal="http://xml.zope.org/namespaces/tal" + xmlns:metal="http://xml.zope.org/namespaces/metal"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Test Form View Export Link</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr><td rowspan="1" colspan="3">Test Default Module View</td></tr> +</thead><tbody> +<tal:block metal:use-macro="here/PTZuite_CommonTemplate/macros/init" /> + +<tr> + <td>open</td> + <td>${base_url}/web_site_module/renderjs_runner/#/foo_module/1</td> + <td></td> +</tr> + +<!-- Wait for gadget to be loaded --> +<tr> + <td>waitForElementPresent</td> + <td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_pt_form_view.html']</td> + <td></td> +</tr> +<tr> + <td>waitForTextPresent</td> + <td>Title 1</td> + <td></td> +</tr> + +<!-- Header has a link to the export page + Here, we assume that portal_types/Foo has at least one object_report_jio --> +<tr> + <td>assertElementPresent</td> + <td>//div[@data-gadget-scope='header']//a[text()='Export' and contains(@href, '#!change') and contains(@href, 'n.page=export')]</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>//div[@data-gadget-scope='header']//a[text()='Export' and contains(@href, '#!change') and contains(@href, 'n.page=export')]</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_export.html']</td> + <td></td> +</tr> +<tr> + <td>assertTextPresent</td> + <td>Title 1</td> + <td></td> +</tr> + +</tbody></table> +</body> +</html> \ No newline at end of file diff --git a/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_zuite/testPageExportBackLink.xml b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_zuite/testPageExportBackLink.xml new file mode 100644 index 0000000000000000000000000000000000000000..cba09e15836ac09ac46a3cc30e02c0c84a17b943 --- /dev/null +++ b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_zuite/testPageExportBackLink.xml @@ -0,0 +1,58 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/> + </pickle> + <pickle> + <dictionary> + <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>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>testPageExportBackLink</string> </value> + </item> + <item> + <key> <string>output_encoding</string> </key> + <value> <string>utf-8</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <unicode></unicode> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_zuite/testPageExportBackLink.zpt b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_zuite/testPageExportBackLink.zpt new file mode 100644 index 0000000000000000000000000000000000000000..a44c4138e5dfcfa9190526909ac0b7bb1a56b3d2 --- /dev/null +++ b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_zuite/testPageExportBackLink.zpt @@ -0,0 +1,59 @@ +<html xmlns:tal="http://xml.zope.org/namespaces/tal" + xmlns:metal="http://xml.zope.org/namespaces/metal"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Test Page Front</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr><td rowspan="1" colspan="3">Test Page Export Back List</td></tr> +</thead><tbody> +<tal:block metal:use-macro="here/PTZuite_CommonTemplate/macros/init" /> + +<tr> + <td>open</td> + <td>${base_url}/web_site_module/renderjs_runner/#/foo_module/1?page=export</td> + <td></td> +</tr> + +<!-- Wait for gadget to be loaded + Here we assume portal_types/Foo has at least one object_report_jio --> +<tr> + <td>waitForElementPresent</td> + <td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_export.html']</td> + <td></td> +</tr> +<tr> + <td>waitForTextPresent</td> + <td>Title 1</td> + <td></td> +</tr> + +<!-- Generate back link --> +<tr> + <td>assertElementPresent</td> + <td>//div[@data-gadget-scope='header']//a[text()='Foo: Title 1' and contains(@href, '#!change') and contains(@href, 'u.page=')]</td> + <td></td> +</tr> + +<!-- Follow back link --> +<tr> + <td>click</td> + <td>//div[@data-gadget-scope='header']//a[text()='Foo: Title 1' and contains(@href, '#!change') and contains(@href, 'u.page=')]</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_pt_form_view.html']</td> + <td></td> +</tr> +<tr> + <td>waitForTextPresent</td> + <td>Title 1</td> + <td></td> +</tr> + +</tbody></table> +</body> +</html> \ No newline at end of file diff --git a/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_zuite/testPageExportLinkList.xml b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_zuite/testPageExportLinkList.xml new file mode 100644 index 0000000000000000000000000000000000000000..0634a27885028808bb79b1ff073cfd29f8e3ad77 --- /dev/null +++ b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_zuite/testPageExportLinkList.xml @@ -0,0 +1,58 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/> + </pickle> + <pickle> + <dictionary> + <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>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>testPageExportLinkList</string> </value> + </item> + <item> + <key> <string>output_encoding</string> </key> + <value> <string>utf-8</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <unicode></unicode> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_zuite/testPageExportLinkList.zpt b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_zuite/testPageExportLinkList.zpt new file mode 100644 index 0000000000000000000000000000000000000000..1d355c8e59bb8c7968cc1b20987175db0e957537 --- /dev/null +++ b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_zuite/testPageExportLinkList.zpt @@ -0,0 +1,65 @@ +<html xmlns:tal="http://xml.zope.org/namespaces/tal" + xmlns:metal="http://xml.zope.org/namespaces/metal"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Test Page Front</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr><td rowspan="1" colspan="3">Test Page Tab Link List</td></tr> +</thead><tbody> +<tal:block metal:use-macro="here/PTZuite_CommonTemplate/macros/init" /> + +<tr> + <td>open</td> + <td>${base_url}/web_site_module/renderjs_runner/#/foo_module/1?page=export</td> + <td></td> +</tr> + +<!-- Wait for gadget to be loaded + Here we assume portal_types/Foo has at least one object_report_jio --> +<tr> + <td>waitForElementPresent</td> + <td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_export.html']</td> + <td></td> +</tr> +<tr> + <td>waitForTextPresent</td> + <td>Title 1</td> + <td></td> +</tr> + +<!-- Generate links to parents --> +<tr> + <td>assertTextPresent</td> + <td>Report</td> + <td></td> +</tr> + +<tr> + <td>assertElementPresent</td> + <td>//div[@data-gadget-scope='m']//a[text()='Do Nothing' and contains(@href, '#!change')]</td> + <td></td> +</tr> + +<!-- Follow one link --> +<tr> + <td>click</td> + <td>//div[@data-gadget-scope='m']//a[text()='Do Nothing' and contains(@href, '#!change')]</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_pt_form_dialog.html']</td> + <td></td> +</tr> +<tr> + <td>waitForTextPresent</td> + <td>Please do nothing</td> + <td></td> +</tr> + +</tbody></table> +</body> +</html> \ No newline at end of file diff --git a/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_zuite/testPageExportMenuAction.xml b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_zuite/testPageExportMenuAction.xml new file mode 100644 index 0000000000000000000000000000000000000000..3b7ce152091854739386f7df291e28febaf5b005 --- /dev/null +++ b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_zuite/testPageExportMenuAction.xml @@ -0,0 +1,58 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/> + </pickle> + <pickle> + <dictionary> + <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>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>testPageExportMenuAction</string> </value> + </item> + <item> + <key> <string>output_encoding</string> </key> + <value> <string>utf-8</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <unicode></unicode> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_zuite/testPageExportMenuAction.zpt b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_zuite/testPageExportMenuAction.zpt new file mode 100644 index 0000000000000000000000000000000000000000..701d8b087db1437a78220077e15e08c056bbab6e --- /dev/null +++ b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_zuite/testPageExportMenuAction.zpt @@ -0,0 +1,57 @@ +<html xmlns:tal="http://xml.zope.org/namespaces/tal" + xmlns:metal="http://xml.zope.org/namespaces/metal"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Test Page Front</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr><td rowspan="1" colspan="3">Test Page Export Breadcrumb List</td></tr> +</thead><tbody> +<tal:block metal:use-macro="here/PTZuite_CommonTemplate/macros/init" /> + +<tr> + <td>open</td> + <td>${base_url}/web_site_module/renderjs_runner/#/foo_module/1?page=export</td> + <td></td> +</tr> + +<!-- Wait for gadget to be loaded + Here we assume portal_types/Foo has at least one object_report_jio --> +<tr> + <td>waitForElementPresent</td> + <td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_export.html']</td> + <td></td> +</tr> +<tr> + <td>waitForTextPresent</td> + <td>Title 1</td> + <td></td> +</tr> + +<!-- Header has a menu button --> +<tr> + <td>assertElementPresent</td> + <td>//div[@data-gadget-scope='header']//button[text()='Menu' and @type='submit']</td> + <td></td> +</tr> +<tr> + <td>assertElementNotPresent</td> + <td>//div[@data-gadget-scope='panel' and contains(@class, 'visible')]</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>//div[@data-gadget-scope='header']//button[text()='Menu' and @type='submit']</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>//div[@data-gadget-scope='panel' and contains(@class, 'visible')]</td> + <td></td> +</tr> + +</tbody></table> +</body> +</html> \ No newline at end of file diff --git a/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_zuite/testPageExportReportSubmitWithRedirection.xml b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_zuite/testPageExportReportSubmitWithRedirection.xml new file mode 100644 index 0000000000000000000000000000000000000000..9a8805473cb9a3627447edf66645dc0f32479995 --- /dev/null +++ b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_zuite/testPageExportReportSubmitWithRedirection.xml @@ -0,0 +1,58 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/> + </pickle> + <pickle> + <dictionary> + <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>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>testPageExportReportSubmitWithRedirection</string> </value> + </item> + <item> + <key> <string>output_encoding</string> </key> + <value> <string>utf-8</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <unicode></unicode> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_zuite/testPageExportReportSubmitWithRedirection.zpt b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_zuite/testPageExportReportSubmitWithRedirection.zpt new file mode 100644 index 0000000000000000000000000000000000000000..be65f6691ba8cae438640d9eee60623db46752cc --- /dev/null +++ b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_zuite/testPageExportReportSubmitWithRedirection.zpt @@ -0,0 +1,66 @@ +<html xmlns:tal="http://xml.zope.org/namespaces/tal" + xmlns:metal="http://xml.zope.org/namespaces/metal"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Test Page Front</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr><td rowspan="1" colspan="3">Test Page Tab Link List</td></tr> +</thead><tbody> +<tal:block metal:use-macro="here/PTZuite_CommonTemplate/macros/init" /> + +<tr> + <td>open</td> + <td>${base_url}/web_site_module/renderjs_runner/#/foo_module/1?page=export</td> + <td></td> +</tr> + +<!-- Wait for gadget to be loaded + Here we assume portal_types/Foo has at least one object_report_jio --> +<tr> + <td>waitForElementPresent</td> + <td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_export.html']</td> + <td></td> +</tr> +<tr> + <td>waitForTextPresent</td> + <td>Title 1</td> + <td></td> +</tr> + +<!-- Generate links to parents --> +<tr> + <td>assertTextPresent</td> + <td>Report</td> + <td></td> +</tr> + +<tr> + <td>assertElementPresent</td> + <td>//div[@data-gadget-scope='m']//a[text()='Do Nothing' and contains(@href, '#!change')]</td> + <td></td> +</tr> + +<!-- Follow one link --> +<tr> + <td>click</td> + <td>//div[@data-gadget-scope='m']//a[text()='Do Nothing' and contains(@href, '#!change')]</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_pt_form_dialog.html']</td> + <td></td> +</tr> +<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" /> +<tr> + <td>waitForElementPresent</td> + <td>//a[@data-i18n="Views"]</td> + <td></td> +</tr> + +</tbody></table> +</body> +</html> \ No newline at end of file