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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Georgios Dagkakis
erp5
Commits
e0d26048
Commit
e0d26048
authored
Jun 20, 2019
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_web_renderjs_ui] Display update action title if configured
parent
6949fb89
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
8 deletions
+24
-8
bt5/erp5_hal_json_style/SkinTemplateItem/portal_skins/erp5_hal_json_style/ERP5Document_getHateoas.py
...rtal_skins/erp5_hal_json_style/ERP5Document_getHateoas.py
+1
-0
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
+21
-6
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_hal_json_style/SkinTemplateItem/portal_skins/erp5_hal_json_style/ERP5Document_getHateoas.py
View file @
e0d26048
...
...
@@ -1129,6 +1129,7 @@ def renderFormDefinition(form, response_dict):
response_dict
[
"pt"
]
=
form
.
pt
response_dict
[
"action"
]
=
form
.
action
response_dict
[
"update_action"
]
=
form
.
update_action
response_dict
[
"update_action_title"
]
=
Base_translateString
(
form
.
update_action_title
)
def
statusLevelToString
(
level
):
"""Transform any level format to lowercase string representation"""
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_dialog_js.js
View file @
e0d26048
/*jslint nomen: true, indent: 2, maxerr: 3 */
/*global window, rJS, RSVP, calculatePageTitle, Handlebars, ensureArray */
(
function
(
window
,
rJS
,
RSVP
,
calculatePageTitle
,
Handlebars
,
ensureArray
)
{
/*global window, document, rJS, RSVP, calculatePageTitle, Handlebars,
ensureArray */
(
function
(
window
,
document
,
rJS
,
RSVP
,
calculatePageTitle
,
Handlebars
,
ensureArray
)
{
"
use strict
"
;
function
checkValidity
()
{
...
...
@@ -173,6 +175,7 @@
erp5_form
:
options
.
erp5_form
||
{},
// editable: true, // ignore global editable state (be always editable)
has_update_action
:
Boolean
(
options
.
form_definition
.
update_action
),
update_action_title
:
options
.
form_definition
.
update_action_title
,
// pass extended_search from previous view in case any gadget is curious
extended_search
:
extended_search
,
redirect_to_parent
:
options
.
erp5_document
.
_embedded
.
_view
.
field_your_redirect_to_parent
!==
undefined
...
...
@@ -221,13 +224,25 @@
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
// Set the dialog button
if
(
modification_dict
.
hasOwnProperty
(
'
has_update_action
'
))
{
if
(
modification_dict
.
hasOwnProperty
(
'
has_update_action
'
)
||
modification_dict
.
hasOwnProperty
(
'
update_action_title
'
))
{
return
form_gadget
.
translateHtml
(
dialog_button_template
({
show_update_button
:
form_gadget
.
state
.
has_update_action
}))
.
push
(
function
(
html
)
{
form_gadget
.
element
.
querySelector
(
'
.dialog_button_container
'
)
.
innerHTML
=
html
;
var
div
=
document
.
createElement
(
'
div
'
),
dialog_button_container
=
form_gadget
.
element
.
querySelector
(
'
.dialog_button_container
'
);
div
.
innerHTML
=
html
;
if
(
form_gadget
.
state
.
update_action_title
)
{
div
.
querySelector
(
'
button[name="action_update"]
'
)
.
textContent
=
form_gadget
.
state
.
form_definition
.
update_action_title
;
}
while
(
dialog_button_container
.
firstChild
)
{
dialog_button_container
.
firstChild
.
remove
();
}
dialog_button_container
.
innerHTML
=
div
.
innerHTML
;
});
}
})
...
...
@@ -312,4 +327,4 @@
}
});
}(
window
,
rJS
,
RSVP
,
calculatePageTitle
,
Handlebars
,
ensureArray
));
}(
window
,
document
,
rJS
,
RSVP
,
calculatePageTitle
,
Handlebars
,
ensureArray
));
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_dialog_js.xml
View file @
e0d26048
...
...
@@ -222,7 +222,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
976.
20956.15292.37495
</string>
</value>
<value>
<string>
976.
34018.48815.32699
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -240,7 +240,7 @@
</tuple>
<state>
<tuple>
<float>
156
0246152.37
</float>
<float>
156
1041762.03
</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