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 @@
};
}
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
action_list[i].name,
action_list[i].count
......
......@@ -230,7 +230,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>960.57179.36956.61457</string> </value>
<value> <string>963.11788.48702.26146</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>1502119961.78</float>
<float>1514540115.97</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -281,6 +281,23 @@
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) {
// console.warn(command_options);
var jio_key = next_options.jio_key,
......@@ -290,9 +307,7 @@
if (jio_key) {
queue = gadget.props.jio_state_gadget.get(jio_key)
.push(function (options) {
// Keep the sticky parameters
copyStickyParameterDict(next_options, options);
next_options = options;
calculateChangeOptions(options, next_options);
}, function (error) {
if ((error instanceof jIO.util.jIOError) &&
(error.status_code === 404)) {
......@@ -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) {
var options,
jio_key;
......
......@@ -232,7 +232,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>963.65215.25184.4386</string> </value>
<value> <string>964.29820.17700.38587</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -250,7 +250,7 @@
</tuple>
<state>
<tuple>
<float>1512733510.73</float>
<float>1514542054.97</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