Commit b31889dd authored by Roque's avatar Roque

erp5_officejs_connector: gadget fields for actions

parent d5ef34ab
...@@ -67,9 +67,7 @@ ...@@ -67,9 +67,7 @@
<item> <item>
<key> <string>hidden</string> </key> <key> <string>hidden</string> </key>
<value> <value>
<list> <list/>
<string>gadget_field_action_js_script</string>
</list>
</value> </value>
</item> </item>
<item> <item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="GadgetField" module="Products.ERP5Form.GadgetField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>gadget_field_action_js_script</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
<item>
<key> <string>no_validator</string> </key>
<value> <string>Does not support this operation.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>data_url</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>gadget_url</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>js_sandbox</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>renderjs_extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>validator_field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>validator_form_id</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>data_url</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>gadget_url</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>js_sandbox</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>renderjs_extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>validator_field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>validator_form_id</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>data_url</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>gadget_url</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>js_sandbox</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>renderjs_extra</string> </key>
<value>
<list>
<tuple>
<string>console.log("[from JIO_VIEW gadget field] this is the render form code");</string>
<string>console.log("[from JIO_VIEW gadget field] this is the submit form code");</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>gadget_field_action_js_script</string> </value>
</item>
<item>
<key> <string>validator_field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>validator_form_id</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -224,7 +224,7 @@ ...@@ -224,7 +224,7 @@
<value> <value>
<list> <list>
<tuple> <tuple>
<string>return gadget.jio_get(options.jio_key).push(function(result) {parent_document = result; var title = parent_document.title; if (!title.startsWith(\'Re: \')) { title = \'Re: \' + parent_document.title; } return gadget.changeState({ doc: { title: title }, submit_code: submit_code, parent_document: parent_document, child_gadget_url: child_gadget_url, form_definition: form_definition, view: action_reference, editable: true, has_more_views: false, has_more_actions: false, is_form_list: false }); });</string> <string>return gadget.jio_get(options.jio_key).push(function (result) { parent_document = result; var title = parent_document.title; if (!title.startsWith(\'Re: \')) { title = \'Re: \' + parent_document.title; } return gadget.changeState({ doc: {title: title}, submit_code: submit_code, parent_document: parent_document, child_gadget_url: child_gadget_url, form_definition: form_definition, view: action_reference, editable: true, has_more_views: false, has_more_actions: false, is_form_list: false }); });</string>
<string>var document = { my_title: gadget.state.doc.title, portal_type: gadget.state.parent_document.portal_type, parent_relative_url: gadget.state.parent_document.parent_relative_url, my_source_reference: gadget.state.parent_document.source_reference }, property; for (property in content_dict) { if (content_dict.hasOwnProperty(property)) { document[\'my_\' + property] = content_dict[property]; } } return gadget_utils.createDocument(document).push(function(id) { jio_key = id; return gadget.notifySubmitting(); }).push(function() { return gadget.notifySubmitted({ message: \'Data Updated\', status: \'success\' }); }).push(function() { return gadget.redirect({ command: \'display\', options: { jio_key: jio_key, editable: true } }); });</string> <string>var document = { my_title: gadget.state.doc.title, portal_type: gadget.state.parent_document.portal_type, parent_relative_url: gadget.state.parent_document.parent_relative_url, my_source_reference: gadget.state.parent_document.source_reference }, property; for (property in content_dict) { if (content_dict.hasOwnProperty(property)) { document[\'my_\' + property] = content_dict[property]; } } return gadget_utils.createDocument(document).push(function(id) { jio_key = id; return gadget.notifySubmitting(); }).push(function() { return gadget.notifySubmitted({ message: \'Data Updated\', status: \'success\' }); }).push(function() { return gadget.redirect({ command: \'display\', options: { jio_key: jio_key, editable: true } }); });</string>
</tuple> </tuple>
</list> </list>
......
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