Commit e94e6a06 authored by Roque's avatar Roque

erp5_officejs_connector: minor refactor on for gadgetfield action code

parent 1a67a050
...@@ -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>var child_gadget_url = \'gadget_erp5_pt_form_view_editable.html\'; 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