Commit aeafe20c authored by Romain Courteaud's avatar Romain Courteaud

[erp5_web_renderjs_ui] Keep the sort/columns choices when displaying a worklist

parent d830e69b
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
}; };
} }
promise_list.push(RSVP.all([ promise_list.push(RSVP.all([
gadget.getUrlFor({command: 'display', options: display_options}), gadget.getUrlFor({command: 'display_stored_state', options: display_options}),
// Remove the counter from the title // Remove the counter from the title
action_list[i].name, action_list[i].name,
action_list[i].count action_list[i].count
......
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>960.57179.36956.61457</string> </value> <value> <string>963.11788.48702.26146</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -248,7 +248,7 @@ ...@@ -248,7 +248,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1502119961.78</float> <float>1514540115.97</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -281,6 +281,23 @@ ...@@ -281,6 +281,23 @@
return addNavigationHistoryAndDisplay(gadget, jio_key, next_options); return addNavigationHistoryAndDisplay(gadget, jio_key, next_options);
} }
function calculateChangeOptions(previous_options, next_options, drop_options) {
var key;
for (key in previous_options) {
if (previous_options.hasOwnProperty(key)) {
if (!next_options.hasOwnProperty(key)) {
next_options[key] = previous_options[key];
}
}
}
for (key in drop_options) {
if (drop_options.hasOwnProperty(key)) {
delete next_options[key];
}
}
return next_options;
}
function execDisplayStoredStateCommand(gadget, next_options) { function execDisplayStoredStateCommand(gadget, next_options) {
// console.warn(command_options); // console.warn(command_options);
var jio_key = next_options.jio_key, var jio_key = next_options.jio_key,
...@@ -290,9 +307,7 @@ ...@@ -290,9 +307,7 @@
if (jio_key) { if (jio_key) {
queue = gadget.props.jio_state_gadget.get(jio_key) queue = gadget.props.jio_state_gadget.get(jio_key)
.push(function (options) { .push(function (options) {
// Keep the sticky parameters calculateChangeOptions(options, next_options);
copyStickyParameterDict(next_options, options);
next_options = options;
}, function (error) { }, function (error) {
if ((error instanceof jIO.util.jIOError) && if ((error instanceof jIO.util.jIOError) &&
(error.status_code === 404)) { (error.status_code === 404)) {
...@@ -309,23 +324,6 @@ ...@@ -309,23 +324,6 @@
}); });
} }
function calculateChangeOptions(previous_options, next_options, drop_options) {
var key;
for (key in previous_options) {
if (previous_options.hasOwnProperty(key)) {
if (!next_options.hasOwnProperty(key)) {
next_options[key] = previous_options[key];
}
}
}
for (key in drop_options) {
if (drop_options.hasOwnProperty(key)) {
delete next_options[key];
}
}
return next_options;
}
function execChangeCommand(previous_options, next_options, drop_options) { function execChangeCommand(previous_options, next_options, drop_options) {
var options, var options,
jio_key; jio_key;
......
...@@ -232,7 +232,7 @@ ...@@ -232,7 +232,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>963.65215.25184.4386</string> </value> <value> <string>964.29820.17700.38587</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -250,7 +250,7 @@ ...@@ -250,7 +250,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1512733510.73</float> <float>1514542054.97</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