Commit 194ce8e4 authored by Roque's avatar Roque

erp5_officejs: refactoring on action handling

parent d37bafac
...@@ -14,6 +14,5 @@ ...@@ -14,6 +14,5 @@
</head> </head>
<body> <body>
HANDLE ACTION
</body> </body>
</html> </html>
...@@ -273,7 +273,7 @@ ...@@ -273,7 +273,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>974.63378.21801.49920</string> </value> <value> <string>974.63378.56871.18141</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -291,7 +291,7 @@ ...@@ -291,7 +291,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1555012972.05</float> <float>1556111736.92</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
}) })
.push(function (declared_gadget) { .push(function (declared_gadget) {
action_gadget = declared_gadget; action_gadget = declared_gadget;
return action_gadget.handleRender(gadget, gadget_utils, options, action_reference, parent_portal_type, form_definition); return action_gadget.handleRender(gadget, options, action_reference, form_definition);
}); });
} else { } else {
throw "Field 'gadget_field_action_js_script' missing in action form. Please check '" + action_reference + "' action configuration."; throw "Field 'gadget_field_action_js_script' missing in action form. Please check '" + action_reference + "' action configuration.";
...@@ -66,8 +66,9 @@ ...@@ -66,8 +66,9 @@
}) })
.onStateChange(function () { .onStateChange(function () {
return gadget_utils.renderGadget(this); return action_gadget.render(this);
}) })
.allowPublicAcquisition('notifySubmit', function () { .allowPublicAcquisition('notifySubmit', function () {
return this.triggerSubmit(); return this.triggerSubmit();
}) })
...@@ -85,7 +86,7 @@ ...@@ -85,7 +86,7 @@
content_dict = options[2], content_dict = options[2],
submit_code = gadget.state.submit_code; submit_code = gadget.state.submit_code;
if (action_type === "object_jio_js_script") { if (action_type === "object_jio_js_script") {
action_gadget.handleSubmit(gadget, gadget_utils, jio_key, content_dict); action_gadget.handleSubmit(gadget, jio_key, content_dict);
} }
}); });
}(window, document, rJS, RSVP)); }(window, document, rJS, RSVP));
...@@ -269,7 +269,7 @@ ...@@ -269,7 +269,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>975.15167.546.1297</string> </value> <value> <string>975.16139.11100.7901</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>1556052425.93</float> <float>1556111042.18</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