Commit 8c832785 authored by Roque's avatar Roque

erp5_officejs: minor code cleanup

parent e17e873f
...@@ -69,13 +69,13 @@ ...@@ -69,13 +69,13 @@
if (data.data.rows.length === 0) { if (data.data.rows.length === 0) {
throw "Can not find jio_view action for portal type " + portal_type; throw "Can not find jio_view action for portal type " + portal_type;
} }
return gadget.jio_get(data.data.rows[0].id) return gadget.jio_get(data.data.rows[0].id);
.push(function (action_result) { })
return gadget.jio_get(action_result.action) .push(function (action_result) {
.push(function (form_result) { return gadget.jio_get(action_result.action);
return form_result.form_definition; })
}); .push(function (form_result) {
}); return form_result.form_definition;
}); });
}) })
...@@ -120,16 +120,16 @@ ...@@ -120,16 +120,16 @@
return gadget.notifySubmitting() return gadget.notifySubmitting()
.push(function () { .push(function () {
// this should be jio_getattachment (using target_url) // this should be jio_getattachment (using target_url)
return gadget.jio_get(jio_key) return gadget.jio_get(jio_key);
.push(function (document) { })
var property; .push(function (document) {
for (property in content_dict) { var property;
if (content_dict.hasOwnProperty(property)) { for (property in content_dict) {
document[property] = content_dict[property]; if (content_dict.hasOwnProperty(property)) {
} document[property] = content_dict[property];
} }
return gadget.jio_put(jio_key, document); }
}); return gadget.jio_put(jio_key, document);
}) })
.push(function () { .push(function () {
return gadget.notifySubmitted({message: 'Data Updated', status: 'success'}); return gadget.notifySubmitted({message: 'Data Updated', status: 'success'});
......
...@@ -225,7 +225,7 @@ ...@@ -225,7 +225,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>974.43260.20145.4130</string> </value> <value> <string>974.44255.46695.13363</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -243,7 +243,7 @@ ...@@ -243,7 +243,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1553805993.3</float> <float>1553865642.95</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