Commit 194ce8e4 authored by Roque's avatar Roque

erp5_officejs: refactoring on action handling

parent d37bafac
......@@ -273,7 +273,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>974.63378.21801.49920</string> </value>
<value> <string>974.63378.56871.18141</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -291,7 +291,7 @@
</tuple>
<state>
<tuple>
<float>1555012972.05</float>
<float>1556111736.92</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -53,7 +53,7 @@
})
.push(function (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 {
throw "Field 'gadget_field_action_js_script' missing in action form. Please check '" + action_reference + "' action configuration.";
......@@ -66,8 +66,9 @@
})
.onStateChange(function () {
return gadget_utils.renderGadget(this);
return action_gadget.render(this);
})
.allowPublicAcquisition('notifySubmit', function () {
return this.triggerSubmit();
})
......@@ -85,7 +86,7 @@
content_dict = options[2],
submit_code = gadget.state.submit_code;
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));
......@@ -269,7 +269,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>975.15167.546.1297</string> </value>
<value> <string>975.16139.11100.7901</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -287,7 +287,7 @@
</tuple>
<state>
<tuple>
<float>1556052425.93</float>
<float>1556111042.18</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