Commit 34c30f73 authored by Gabriel Monnerat's avatar Gabriel Monnerat

erp5_web_renderjs_ui: Fix navigation

After click on graphic and go back, the page is redirected to home instead of display the graphic again
parent 883a6391
......@@ -27,7 +27,6 @@
if (!rendered_document.hasOwnProperty(field_name)) {
return;
}
suboptions = {
hide_enabled: form_definition.hide_enabled, // listbox specific
configure_enabled: form_definition.configure_enabled, // listbox specific
......@@ -35,6 +34,7 @@
field_type: rendered_document[field_name].type,
label: ((group_name !== "bottom") && (rendered_document[field_name].title.length > 0)), // no label for bottom group and field without title
field_json: rendered_document[field_name], // pass
jio_key: modification_dict.jio_key,
enable_graphic: modification_dict.enable_graphic
};
......@@ -187,7 +187,6 @@
if (options.form_definition.hasOwnProperty("edit_form_update_href")) {
hash += "edit_form_update_action";
}
return this.changeState({
erp5_document: options.erp5_document,
form_definition: options.form_definition,
......
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>997.28933.33599.15445</string> </value>
<value> <string>997.31802.64350.38400</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1641917242.86</float>
<float>1642089373.2</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -414,7 +414,6 @@
query_string,
url_query,
queue;
/** Transform sort arguments (column_name, sort_direction) to jIO's "ascending" and "descending" **/
function jioize_sort(column_sort) {
if (column_sort[1].toLowerCase().startsWith('asc')) {
......@@ -526,6 +525,7 @@
return gadget.getUrlParameter("graphic_type")
.push(function (graphic_type) {
return gadget.changeState({
jio_key: options.jio_key,
key: field_json.key,
title: field_json.title,
editable: field_json.editable,
......@@ -1238,6 +1238,7 @@
group_by = column_list_json[i][0];
group_by_title = column_list_json[i][1];
return graphic_gadget.render({
jio_key: gadget.state.jio_key,
group_by: group_by,
query_by: {},
title: group_by_title,
......@@ -1278,6 +1279,7 @@
for (i = 0; i < domain_list.length; i += 1) {
if (domain_list[i].domain_id === gadget.state.graphic_type) {
return graphic_gadget.render({
jio_key: gadget.state.jio_key,
group_by: group_by,
query_by: {},
title: gadget.state.title,
......
......@@ -240,7 +240,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>997.29251.8391.10461</string> </value>
<value> <string>997.31801.5987.49169</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -258,7 +258,7 @@
</tuple>
<state>
<tuple>
<float>1641943433.03</float>
<float>1642089281.52</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -19,8 +19,9 @@
return gadget.getSearchCriteria(params[0][0], params[0][1])
.push(function (result) {
return gadget.redirect({
command: 'store_and_change',
command: 'display_with_history',
options: {
jio_key: gadget.state.jio_key,
extended_search: result
}
});
......@@ -79,6 +80,7 @@
column_list = options.layout.x.column_list,
domain_id = options.layout.x.domain_id,
data = {
jio_key: options.jio_key,
x: options.layout.x.key,
title: options.title || options.layout.x.title,
x_title: options.layout.x.title,
......
......@@ -246,7 +246,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>997.30932.12258.23176</string> </value>
<value> <string>997.31802.54309.25309</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -264,7 +264,7 @@
</tuple>
<state>
<tuple>
<float>1642037131.72</float>
<float>1642089304.69</float>
<string>UTC</string>
</tuple>
</state>
......
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