Commit 8c832785 authored by Roque's avatar Roque

erp5_officejs: minor code cleanup

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