Commit 1a67a050 authored by Roque's avatar Roque

erp5_officejs: common render form code into a officejs form view gadget

parent 8be75ebc
......@@ -213,11 +213,6 @@ gadget_officejs_setting.js\n
gadget_officejs_setting.html\n
\n
#text editor\n
#gadget_officejs_text_editor_router.html\n
#gadget_officejs_jio_web_page_view.html\n
#gadget_officejs_jio_web_page_view.js\n
#gadget_officejs_text_editor.json\n
#gadget_officejs_text_editor.json\n
officejs_logo_text_editor.png\n
\n
#discussion tool\n
......@@ -230,8 +225,8 @@ gadget_erp5_page_ojs_controller.html\n
gadget_erp5_page_ojs_controller.js\n
gadget_erp5_page_ojs_post_list.html\n
gadget_erp5_page_ojs_post_list.js\n
gadget_officejs_common_utils.html\n
gadget_officejs_common_utils.js\n
gadget_officejs_form_view.html\n
gadget_officejs_form_view.js\n
gadget_erp5_page_handle_action.html\n
gadget_erp5_page_handle_action.js\n
\n
......@@ -743,7 +738,7 @@ NETWORK:\n
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>975.6502.43039.38980</string> </value>
<value> <string>975.7925.35634.50875</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -761,7 +756,7 @@ NETWORK:\n
</tuple>
<state>
<tuple>
<float>1555610262.29</float>
<float>1555618417.31</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -269,7 +269,7 @@ NETWORK:\n
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>975.6492.62515.52684</string> </value>
<value> <string>975.7922.20540.53998</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -287,7 +287,7 @@ NETWORK:\n
</tuple>
<state>
<tuple>
<float>1555610260.52</float>
<float>1555617928.96</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -9,7 +9,7 @@
<script src="rsvp.js"></script>
<script src="renderjs.js"></script>
<script src="gadget_officejs_common_utils.js"></script>
<script src="gadget_officejs_form_view.js"></script>
</head>
......
......@@ -87,7 +87,7 @@
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget_officejs_common_utils.html</string> </value>
<value> <string>gadget_officejs_form_view.html</string> </value>
</item>
<item>
<key> <string>description</string> </key>
......@@ -97,7 +97,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>gadget_officejs_common_utils_html</string> </value>
<value> <string>gadget_officejs_form_view_html</string> </value>
</item>
<item>
<key> <string>language</string> </key>
......@@ -136,7 +136,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>OfficeJS Common Utils</string> </value>
<value> <string>Gadget OfficeJS Form View</string> </value>
</item>
<item>
<key> <string>url_string</string> </key>
......@@ -273,7 +273,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>974.64532.61017.11673</string> </value>
<value> <string>975.7931.7412.49851</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -291,7 +291,7 @@
</tuple>
<state>
<tuple>
<float>1555082263.73</float>
<float>1555618284.2</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -83,7 +83,7 @@
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>gadget_officejs_common_utils.js</string> </value>
<value> <string>gadget_officejs_form_view.js</string> </value>
</item>
<item>
<key> <string>description</string> </key>
......@@ -93,7 +93,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>gadget_officejs_common_utils_js</string> </value>
<value> <string>gadget_officejs_form_view_js</string> </value>
</item>
<item>
<key> <string>language</string> </key>
......@@ -132,7 +132,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>OfficeJS Common Utils JS</string> </value>
<value> <string>Gadget OfficeJS Form View JS</string> </value>
</item>
<item>
<key> <string>url_string</string> </key>
......@@ -269,7 +269,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>975.7547.42369.47735</string> </value>
<value> <string>975.7931.50394.10308</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -287,7 +287,7 @@
</tuple>
<state>
<tuple>
<float>1555610328.87</float>
<float>1555618316.02</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -22,9 +22,7 @@
/////////////////////////////////////////////////////////////////
.declareMethod("render", function (options) {
var gadget = this,
child_gadget_url = 'gadget_erp5_pt_form_view_editable.html',
parent_portal_type, action_code;
var gadget = this, parent_portal_type, action_code;
return RSVP.Queue()
.push(function () {
return RSVP.all([
......@@ -32,7 +30,7 @@
gadget.getUrlParameter("action_type"),
gadget.getUrlParameter("parent_portal_type"),
gadget.getSetting('parent_portal_type'),
gadget.declareGadget("gadget_officejs_common_utils.html")
gadget.declareGadget("gadget_officejs_form_view.html")
]);
})
.push(function (result) {
......@@ -47,9 +45,9 @@
action_code = form_definition.fields_raw_properties.gadget_field_action_js_script.values.renderjs_extra[0];
return window.eval.call(window, '(function (gadget, gadget_utils, options,\
action_reference, parent_portal_type,\
form_definition, child_gadget_url, submit_code)\
form_definition, submit_code)\
{' + action_code[0] + '})')
(gadget, gadget_utils, options, action_reference, parent_portal_type, form_definition, child_gadget_url, action_code[1]);
(gadget, gadget_utils, options, action_reference, parent_portal_type, form_definition, action_code[1]);
}
else {
throw "Field 'gadget_field_action_js_script' missing in action \
......
......@@ -269,7 +269,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>975.6480.52801.55961</string> </value>
<value> <string>975.7932.44543.51438</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -287,7 +287,7 @@
</tuple>
<state>
<tuple>
<float>1555531274.73</float>
<float>1555618542.84</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