Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Joshua
erp5
Commits
0bce4239
Commit
0bce4239
authored
Jun 22, 2018
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_web_renderjs_ui] When redirecting to parent, always try to restore the state
parent
670e37e1
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
51 additions
and
25 deletions
+51
-25
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_router_js.js
...TemplateItem/web_page_module/rjs_gadget_erp5_router_js.js
+3
-1
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_router_js.xml
...emplateItem/web_page_module/rjs_gadget_erp5_router_js.xml
+2
-2
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormViewBackLink.zpt
...renderjs_ui_page_templates_zuite/testFormViewBackLink.zpt
+22
-11
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormViewEditableBackLink.zpt
..._ui_page_templates_zuite/testFormViewEditableBackLink.zpt
+22
-11
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_relation_field_zuite/testRelationFieldWithNonSavedPageContent.zpt
..._field_zuite/testRelationFieldWithNonSavedPageContent.zpt
+2
-0
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_router_js.js
View file @
0bce4239
...
...
@@ -564,7 +564,9 @@
if
(
parent_link
!==
undefined
)
{
uri
=
new
URI
(
parent_link
.
href
);
copyStickyParameterDict
(
previous_options
,
options
);
return
addNavigationHistoryAndDisplay
(
gadget
,
uri
.
segment
(
2
),
options
);
options
.
jio_key
=
uri
.
segment
(
2
);
// When redirecting to parent, always try to restore the state
return
execDisplayStoredStateCommand
(
gadget
,
options
);
}
},
function
(
error
)
{
if
((
error
instanceof
jIO
.
util
.
jIOError
)
&&
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_router_js.xml
View file @
0bce4239
...
...
@@ -232,7 +232,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
7.35176.12886.11639
</string>
</value>
<value>
<string>
96
8.25647.25725.53981
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -250,7 +250,7 @@
</tuple>
<state>
<tuple>
<float>
152
6656132.45
</float>
<float>
152
9677697.42
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormViewBackLink.zpt
View file @
0bce4239
...
...
@@ -11,21 +11,31 @@
</thead><tbody>
<tal:block
metal:use-macro=
"here/PTZuite_CommonTemplate/macros/init"
/>
<!-- First, create a stored test on the module -->
<tr>
<td>
open
</td>
<td>
${base_url}/web_site_module/renderjs_runner/#/foo_module
/1
</td>
<td>
${base_url}/web_site_module/renderjs_runner/#/foo_module
?editable=true
</td>
<td></td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded"
/>
<tal:block
tal:define=
"search_query python: 'foobar'"
>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/search_in_form_list"
/>
</tal:block>
<!-- Wait for gadget to be loaded -->
<!-- Then, display a child document without any history -->
<tr><td>
open
</td>
<td>
${base_url}/foo_module/Zuite_waitForActivities
</td><td></td></tr>
<tr><td>
assertTextPresent
</td>
<td>
Done.
</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>
open
</td>
<td>
${base_url}/web_site_module/renderjs_runner/#/foo_module/1
</td>
<td></td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded"
/>
<tr>
<td>
waitForTex
tPresent
</td>
<td>
Title 1
</td>
<td>
assertElemen
tPresent
</td>
<td>
//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_pt_form_view.html']
</td>
<td></td>
</tr>
...
...
@@ -40,16 +50,17 @@
<td>
//div[@data-gadget-scope='header']//a[text()='Foo: Title 1' and contains(@href, '#!history_previous')]
</td>
<td></td>
</tr>
<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>
<t
r>
<td>
waitForTextPresent
</td
>
<t
d>
Foos
</td
>
<td></td
>
<
/tr
>
<t
al:block
tal:define=
"parsed_query python: '';
search_query python: 'foobar'"
>
<t
al:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/check_search_in_form_list"
/
>
</tal:block
>
<
tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/verify_is_non_editable_mode"
/
>
</tbody></table>
</body>
...
...
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormViewEditableBackLink.zpt
View file @
0bce4239
...
...
@@ -11,21 +11,31 @@
</thead><tbody>
<tal:block
metal:use-macro=
"here/PTZuite_CommonTemplate/macros/init"
/>
<!-- First, create a stored test on the module -->
<tr>
<td>
open
</td>
<td>
${base_url}/web_site_module/renderjs_runner/#/foo_module
/1?editable=true
</td>
<td>
${base_url}/web_site_module/renderjs_runner/#/foo_module
</td>
<td></td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded"
/>
<tal:block
tal:define=
"search_query python: 'foobar'"
>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/search_in_form_list"
/>
</tal:block>
<!-- Wait for gadget to be loaded -->
<!-- Then, display a child document without any history -->
<tr><td>
open
</td>
<td>
${base_url}/foo_module/Zuite_waitForActivities
</td><td></td></tr>
<tr><td>
assertTextPresent
</td>
<td>
Done.
</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_editable.html']
</td>
<td>
open
</td>
<td>
${base_url}/web_site_module/renderjs_runner/#/foo_module/1?editable=true
</td>
<td></td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded"
/>
<tr>
<td>
waitForTex
tPresent
</td>
<td>
Title 1
</td>
<td>
assertElemen
tPresent
</td>
<td>
//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_pt_form_view_editable.html']
</td>
<td></td>
</tr>
...
...
@@ -40,16 +50,17 @@
<td>
//div[@data-gadget-scope='header']//a[text()='Foo: Title 1' and contains(@href, '#!history_previous')]
</td>
<td></td>
</tr>
<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>
<t
r>
<td>
waitForTextPresent
</td
>
<t
d>
Foos
</td
>
<td></td
>
<
/tr
>
<t
al:block
tal:define=
"parsed_query python: '';
search_query python: 'foobar'"
>
<t
al:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/check_search_in_form_list"
/
>
</tal:block
>
<
tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/verify_is_editable_mode"
/
>
</tbody></table>
</body>
...
...
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_relation_field_zuite/testRelationFieldWithNonSavedPageContent.zpt
View file @
0bce4239
...
...
@@ -29,6 +29,8 @@
<td>
${base_url}/web_site_module/renderjs_runner/#/foo_module
</td>
<td></td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/clear_query"
/>
<tr>
<td>
waitForElementPresent
</td>
<td>
//a[@data-i18n='Add']
</td>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment