Commit f6f91be3 authored by Roque's avatar Roque

erp5_officejs: solved todos and minor fixes

parent 37378bbd
...@@ -191,8 +191,7 @@ ...@@ -191,8 +191,7 @@
form_definition, form_definition,
query_type, query_type,
query_parent, query_parent,
query_reference, query_reference;
hide_add_button;
query_reference = new SimpleQuery({ query_reference = new SimpleQuery({
key: "reference", key: "reference",
operator: "", operator: "",
......
...@@ -269,7 +269,7 @@ ...@@ -269,7 +269,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>976.34276.53444.54016</string> </value> <value> <string>976.34277.31524.53111</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -287,7 +287,7 @@ ...@@ -287,7 +287,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1561044808.85</float> <float>1561477042.12</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
if (jio_document.portal_type === undefined) { if (jio_document.portal_type === undefined) {
throw new Error('Can not display document: ' + options.jio_key); throw new Error('Can not display document: ' + options.jio_key);
} }
}, function (error) {}) }, function () {})
.push(function () { .push(function () {
return gadget.getSetting('parent_portal_type'); return gadget.getSetting('parent_portal_type');
}) })
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
}) })
.push(function (result) { .push(function (result) {
return result; return result;
}, function (error) { }, function () {
return gadget_utils.getFormDefinition(portal_type, default_view); return gadget_utils.getFormDefinition(portal_type, default_view);
}) })
.push(function (result) { .push(function (result) {
......
...@@ -228,7 +228,7 @@ ...@@ -228,7 +228,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>976.31188.39410.57719</string> </value> <value> <string>976.41486.5263.546</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -246,7 +246,7 @@ ...@@ -246,7 +246,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1560859510.75</float> <float>1561478018.46</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"use strict"; "use strict";
function renderField(field_id, field_definition, document) { function renderField(field_id, field_definition, document) {
var key, raw_value, tales_expr, override, final_value, result = {}; var key, raw_value, tales_expr, override, final_value, item_list, result = {};
for (key in field_definition.values) { for (key in field_definition.values) {
if (field_definition.values.hasOwnProperty(key)) { if (field_definition.values.hasOwnProperty(key)) {
// order to get the final value (based on Field.py get_value) // order to get the final value (based on Field.py get_value)
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
result.key = field_id; result.key = field_id;
if (document && document.hasOwnProperty(field_id)) { if (document && document.hasOwnProperty(field_id)) {
if (field_definition.type === "ListField") { if (field_definition.type === "ListField") {
var item_list = ensureArray(document[field_id]).map(function (item) { item_list = ensureArray(document[field_id]).map(function (item) {
if (Array.isArray(item)) {return item; } if (Array.isArray(item)) {return item; }
return [item, item]; return [item, item];
}); });
...@@ -200,7 +200,7 @@ ...@@ -200,7 +200,7 @@
erp5_document = form_json.erp5_document; erp5_document = form_json.erp5_document;
if (form_json.form_definition.allowed_sub_types_list && if (form_json.form_definition.allowed_sub_types_list &&
form_json.form_definition.allowed_sub_types_list.length > 0 && form_json.form_definition.allowed_sub_types_list.length > 0 &&
! form_json.form_definition.hide_add_button) { !form_json.form_definition.hide_add_button) {
url_for_parameter_list.push({command: 'change', options: {page: "create_document", jio_key: options.jio_key, portal_type: options.portal_type, allowed_sub_types_list: form_json.form_definition.allowed_sub_types_list}}); url_for_parameter_list.push({command: 'change', options: {page: "create_document", jio_key: options.jio_key, portal_type: options.portal_type, allowed_sub_types_list: form_json.form_definition.allowed_sub_types_list}});
add_url = true; add_url = true;
} }
......
...@@ -269,7 +269,7 @@ ...@@ -269,7 +269,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>976.34270.16303.42564</string> </value> <value> <string>976.41478.42498.65211</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -287,7 +287,7 @@ ...@@ -287,7 +287,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1561044820.12</float> <float>1561477012.65</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -209,10 +209,6 @@ ...@@ -209,10 +209,6 @@
console.log("Unauthorized access to storage, sync cancelled"); console.log("Unauthorized access to storage, sync cancelled");
return; return;
} }
//TODO: ignore sync error to make other officejs apps work
//until configuration manifest file name is get from app-settings
console.log("ERROR WHILE SYNC. Omitting error in non-migrated app");
return;
throw error; throw error;
}); });
}); });
......
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>976.21310.32010.65041</string> </value> <value> <string>976.41487.334.13226</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -252,7 +252,7 @@ ...@@ -252,7 +252,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1560266942.88</float> <float>1561477486.75</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -10,9 +10,7 @@ ...@@ -10,9 +10,7 @@
var gadget_klass = rJS(window), var gadget_klass = rJS(window),
table_template = Handlebars.compile(gadget_klass.__template_element table_template = Handlebars.compile(gadget_klass.__template_element
.getElementById("table-template") .getElementById("table-template")
.innerHTML), .innerHTML);
// TODO: check if there are other categories that are 'views' and find a less hardcoded way to get this
view_categories = ["object_view", "object_jio_view", "object_web_view", "object_list"];
/** Render translated HTML of title + links /** Render translated HTML of title + links
* *
......
...@@ -228,7 +228,7 @@ ...@@ -228,7 +228,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>976.32543.31646.51592</string> </value> <value> <string>976.41484.14260.5085</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -246,7 +246,7 @@ ...@@ -246,7 +246,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1560940816.44</float> <float>1561477231.0</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -228,7 +228,7 @@ ...@@ -228,7 +228,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>976.33879.24839.5393</string> </value> <value> <string>976.41482.55363.33194</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -246,7 +246,7 @@ ...@@ -246,7 +246,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1561020945.58</float> <float>1561477140.56</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