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
1
Issues
1
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
Roque
erp5
Commits
d3c8d637
Commit
d3c8d637
authored
Apr 30, 2019
by
Roque
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_post: new post action uses dialog form
parent
cebedaf6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
41 deletions
+38
-41
bt5/erp5_post/SkinTemplateItem/portal_skins/erp5_post/gadget_field_new_action_js_script.js.js
...l_skins/erp5_post/gadget_field_new_action_js_script.js.js
+38
-41
No files found.
bt5/erp5_post/SkinTemplateItem/portal_skins/erp5_post/gadget_field_new_action_js_script.js.js
View file @
d3c8d637
...
@@ -41,23 +41,17 @@
...
@@ -41,23 +41,17 @@
.
declareMethod
(
"
render
"
,
function
(
parent_options
,
action_reference
,
form_definition
)
{
.
declareMethod
(
"
render
"
,
function
(
parent_options
,
action_reference
,
form_definition
)
{
var
gadget
=
this
;
var
gadget
=
this
;
return
gadget
.
createDocument
(
parent_options
)
return
gadget
.
changeState
({
.
push
(
function
(
jio_key
)
{
doc
:
{
title
:
"
Untitled Document
"
},
return
gadget
.
jio_get
(
jio_key
)
parent_options
:
parent_options
,
.
push
(
function
(
new_document
)
{
child_gadget_url
:
'
gadget_erp5_pt_form_dialog.html
'
,
return
gadget
.
changeState
({
form_type
:
'
dialog
'
,
jio_key
:
jio_key
,
form_definition
:
form_definition
,
doc
:
new_document
,
view
:
action_reference
,
child_gadget_url
:
'
gadget_erp5_pt_form_view_editable.html
'
,
editable
:
true
,
form_type
:
'
page
'
,
has_more_views
:
false
,
form_definition
:
form_definition
,
has_more_actions
:
true
view
:
action_reference
,
});
editable
:
true
,
has_more_views
:
false
,
has_more_actions
:
true
});
});
});
})
})
.
onStateChange
(
function
()
{
.
onStateChange
(
function
()
{
...
@@ -79,32 +73,35 @@
...
@@ -79,32 +73,35 @@
var
gadget
=
this
,
var
gadget
=
this
,
jio_key
=
options
[
0
],
jio_key
=
options
[
0
],
//target_url = options[1],
//target_url = options[1],
content_dict
=
options
[
2
];
content_dict
=
options
[
2
],
return
gadget
.
notifySubmitting
()
document
=
{
.
push
(
function
()
{
portal_type
:
gadget
.
state
.
parent_options
.
portal_type
,
return
gadget
.
jio_get
(
jio_key
);
parent_relative_url
:
gadget
.
state
.
parent_options
.
parent_relative_url
,
})
my_source_reference
:
gadget
.
state
.
parent_options
.
my_source_reference
.
push
(
function
(
document
)
{
},
property
;
var
property
;
delete
content_dict
.
dialog_method
;
for
(
property
in
content_dict
)
{
for
(
property
in
content_dict
)
{
if
(
content_dict
.
hasOwnProperty
(
property
))
{
if
(
content_dict
.
hasOwnProperty
(
property
))
{
document
[
property
]
=
content_dict
[
property
];
document
[
'
my_
'
+
property
]
=
content_dict
[
property
];
}
}
}
return
this
.
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
}
}
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
}
});
});
});
});
});
});
}(
window
,
rJS
,
RSVP
));
}(
window
,
rJS
,
RSVP
));
\ No newline at end of file
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