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
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
erp5
Commits
ed3c5c38
Commit
ed3c5c38
authored
Nov 14, 2019
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WIP gabriel
parent
2900b342
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
7 deletions
+12
-7
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
+10
-5
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_js.js
View file @
ed3c5c38
...
...
@@ -19,10 +19,11 @@
});
}
function
submitDialog
(
is_updating
)
{
function
submitDialog
(
is_updating
,
param_list
)
{
var
gadget
=
this
,
button_container
=
gadget
.
element
.
querySelector
(
'
.dialog_button_container
'
),
custom_dialog_method
=
param_list
?
param_list
[
1
]
:
null
,
update_button
=
button_container
.
querySelector
(
'
button
'
),
submit_input
=
button_container
.
querySelector
(
'
input
'
);
submit_input
.
disabled
=
true
;
...
...
@@ -55,7 +56,7 @@
}
}
// ERP5 expects target Script name in dialog_method field
data
.
dialog_method
=
gadget
.
state
.
form_definition
.
action
;
data
.
dialog_method
=
custom_dialog_method
||
gadget
.
state
.
form_definition
.
action
;
// For Update Action - override the default value from "action"
if
(
is_updating
)
{
data
.
dialog_method
=
gadget
.
state
.
form_definition
.
update_action
;
...
...
@@ -82,7 +83,6 @@
if
(
gadget
.
state
.
redirect_to_parent
)
{
return
gadget
.
redirect
({
command
:
'
history_previous
'
});
}
console
.
log
(
'
COSUCOUS
'
,
result
);
if
((
gadget
.
state
.
jio_key
===
result
.
jio_key
)
&&
(
!
result
.
view
))
{
// don't update navigation history when not really redirecting
...
...
@@ -107,7 +107,6 @@
}
}
console
.
log
(
'
lets redirect
'
,
command
,
result
.
jio_key
,
result
.
view
);
// forced document change thus we update history
return
gadget
.
redirect
({
command
:
command
,
...
...
@@ -131,6 +130,10 @@
}
function
submitDialogWithCustomDialogMethod
(
custom_dialog_method
)
{
return
submitDialog
.
apply
(
this
,
[
false
,
custom_dialog_method
]);
}
var
gadget_klass
=
rJS
(
window
),
dialog_button_source
=
gadget_klass
.
__template_element
.
getElementById
(
"
dialog-button-template
"
)
...
...
@@ -153,6 +156,8 @@
.
declareAcquiredMethod
(
"
translate
"
,
"
translate
"
)
.
declareAcquiredMethod
(
"
translateHtml
"
,
"
translateHtml
"
)
.
declareAcquiredMethod
(
"
submitContent
"
,
"
submitContent
"
)
.
allowPublicAcquisition
(
"
submitDialogWithCustomDialogMethod
"
,
submitDialogWithCustomDialogMethod
)
/////////////////////////////////////////////////////////////////
// Proxy methods to the child gadget
...
...
@@ -341,4 +346,4 @@
}
});
}(
window
,
document
,
rJS
,
RSVP
,
calculatePageTitle
,
Handlebars
,
ensureArray
));
}(
window
,
document
,
rJS
,
RSVP
,
calculatePageTitle
,
Handlebars
,
ensureArray
));
\ 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 @
ed3c5c38
...
...
@@ -228,7 +228,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
979.2
1958.43628.1324
3
</string>
</value>
<value>
<string>
979.2
7458.48108.1592
3
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -246,7 +246,7 @@
</tuple>
<state>
<tuple>
<float>
157
1996930.73
</float>
<float>
157
3749573.88
</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