Commit b21eb2a7 authored by Romain Courteaud's avatar Romain Courteaud

erp5_web_renderjs_ui: allow module to be part of the navigation history

parent d870d278
Pipeline #8369 passed with stage
in 0 seconds
......@@ -114,7 +114,7 @@
page: "action",
view: view
}},
{command: 'display', options: {}},
{command: 'history_previous'},
{command: 'display_dialog_with_history', options: {
jio_key: jio_key,
page: "export",
......
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>979.58035.58376.38417</string> </value>
<value> <string>980.25643.17614.37256</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1574157261.21</float>
<float>1584026863.34</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -645,13 +645,15 @@
var parent_link = erp5_document._links.parent,
uri,
options = {};
copyStickyParameterDict(previous_options, options);
if (parent_link !== undefined) {
uri = new URI(parent_link.href);
copyStickyParameterDict(previous_options, options);
options.jio_key = uri.segment(2);
// When redirecting to parent, always try to restore the state
return execDisplayStoredStateCommand(gadget, options);
}
// If no parent, return to the home page
return gadget.redirect({command: 'display', options: options});
}, function (error) {
if ((error instanceof jIO.util.jIOError) &&
(error.status_code === 404)) {
......
......@@ -236,7 +236,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>981.4330.60289.19831</string> </value>
<value> <string>982.31305.20902.62242</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -254,7 +254,7 @@
</tuple>
<state>
<tuple>
<float>1578649655.03</float>
<float>1584027522.41</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -34,12 +34,12 @@
<!-- Header has a link to the front page -->
<tr>
<td>assertElementPresent</td>
<td>//div[@data-gadget-scope='header']//a[text()='Foo Module' and contains(@href, '#!display')]</td>
<td>//div[@data-gadget-scope='header']//a[text()='Foo Module' and contains(@href, '#!history_previous')]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[@data-gadget-scope='header']//a[text()='Foo Module' and contains(@href, '#!display')]</td>
<td>//div[@data-gadget-scope='header']//a[text()='Foo Module' and contains(@href, '#!history_previous')]</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment