Commit 8c832785 authored by Roque's avatar Roque

erp5_officejs: minor code cleanup

parent e17e873f
......@@ -69,14 +69,14 @@
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)
return gadget.jio_get(data.data.rows[0].id);
})
.push(function (action_result) {
return gadget.jio_get(action_result.action)
return gadget.jio_get(action_result.action);
})
.push(function (form_result) {
return form_result.form_definition;
});
});
});
})
.declareMethod("renderForm", function (form_definition, document) {
......@@ -120,7 +120,8 @@
return gadget.notifySubmitting()
.push(function () {
// 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;
for (property in content_dict) {
......@@ -129,7 +130,6 @@
}
}
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