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