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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
erp5
Commits
696602e1
Commit
696602e1
authored
Jan 23, 2018
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WIP [erp5_web_renderjs_ui] Prototype update dialog support
update_method has to be send
parent
913edbfb
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
9 deletions
+19
-9
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_dialog_html.html
.../web_page_module/rjs_gadget_erp5_pt_form_dialog_html.html
+2
-1
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_dialog_html.xml
...m/web_page_module/rjs_gadget_erp5_pt_form_dialog_html.xml
+2
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_dialog_js.js
...Item/web_page_module/rjs_gadget_erp5_pt_form_dialog_js.js
+13
-4
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_dialog_js.xml
...tem/web_page_module/rjs_gadget_erp5_pt_form_dialog_js.xml
+2
-2
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_dialog_html.html
View file @
696602e1
...
...
@@ -35,7 +35,8 @@
data-gadget-scope=
"erp5_form"
data-gadget-sandbox=
"public"
>
</div>
<input
class=
"dialogconfirm"
data-theme=
"b"
data-inline=
"true"
type=
"submit"
data-i18n=
"[value]Proceed"
value=
"Proceed"
data-icon=
"check"
/>
<input
name=
"action_confirm"
class=
"dialogconfirm"
data-theme=
"b"
data-inline=
"true"
type=
"submit"
data-i18n=
"[value]Proceed"
value=
"Proceed"
data-icon=
"check"
/>
<button
name=
"action_update"
type=
"submit"
data-i18n=
"Update"
>
Update
</button>
<a
class=
"dialogcancel"
data-i18n=
"Cancel"
>
Cancel
</a>
</form>
</body>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_dialog_html.xml
View file @
696602e1
...
...
@@ -234,7 +234,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
2.14191.38290.31931
</string>
</value>
<value>
<string>
96
5.626.11255.31692
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>
15
06093694.63
</float>
<float>
15
16722470.92
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_dialog_js.js
View file @
696602e1
...
...
@@ -10,7 +10,7 @@
return
[
obj
];
}
function
submitDialog
(
gadget
)
{
function
submitDialog
(
gadget
,
submit_action_id
,
is_update_method
)
{
var
form_gadget
=
gadget
,
action
=
form_gadget
.
state
.
erp5_document
.
_embedded
.
_view
.
_actions
.
put
,
form_id
=
form_gadget
.
state
.
erp5_document
.
_embedded
.
_view
.
form_id
,
...
...
@@ -30,7 +30,10 @@
data
[
form_id
.
key
]
=
form_id
[
'
default
'
];
// XXX Hardcoded
data
.
dialog_id
=
form_id
[
'
default
'
];
data
.
dialog_method
=
action
.
action
;
data
.
dialog_method
=
form_gadget
.
state
.
form_definition
[
submit_action_id
];
if
(
is_update_method
)
{
data
.
update_method
=
data
.
dialog_method
;
}
//XXX hack for redirect, difined in form
redirect_to_parent
=
content_dict
.
field_your_redirect_to_parent
;
for
(
key
in
content_dict
)
{
...
...
@@ -383,8 +386,14 @@
})
.
onEvent
(
'
submit
'
,
function
()
{
return
submitDialog
(
this
);
},
false
,
true
)
;
return
submitDialog
(
this
,
"
action
"
);
},
false
,
true
)
.
onEvent
(
'
click
'
,
function
(
evt
)
{
if
(
evt
.
target
.
name
===
"
action_update
"
)
{
evt
.
preventDefault
();
return
submitDialog
(
this
,
"
update_action
"
,
true
);
}
},
false
,
false
);
}(
window
,
rJS
,
RSVP
,
URI
,
calculatePageTitle
,
Blob
,
URL
,
document
,
jIO
));
\ No newline at end of file
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_dialog_js.xml
View file @
696602e1
...
...
@@ -230,7 +230,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
965.6
70.53338.41130
</string>
</value>
<value>
<string>
965.6
84.47475.20787
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>
1516
725149.52
</float>
<float>
1516
801577.56
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
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