Commit 681084e3 authored by Romain Courteaud's avatar Romain Courteaud 🐙

[erp5_web_renderjs_ui] Listbox is not editable in select mode

parent 87218072
...@@ -868,7 +868,7 @@ ...@@ -868,7 +868,7 @@
var lines = gadget.state.lines, var lines = gadget.state.lines,
promise_list = [], promise_list = [],
url_promise_list = [], url_promise_list = [],
allDocs_result = gadget.state.allDocs_result, allDocs_result = JSON.parse(gadget.state.allDocs_result),
counter, counter,
pagination_message = '', pagination_message = '',
content_value; content_value;
...@@ -965,7 +965,7 @@ ...@@ -965,7 +965,7 @@
} }
// note row's editable UID into gadget.props.listbox_uid_dict if exists to send it back to ERP5 // note row's editable UID into gadget.props.listbox_uid_dict if exists to send it back to ERP5
// together with ListBox data. The listbox_uid_dict has quite surprising structure {key: <key>, value: <uid-array>} // together with ListBox data. The listbox_uid_dict has quite surprising structure {key: <key>, value: <uid-array>}
if (allDocs_result.data.rows[i].value['listbox_uid:list'] !== undefined) { if ((!gadget.state.show_line_selector) && (allDocs_result.data.rows[i].value['listbox_uid:list'] !== undefined)) {
gadget.props.listbox_uid_dict.key = allDocs_result.data.rows[i].value['listbox_uid:list'].key; gadget.props.listbox_uid_dict.key = allDocs_result.data.rows[i].value['listbox_uid:list'].key;
gadget.props.listbox_uid_dict.value.push(allDocs_result.data.rows[i].value['listbox_uid:list'].value); gadget.props.listbox_uid_dict.value.push(allDocs_result.data.rows[i].value['listbox_uid:list'].value);
// we could come up with better name than "value" for almost everything ^^ // we could come up with better name than "value" for almost everything ^^
...@@ -1069,7 +1069,7 @@ ...@@ -1069,7 +1069,7 @@
nav_element.appendChild(fragment); nav_element.appendChild(fragment);
}) })
.push(function () { .push(function () {
var result_sum = (gadget.state.allDocs_result.sum || {}).rows || [], // render summary footer if available var result_sum = (allDocs_result.sum || {}).rows || [], // render summary footer if available
summary = result_sum.map(function (row, row_index) { summary = result_sum.map(function (row, row_index) {
var row_editability = row['listbox_uid:list'] !== undefined; var row_editability = row['listbox_uid:list'] !== undefined;
return { return {
...@@ -1188,7 +1188,7 @@ ...@@ -1188,7 +1188,7 @@
}) })
.push(function (result) { .push(function (result) {
return gadget.changeState({ return gadget.changeState({
allDocs_result: result allDocs_result: JSON.stringify(result)
}); });
}, function (error) { }, function (error) {
......
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>972.64219.61976.2884</string> </value> <value> <string>974.49753.38890.51660</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>1547458514.41</float> <float>1554195993.54</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