Commit 2aa0e382 authored by Romain Courteaud's avatar Romain Courteaud

[erp5_web_jabber_client] Prevent loading 1000+ gadgets on page

parent bc1e0279
......@@ -31,36 +31,13 @@
var gadget = this;
return gadget.jio_allDocs(param_list[0])
.push(function (result) {
var i, len = result.data.total_rows;
var i,
len = result.data.total_rows;
for (i = 0; i < len; i += 1) {
if (result.data.rows[i].value.hasOwnProperty("connected")) {
result.data.rows[i].value.connected = {
editable: 0,
hidden: 0,
"default": result.data.rows[i].value.connected,
key: "field_connected",
required: 0,
type: "CheckBoxField"
};
result.data.rows[i].value["listbox_uid:list"] = {
key: "listbox_uid:list",
value: 2713
};
}
if (result.data.rows[i].value.hasOwnProperty("notification")) {
result.data.rows[i].value.notification = {
editable: 0,
hidden: 0,
"default": result.data.rows[i].value.notification,
key: "field_notification",
required: 0,
type: "CheckBoxField"
};
result.data.rows[i].value["listbox_uid:list"] = {
key: "listbox_uid:list",
value: 2713
};
}
result.data.rows[i].value.connected =
result.data.rows[i].value.connected ? '' : '';
result.data.rows[i].value.notification =
result.data.rows[i].value.notification ? '' : '';
}
return result;
});
......@@ -98,10 +75,10 @@
"column_list": column_list,
"show_anchor": 0,
"default_params": {},
"editable": 1,
"editable_column_list": column_list,
"editable": 0,
"editable_column_list": [],
"key": "field_listbox",
"lines": 1000,
"lines": 20,
"list_method": "portal_catalog",
"query": "urn:jio:allDocs",
"portal_type": [],
......
......@@ -230,7 +230,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>963.13593.12902.41028</string> </value>
<value> <string>963.19286.54749.51780</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>1509722579.38</float>
<float>1510065460.75</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