Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Amer
erp5
Commits
3fba7568
Commit
3fba7568
authored
Apr 18, 2019
by
Roque
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_post: minor refactor on for gadgetfield action code
parent
e94e6a06
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
bt5/erp5_post/SkinTemplateItem/portal_skins/erp5_post/PostModule_newHTMLPost/gadget_field_action_js_script.xml
.../PostModule_newHTMLPost/gadget_field_action_js_script.xml
+1
-1
No files found.
bt5/erp5_post/SkinTemplateItem/portal_skins/erp5_post/PostModule_newHTMLPost/gadget_field_action_js_script.xml
View file @
3fba7568
...
...
@@ -224,7 +224,7 @@
<value>
<list>
<tuple>
<string>
return RSVP.Queue().push(function () { return RSVP.all([gadget.getUrlParameter(\'portal_type\'), gadget.getUrlParameter(\'parent_relative_url\'), gadget.getSetting(\'portal_type\'), gadget.getSetting(\'parent_relative_url\'), ]); }) .push(function (result) { if (result[0] != undefined) {options.portal_type = result[0];} else {options.portal_type = result[2];} if (result[1] != undefined) {options.parent_relative_url = result[1];} else {options.parent_relative_url = result[3];} return gadget_utils.getFormDefinition(parent_portal_type, action_reference).push(function (result) { form_definition = result; return gadget_utils.createDocument(options); }) .push(function (jio_key) { return gadget.jio_get(jio_key) .push(function (new_document) { return gadget.changeState({ jio_key: jio_key, doc: new_document, submit_code: submit_code, child_gadget_url: child_gadget_url, form_definition: form_definition, view: action_reference, editable: true, has_more_views: false, has_more_actions: true, is_form_list: false }); }); }); });
</string>
<string>
var child_gadget_url = \'gadget_erp5_pt_form_view_editable.html\';
return RSVP.Queue().push(function () { return RSVP.all([gadget.getUrlParameter(\'portal_type\'), gadget.getUrlParameter(\'parent_relative_url\'), gadget.getSetting(\'portal_type\'), gadget.getSetting(\'parent_relative_url\'), ]); }) .push(function (result) { if (result[0] != undefined) {options.portal_type = result[0];} else {options.portal_type = result[2];} if (result[1] != undefined) {options.parent_relative_url = result[1];} else {options.parent_relative_url = result[3];} return gadget_utils.getFormDefinition(parent_portal_type, action_reference).push(function (result) { form_definition = result; return gadget_utils.createDocument(options); }) .push(function (jio_key) { return gadget.jio_get(jio_key) .push(function (new_document) { return gadget.changeState({ jio_key: jio_key, doc: new_document, submit_code: submit_code, child_gadget_url: child_gadget_url, form_definition: form_definition, view: action_reference, editable: true, has_more_views: false, has_more_actions: true, is_form_list: false }); }); }); });
</string>
<string>
return gadget.notifySubmitting() .push(function () { return gadget.jio_get(jio_key); }) .push(function (document) { var property; for (property in content_dict) { if (content_dict.hasOwnProperty(property)) { document[property] = content_dict[property]; } } return gadget.jio_put(jio_key, document); }) .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>
</list>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment