Commit b5b0d9d3 authored by Roque's avatar Roque

erp5_officejs: get rid of hardcoded post module rendering (WIP)

- hateoas urls for get and store post module form definition
parent b478d32f
......@@ -255,11 +255,13 @@ jio_appcachestorage.js\n
hateoas/ERP5Document_getHateoas?mode=traverse&relative_url=portal_skins%2Ferp5_officejs_jio_connector%2FHTMLPost_viewAsJio&view=jio_view&appcache=1\n
hateoas/ERP5Document_getHateoas?mode=traverse&relative_url=portal_skins%2Ferp5_officejs_jio_connector%2FHTMLPost_viewReplyDialog&view=jio_view&appcache=1\n
hateoas/ERP5Document_getHateoas?mode=traverse&relative_url=portal_skins%2Ferp5_post%2FPostModule_newHTMLPost&view=jio_view&appcache=1\n
hateoas/ERP5Document_getHateoas?mode=traverse&relative_url=portal_skins%2Ferp5_post%2FPostModule_viewHTMLPostList&view=jio_view&appcache=1\n
hateoas/ERP5Document_getHateoas?mode=traverse&relative_url=portal_types%2FHTML%20Post%2F1&view=view&appcache=1\n
hateoas/ERP5Document_getHateoas?mode=traverse&relative_url=portal_types%2FHTML%20Post%2F2&view=view&appcache=1\n
hateoas/ERP5Document_getHateoas?mode=traverse&relative_url=portal_types%2FHTML%20Post%2F3&view=view&appcache=1\n
hateoas/ERP5Document_getHateoas?mode=traverse&relative_url=portal_types%2FPost%20Module%2F1&view=view&appcache=1\n
hateoas/ERP5Document_getHateoas?mode=traverse&relative_url=portal_types%2FPost%20Module%2F2&view=view&appcache=1\n
hateoas/ERP5Document_getHateoas?mode=traverse&relative_url=portal_types%2FPost%20Module%2F3&view=view&appcache=1\n
\n
gadget_erp5_field_listbox.html\n
gadget_erp5_field_listbox.js\n
......@@ -746,7 +748,7 @@ NETWORK:\n
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>975.23755.19438.47564</string> </value>
<value> <string>975.33891.43185.16366</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -764,7 +766,7 @@ NETWORK:\n
</tuple>
<state>
<tuple>
<float>1556573144.76</float>
<float>1557091528.6</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -119,11 +119,13 @@ CACHE:\n
hateoas/ERP5Document_getHateoas?mode=traverse&relative_url=portal_skins%2Ferp5_officejs_jio_connector%2FHTMLPost_viewAsJio&view=jio_view&appcache=1\n
hateoas/ERP5Document_getHateoas?mode=traverse&relative_url=portal_skins%2Ferp5_officejs_jio_connector%2FHTMLPost_viewReplyDialog&view=jio_view&appcache=1\n
hateoas/ERP5Document_getHateoas?mode=traverse&relative_url=portal_skins%2Ferp5_post%2FPostModule_newHTMLPost&view=jio_view&appcache=1\n
hateoas/ERP5Document_getHateoas?mode=traverse&relative_url=portal_skins%2Ferp5_post%2FPostModule_viewHTMLPostList&view=jio_view&appcache=1\n
hateoas/ERP5Document_getHateoas?mode=traverse&relative_url=portal_types%2FHTML%20Post%2F1&view=view&appcache=1\n
hateoas/ERP5Document_getHateoas?mode=traverse&relative_url=portal_types%2FHTML%20Post%2F2&view=view&appcache=1\n
hateoas/ERP5Document_getHateoas?mode=traverse&relative_url=portal_types%2FHTML%20Post%2F3&view=view&appcache=1\n
hateoas/ERP5Document_getHateoas?mode=traverse&relative_url=portal_types%2FPost%20Module%2F1&view=view&appcache=1\n
hateoas/ERP5Document_getHateoas?mode=traverse&relative_url=portal_types%2FPost%20Module%2F2&view=view&appcache=1\n
hateoas/ERP5Document_getHateoas?mode=traverse&relative_url=portal_types%2FPost%20Module%2F3&view=view&appcache=1\n
\n
NETWORK:\n
*
......@@ -269,7 +271,7 @@ NETWORK:\n
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>975.7922.20540.53998</string> </value>
<value> <string>975.33891.3939.51882</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -287,7 +289,7 @@ NETWORK:\n
</tuple>
<state>
<tuple>
<float>1555617928.96</float>
<float>1557091674.33</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -47,7 +47,6 @@
"default_params": {},
"editable": 1,
"editable_column_list": [],
//"key": "field_listbox",
"lines": 30,
"list_method": "portal_catalog",
// is this correct? the query should come from the form definition, right?
......@@ -57,7 +56,6 @@
"sort_column_list": [['title', 'Title'], ['modification_date', 'Modification Date']],
"sort": [['modification_date', 'descending']],
"title": "Posts"
//"type": "ListBox"
},
"tales": {},
"overrides": {},
......@@ -76,10 +74,16 @@
default_view = "jio_view",
common_utils_gadget_url = "gadget_officejs_common_utils.html",
child_gadget_url = 'gadget_erp5_pt_form_list.html';
return gadget.declareGadget(common_utils_gadget_url)
.push(function (gadget_utils) {
return RSVP.Queue()
.push(function () {
return RSVP.all([
gadget.getSetting('parent_portal_type'),
gadget.declareGadget("gadget_officejs_common_utils.html")
]);
})
.push(function (result) {
return gadget.getFormDefinition();
//return gadget_utils.getFormDefinition(jio_document.portal_type, default_view);
//return result[1].getFormDefinition(result[0], default_view);
})
.push(function (form_definition) {
return gadget.changeState({
......
......@@ -269,7 +269,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>975.33670.15324.9233</string> </value>
<value> <string>975.33902.30639.19097</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -287,7 +287,7 @@
</tuple>
<state>
<tuple>
<float>1557077120.63</float>
<float>1557091447.99</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