Commit 728f7c57 authored by Romain Courteaud's avatar Romain Courteaud

[erp5_web_jabber_client] Prevent loading 1000+ gadgets on page

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