diff --git a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_header_js.js b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_header_js.js index 28ac41dc51e91c5c44c59002b29c793cc568d36a..970bed4d21a0b8eed9c2d1f23d369375ba61a15f 100644 --- a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_header_js.js +++ b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_header_js.js @@ -168,15 +168,16 @@ if (options.hasOwnProperty("page_title")) { state.title_text = options.page_title; } - if (options.hasOwnProperty("page_icon")) { - state.title_icon = options.page_icon; - } for (i = 0; i < possible_main_link_list.length; i += 1) { if (options.hasOwnProperty(possible_main_link_list[i][0])) { state.title_icon = possible_main_link_list[i][2]; state.title_url = options[possible_main_link_list[i][0]]; } } + // Surcharge icon if the page want it + if (options.hasOwnProperty("page_icon")) { + state.title_icon = options.page_icon; + } // Left button for (i = 0; i < possible_left_button_list.length; i += 1) { diff --git a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_header_js.xml b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_header_js.xml index 6ef79a4f849cdda4e401d7f0dfbf6d034a77f0b0..06bcf3f9d0d810e026eaf346528ccba76719dd86 100644 --- a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_header_js.xml +++ b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_header_js.xml @@ -230,7 +230,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>965.11893.61137.22886</string> </value> + <value> <string>965.14598.25770.31300</string> </value> </item> <item> <key> <string>state</string> </key> @@ -248,7 +248,7 @@ </tuple> <state> <tuple> - <float>1517476478.22</float> + <float>1518538755.9</float> <string>UTC</string> </tuple> </state> diff --git a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_history_js.js b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_history_js.js index 7e68f6187eb8095d305dc0db2d908d172e9c070b..64550a90376a75937de97722720ff3a4c743cc09 100644 --- a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_history_js.js +++ b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_history_js.js @@ -26,12 +26,17 @@ ///////////////////////////////////////////////////////////////// .declareMethod("render", function (options) { var gadget = this, - id_list = options.id_list || []; + id_list = options.id_list || [], + header_dict = { + page_title: 'History', + page_icon: 'history' + }; - return gadget.updateHeader({ - page_title: 'History', - page_icon: 'history' - }) + return gadget.getUrlFor({command: 'display'}) + .push(function (front_url) { + header_dict.front_url = front_url; + return gadget.updateHeader(header_dict); + }) .push(function () { var i, query_list = []; diff --git a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_history_js.xml b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_history_js.xml index 547bfe3a330f296f632c75872a3a05e682fd058b..7cd290d8da2637c270a852c840a7d47188b13aaf 100644 --- a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_history_js.xml +++ b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_history_js.xml @@ -230,7 +230,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>959.26374.14159.14984</string> </value> + <value> <string>965.30967.55562.31266</string> </value> </item> <item> <key> <string>state</string> </key> @@ -248,7 +248,7 @@ </tuple> <state> <tuple> - <float>1497280330.0</float> + <float>1518597817.52</float> <string>UTC</string> </tuple> </state> diff --git a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_search_js.js b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_search_js.js index acdef7fe99634b4a1e36c6e42f8a266b3dce7cca..662bc9ebd4754d4c700f6b1ef47e50e04a8b0c3a 100644 --- a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_search_js.js +++ b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_search_js.js @@ -47,9 +47,15 @@ return gadget.getUrlFor({command: 'history_previous'}); } }) - .push(function (result) { - if (result !== undefined) { - header_dict.selection_url = result; + .push(function (selection_url) { + if (selection_url === undefined) { + return gadget.getUrlFor({command: 'display'}); + } + header_dict.selection_url = selection_url; + }) + .push(function (front_url) { + if (front_url !== undefined) { + header_dict.front_url = front_url; } return gadget.updateHeader(header_dict); }) diff --git a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_search_js.xml b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_search_js.xml index a67afe299511275fa80288ccbbfc6ffb8d97950e..0abd2f8c9a737a25f13fbe19d9283167ef6ce53c 100644 --- a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_search_js.xml +++ b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_search_js.xml @@ -230,7 +230,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>964.17304.25136.14216</string> </value> + <value> <string>965.31874.35241.45806</string> </value> </item> <item> <key> <string>state</string> </key> @@ -248,7 +248,7 @@ </tuple> <state> <tuple> - <float>1513849015.9</float> + <float>1518597351.54</float> <string>UTC</string> </tuple> </state> diff --git a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_worklist_js.js b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_worklist_js.js index 7ccfa045c1f6f6615a1fd05149d7de07dc064cc9..45f3482df64a92c4e695448168a747d882a175c1 100644 --- a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_worklist_js.js +++ b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_worklist_js.js @@ -26,12 +26,17 @@ // declared methods ///////////////////////////////////////////////////////////////// .declareMethod("render", function () { - var gadget = this; + var gadget = this, + header_dict = { + page_title: 'Worklist', + page_icon: 'tasks' + }; - return gadget.updateHeader({ - page_title: 'Worklist', - page_icon: 'tasks' - }) + return gadget.getUrlFor({command: 'display'}) + .push(function (url) { + header_dict.front_url = url; + return gadget.updateHeader(header_dict); + }) .push(function () { return gadget.jio_getAttachment( 'portal_workflow', diff --git a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_worklist_js.xml b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_worklist_js.xml index c7927fa124f329a62c45e06fc9decb1e53f2129a..f0e582ab5a4f70d5b4e3f57d40f87f21428efda6 100644 --- a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_worklist_js.xml +++ b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_worklist_js.xml @@ -230,7 +230,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>964.44610.27477.10598</string> </value> + <value> <string>964.54335.52932.23808</string> </value> </item> <item> <key> <string>state</string> </key> @@ -248,7 +248,7 @@ </tuple> <state> <tuple> - <float>1515763245.19</float> + <float>1518542729.19</float> <string>UTC</string> </tuple> </state> diff --git a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_frontpage_js.js b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_frontpage_js.js index 99b111f6f1f9b6f858c14a4c76a3dc14c995b84d..dc30ea823189f39332bcc656e3864e7cd4db1dff 100644 --- a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_frontpage_js.js +++ b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_frontpage_js.js @@ -96,7 +96,11 @@ filter_action: true }; - return gadget.updateHeader(header_dict) + return gadget.getUrlFor({command: 'display'}) + .push(function (front_url) { + header_dict.front_url = front_url; + return gadget.updateHeader(header_dict); + }) .push(function () { return gadget.getDeclaredGadget('form_list'); }) diff --git a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_frontpage_js.xml b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_frontpage_js.xml index ae14db8930dd65354598a088789f1766665f047d..6943f057c760e857bcd8204a44cbfe92b3232c9c 100644 --- a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_frontpage_js.xml +++ b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_frontpage_js.xml @@ -230,7 +230,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>965.29083.22768.16418</string> </value> + <value> <string>965.30895.62413.8584</string> </value> </item> <item> <key> <string>state</string> </key> @@ -248,7 +248,7 @@ </tuple> <state> <tuple> - <float>1518429915.13</float> + <float>1518597596.15</float> <string>UTC</string> </tuple> </state> diff --git a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_logoutform_js.js b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_logoutform_js.js index 3ab6859873d738eca5a7dff3102b4993afdb458e..0c506ae7187ffb9c7cbc391ae1850af5302e3414 100644 --- a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_logoutform_js.js +++ b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_logoutform_js.js @@ -17,11 +17,17 @@ // declared methods ///////////////////////////////////////////////////////////////// .declareMethod("render", function () { - var gadget = this; - return gadget.updateHeader({ - page_title: 'Logout', - page_icon: 'power-off' - }) + var gadget = this, + header_dict = { + page_title: 'Logout', + page_icon: 'power-off' + }; + + return gadget.getUrlFor({command: 'display'}) + .push(function (front_url) { + header_dict.front_url = front_url; + return gadget.updateHeader(header_dict); + }) .push(function () { return gadget.translateHtml(gadget.element.innerHTML); }) diff --git a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_logoutform_js.xml b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_logoutform_js.xml index c46f74b7e6f803fd427939b5c9d7e25234367ee7..aea0c3ceaa6d02a091e011d99c7820b385f5b74a 100644 --- a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_logoutform_js.xml +++ b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_logoutform_js.xml @@ -230,7 +230,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>959.26374.14159.14984</string> </value> + <value> <string>963.11788.48702.26146</string> </value> </item> <item> <key> <string>state</string> </key> @@ -248,7 +248,7 @@ </tuple> <state> <tuple> - <float>1497280467.65</float> + <float>1518598022.73</float> <string>UTC</string> </tuple> </state> diff --git a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_preferencepage_js.js b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_preferencepage_js.js index 1f120c31075ecda40371690215e6c257108e591c..35c77843376b492e4d99f21feb7a093b3b28bac0 100644 --- a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_preferencepage_js.js +++ b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_preferencepage_js.js @@ -12,6 +12,7 @@ .declareAcquiredMethod("getSetting", "getSetting") .declareAcquiredMethod("setSetting", "setSetting") .declareAcquiredMethod("jio_get", "jio_get") + .declareAcquiredMethod("getUrlFor", "getUrlFor") .declareAcquiredMethod("jio_allDocs", "jio_allDocs") .declareAcquiredMethod("notifySubmitting", "notifySubmitting") .declareAcquiredMethod("notifySubmitted", "notifySubmitted") @@ -22,12 +23,18 @@ ///////////////////////////////////////////////////////////////// .declareMethod("render", function () { var gadget = this, - user = "Who are you?"; - return gadget.updateHeader({ - page_title: 'Preferences', - page_icon: 'sliders', - save_action: true - }) + user = "Who are you?", + header_dict = { + page_title: 'Preferences', + page_icon: 'sliders', + save_action: true + }; + + return gadget.getUrlFor({command: 'display'}) + .push(function (front_url) { + header_dict.front_url = front_url; + return gadget.updateHeader(header_dict); + }) .push(function () { return gadget.getDeclaredGadget("erp5_form"); }) diff --git a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_preferencepage_js.xml b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_preferencepage_js.xml index 6451b857ee4abaa6054a7c76e36228ef45bd3f4b..646101f4cb6129f7530205e4dbf6d7573b60354b 100644 --- a/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_preferencepage_js.xml +++ b/bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_preferencepage_js.xml @@ -230,7 +230,7 @@ </item> <item> <key> <string>serial</string> </key> - <value> <string>961.52328.26727.8140</string> </value> + <value> <string>965.31910.8218.62941</string> </value> </item> <item> <key> <string>state</string> </key> @@ -248,7 +248,7 @@ </tuple> <state> <tuple> - <float>1515763195.95</float> + <float>1518599460.13</float> <string>UTC</string> </tuple> </state> diff --git a/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_zuite/testPageFrontBackLink.xml b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_zuite/testPageFrontBackLink.xml new file mode 100644 index 0000000000000000000000000000000000000000..cccda377e6859b047959dd5b06b06719335eda06 --- /dev/null +++ b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_zuite/testPageFrontBackLink.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>testPageFrontBackLink</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/testPageFrontBackLink.zpt b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_zuite/testPageFrontBackLink.zpt new file mode 100644 index 0000000000000000000000000000000000000000..4475bb8d2a1a30e86d8cb49f3e98f001fdcc4fe5 --- /dev/null +++ b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_zuite/testPageFrontBackLink.zpt @@ -0,0 +1,51 @@ +<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 Back Link</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr><td rowspan="1" colspan="3">Test Module List main link</td></tr> +</thead><tbody> +<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" /> + +<tr> + <td>open</td> + <td>${base_url}/web_site_module/renderjs_runner/#/?page=front</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_page_front.html']</td> + <td></td> +</tr> +<tr> + <td>waitForTextPresent</td> + <td>Foos</td> + <td></td> +</tr> + +<!-- Header has a link to the front page --> +<tr> + <td>assertElementPresent</td> + <td>//div[@data-gadget-scope='header']//a[text()='Modules' and contains(@href, '#!display')]</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>//div[@data-gadget-scope='header']//a[text()='Modules' and contains(@href, '#!display')]</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_worklist.html']</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/testPageHistoryBackLink.xml b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_zuite/testPageHistoryBackLink.xml new file mode 100644 index 0000000000000000000000000000000000000000..2ae35226f22045a90439a130abbcda786d4033fa --- /dev/null +++ b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_zuite/testPageHistoryBackLink.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>testPageHistoryBackLink</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/testPageHistoryBackLink.zpt b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_zuite/testPageHistoryBackLink.zpt new file mode 100644 index 0000000000000000000000000000000000000000..99c2f33b27e49babd7c3fbe440666854d2f4da1d --- /dev/null +++ b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_zuite/testPageHistoryBackLink.zpt @@ -0,0 +1,46 @@ +<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 Back Link</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr><td rowspan="1" colspan="3">Test history main link</td></tr> +</thead><tbody> +<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" /> + +<tr> + <td>open</td> + <td>${base_url}/web_site_module/renderjs_runner/#/?page=history</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_page_history.html']</td> + <td></td> +</tr> + +<!-- Header has a link to the front page --> +<tr> + <td>assertElementPresent</td> + <td>//div[@data-gadget-scope='header']//a[text()='History' and contains(@href, '#!display')]</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>//div[@data-gadget-scope='header']//a[text()='History' and contains(@href, '#!display')]</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_worklist.html']</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/testPageLogoutBackLink.xml b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_zuite/testPageLogoutBackLink.xml new file mode 100644 index 0000000000000000000000000000000000000000..6747e4150a90ee08d454bb4ba0d8bb36ca240593 --- /dev/null +++ b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_zuite/testPageLogoutBackLink.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>testPageLogoutBackLink</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/testPageLogoutBackLink.zpt b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_zuite/testPageLogoutBackLink.zpt new file mode 100644 index 0000000000000000000000000000000000000000..be447e4ff4cb6b410e05469f734049ca045bd793 --- /dev/null +++ b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_zuite/testPageLogoutBackLink.zpt @@ -0,0 +1,51 @@ +<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 Back Link</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr><td rowspan="1" colspan="3">Test Module List main link</td></tr> +</thead><tbody> +<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" /> + +<tr> + <td>open</td> + <td>${base_url}/web_site_module/renderjs_runner/#/?page=logout</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_page_logout.html']</td> + <td></td> +</tr> +<tr> + <td>waitForTextPresent</td> + <td>Logout</td> + <td></td> +</tr> + +<!-- Header has a link to the front page --> +<tr> + <td>assertElementPresent</td> + <td>//div[@data-gadget-scope='header']//a[text()='Logout' and contains(@href, '#!display')]</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>//div[@data-gadget-scope='header']//a[text()='Logout' and contains(@href, '#!display')]</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_worklist.html']</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/testPagePreferenceBackLink.xml b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_zuite/testPagePreferenceBackLink.xml new file mode 100644 index 0000000000000000000000000000000000000000..5e6b8f47c88d755f3459345aed421b70883db19a --- /dev/null +++ b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_zuite/testPagePreferenceBackLink.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>testPagePreferenceBackLink</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/testPagePreferenceBackLink.zpt b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_zuite/testPagePreferenceBackLink.zpt new file mode 100644 index 0000000000000000000000000000000000000000..6ed5181ae2ae279aa59b3182024c091c85c59dfb --- /dev/null +++ b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_zuite/testPagePreferenceBackLink.zpt @@ -0,0 +1,51 @@ +<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 Back Link</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr><td rowspan="1" colspan="3">Test preference main link</td></tr> +</thead><tbody> +<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" /> + +<tr> + <td>open</td> + <td>${base_url}/web_site_module/renderjs_runner/#/?page=preference</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_page_preference.html']</td> + <td></td> +</tr> +<tr> + <td>waitForTextPresent</td> + <td>Language</td> + <td></td> +</tr> + +<!-- Header has a link to the previous history entry --> +<tr> + <td>assertElementPresent</td> + <td>//div[@data-gadget-scope='header']//a[text()='Preferences' and contains(@href, '#!display')]</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>//div[@data-gadget-scope='header']//a[text()='Preferences' and contains(@href, '#!display')]</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_worklist.html']</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/testPageSearchBackLink.xml b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_zuite/testPageSearchBackLink.xml new file mode 100644 index 0000000000000000000000000000000000000000..63c4b51f739171b596d1753d41a143c976c0014f --- /dev/null +++ b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_zuite/testPageSearchBackLink.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>testPageSearchBackLink</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/testPageSearchBackLink.zpt b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_zuite/testPageSearchBackLink.zpt new file mode 100644 index 0000000000000000000000000000000000000000..907f9001d4d49c1b7eb25e8dd6fb9c2da4c89a16 --- /dev/null +++ b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_zuite/testPageSearchBackLink.zpt @@ -0,0 +1,46 @@ +<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 Back Link</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr><td rowspan="1" colspan="3">Test search main link</td></tr> +</thead><tbody> +<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" /> + +<tr> + <td>open</td> + <td>${base_url}/web_site_module/renderjs_runner/#/?page=search</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_page_search.html']</td> + <td></td> +</tr> + +<!-- Header has a link to the previous history entry --> +<tr> + <td>assertElementPresent</td> + <td>//div[@data-gadget-scope='header']//a[text()='Search' and contains(@href, '#!display')]</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>//div[@data-gadget-scope='header']//a[text()='Search' and contains(@href, '#!display')]</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_worklist.html']</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/testPageSearchInputQuery.zpt b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_zuite/testPageSearchInputQuery.zpt index ce7c50fdad0dbd5b532723c5fda80019d931e47d..a3df7329793a75282aba483218395c542ba41ebe 100644 --- a/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_zuite/testPageSearchInputQuery.zpt +++ b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_zuite/testPageSearchInputQuery.zpt @@ -47,7 +47,7 @@ <td>//div[@data-gadget-url='${runner_url}gadget_erp5_panel.html']//div[@data-gadget-url='${runner_url}gadget_erp5_searchfield.html']//button[@type='submit']</td> <td></td> </tr> -<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded_in_menu_page" /> +<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" /> <!-- Verify that panel search query is empty but main search input is not --> <tr> diff --git a/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_zuite/testPageSearchMenuAction.zpt b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_zuite/testPageSearchMenuAction.zpt index 10b14c1b093e6b72866d24f752891ce536c8791d..e6d253be5ef215ab81aae664378c4949cb41711f 100644 --- a/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_zuite/testPageSearchMenuAction.zpt +++ b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_zuite/testPageSearchMenuAction.zpt @@ -29,11 +29,6 @@ <td></td> </tr> -<tr> - <td>assertElementPresent</td> - <td>//div[@data-gadget-scope='header']//h1//span[text()='Search']</td> - <td></td> -</tr> <!-- Header has a menu button --> <tr> <td>assertElementPresent</td> diff --git a/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_zuite/testPageWorklistBackLink.xml b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_zuite/testPageWorklistBackLink.xml new file mode 100644 index 0000000000000000000000000000000000000000..e563abb3308926b7e75a530bc340885504f37ef2 --- /dev/null +++ b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_zuite/testPageWorklistBackLink.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>testPageWorklistBackLink</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/testPageWorklistBackLink.zpt b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_zuite/testPageWorklistBackLink.zpt new file mode 100644 index 0000000000000000000000000000000000000000..986ba2094a3fd436520355db7c360eaf7c2a31dc --- /dev/null +++ b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_zuite/testPageWorklistBackLink.zpt @@ -0,0 +1,47 @@ +<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 Back Link</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr><td rowspan="1" colspan="3">Test Module List main link</td></tr> +</thead><tbody> +<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" /> + +<tr> + <td>open</td> + <td>${base_url}/web_site_module/renderjs_runner/#/?page=worklist</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_page_worklist.html']</td> + <td></td> +</tr> + +<!-- Header has a link to the front page --> +<tr> + <td>assertElementPresent</td> + <td>//div[@data-gadget-scope='header']//a[text()='Worklist' and contains(@href, '#!display')]</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>//div[@data-gadget-scope='header']//a[text()='Worklist' and contains(@href, '#!display')]</td> + <td></td> +</tr> +<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" /> +<tr> + <td>waitForElementPresent</td> + <td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_worklist.html']</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_translate_zuite/testPageSearch.zpt b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_translate_zuite/testPageSearch.zpt index bffc12a5de5541579eeed0fcfb7281f670ef5d91..51d0e7b46b54977b2075787422434dec8f04f0d5 100644 --- a/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_translate_zuite/testPageSearch.zpt +++ b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_translate_zuite/testPageSearch.zpt @@ -29,7 +29,7 @@ </tr> <tal:block tal:define="search_query python: 'translated_portal_type: "Web Script"'"> - <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/search_in_form_list_without_header_url" /> + <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/search_in_form_list" /> </tal:block> diff --git a/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_zuite/testRenderjsRecoverPassword.zpt b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_zuite/testRenderjsRecoverPassword.zpt index a4fbd943ea8721e75e7b19bdaf99e99b966be560..091c9dd5124a091607af75896e8d8e58e98b22ff 100644 --- a/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_zuite/testRenderjsRecoverPassword.zpt +++ b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_zuite/testRenderjsRecoverPassword.zpt @@ -235,7 +235,7 @@ </tr> <tr> <td>waitForElementPresent</td> - <td>//span[@data-i18n='Worklist']</td> + <td>//h1//a[@data-i18n='Worklist']</td> <td></td> </tr>