Commit 1e197fef authored by Romain Courteaud's avatar Romain Courteaud 🐙

[erp5_web_renderjs_ui] Copy all visible doc if nothing is selected

parent 06f64a9b
......@@ -66,12 +66,23 @@
var action_list = ensureArray(this.state.erp5_document._links.action_object_list_action || []),
action_name = argument_list[0],
checked_uid_list = argument_list[1],
unchecked_uid_list = argument_list[2],
gadget = this,
extended_search = gadget.state.extended_search,
view,
i;
if (action_name === 'copy_document_list') {
if (checked_uid_list.length === 0) {
// If nothing is checked, use all unchecked values (same as xhtml style)
checked_uid_list = unchecked_uid_list;
}
if (checked_uid_list.length === 0) {
// XXX Queries do not correctly handle empty uid list
return gadget.redirect({
command: 'reload'
});
}
console.log('Copying', checked_uid_list);
return gadget.setSetting('clipboard', checked_uid_list)
.push(function () {
......
......@@ -228,7 +228,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>974.42547.505.51302</string> </value>
<value> <string>974.42553.1221.60569</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -246,7 +246,7 @@
</tuple>
<state>
<tuple>
<float>1553763421.11</float>
<float>1553784596.9</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