Commit c6253d8c authored by Romain Courteaud's avatar Romain Courteaud

[erp5_web_renderjs_ui] Listbox: cancel previous line rendering to not conflict...

[erp5_web_renderjs_ui] Listbox: cancel previous line rendering to not conflict with the asynchronous render
parent 726b4635
...@@ -268,6 +268,8 @@ ...@@ -268,6 +268,8 @@
} }
field_json.search_column_list.push(["searchable_text", "Searchable Text"]); field_json.search_column_list.push(["searchable_text", "Searchable Text"]);
// Cancel previous line rendering to not conflict with the asynchronous render for now
gadget.renderContent(true);
return new RSVP.Queue() return new RSVP.Queue()
.push(function () { .push(function () {
return renderListbox(gadget); return renderListbox(gadget);
...@@ -325,7 +327,7 @@ ...@@ -325,7 +327,7 @@
////////////////////////////////////////////// //////////////////////////////////////////////
// render the listbox in an asynchronous way // render the listbox in an asynchronous way
////////////////////////////////////////////// //////////////////////////////////////////////
.declareJob('renderContent', function () { .declareJob('renderContent', function (only_cancel) {
var gadget = this, var gadget = this,
props = gadget.props, props = gadget.props,
field_json = props.field_json, field_json = props.field_json,
...@@ -340,6 +342,10 @@ ...@@ -340,6 +342,10 @@
queue, queue,
i; i;
if (only_cancel) {
return;
}
if (field_json.query === undefined) { if (field_json.query === undefined) {
gadget.props.element.querySelector('tfoot').textContent = "Unsupported list method: '" + field_json.list_method + "'"; gadget.props.element.querySelector('tfoot').textContent = "Unsupported list method: '" + field_json.list_method + "'";
return; return;
......
...@@ -236,7 +236,7 @@ ...@@ -236,7 +236,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>954.32802.16853.18875</string> </value> <value> <string>954.46086.29232.63761</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -254,7 +254,7 @@ ...@@ -254,7 +254,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1476090462.0</float> <float>1476887535.66</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