Commit e3243bdf authored by Roque's avatar Roque

erp5_officejs: clean form view

parent 52cf97b9
......@@ -154,7 +154,8 @@
// XXX fix date rendering
.allowPublicAcquisition("jio_allDocs", function (param_list) {
var gadget = this, jio_gadget;
console.log("jio_allDocs params", param_list[0]);
//TODO make this customizable from config
//add a gadget reference on portal type or query config?
if (param_list[0].query.indexOf('portal_type:"Promise"') !== -1 &&
gadget.state.doc && gadget.state.doc.source) {
return new RSVP.Queue()
......@@ -163,9 +164,6 @@
})
.push(function (result) {
jio_gadget = result;
console.log("jio_alldocs for a promise!");
console.log("gadget.state.doc:", gadget.state.doc);
console.log("creating webhttp jio with url:", gadget.state.doc.source_url);
return jio_gadget.createJio({
type: "webhttp",
// XXX fix of url
......@@ -173,14 +171,11 @@
});
})
.push(function () {
console.log("jio created");
console.log("get id:", gadget.state.doc.source + ".history");
// get history file on live
return jio_gadget.get(
gadget.state.doc.source + ".history"
)
.push(undefined, function (error) {
console.log("error, no status_history");
if (error.name === "cancel") {
return undefined;
}
......@@ -279,11 +274,12 @@
});
}
}
console.log("result:", result);
return result;
});
});
}
//TODO make this customizable from config
//use global var set from config style_columns?
return gadget.jio_allDocs(param_list[0])
.push(function (result) {
var i, date, len = result.data.total_rows, date_key_array,
......@@ -319,9 +315,6 @@
};
}
});
console.log("jio_allDocs result data row", result.data.rows[i].value);
//TODO make it customizable from config
//use global var set from config style_columns
status_key_array.forEach((status_key) => {
if (result.data.rows[i].value.hasOwnProperty(status_key)) {
status = result.data.rows[i].value[status_key];
......
......@@ -258,7 +258,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1015.30241.64537.63761</string> </value>
<value> <string>1015.32763.29396.41386</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -278,7 +278,7 @@
</tuple>
<state>
<tuple>
<float>1711392147.81</float>
<float>1711543420.48</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