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
Frederic Thoma
erp5
Commits
59fe5071
Commit
59fe5071
authored
Mar 03, 2021
by
Gabriel Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_xhtml_style: add compatibility with _raw for every category
parent
9e3b20c9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
15 deletions
+18
-15
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_fixDialogActions.py
...em/portal_skins/erp5_xhtml_style/Base_fixDialogActions.py
+18
-15
No files found.
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_fixDialogActions.py
View file @
59fe5071
...
...
@@ -3,21 +3,24 @@ actions that does not provide one.
"""
from
Products.PythonScripts.standard
import
url_quote
if
dialog_category
==
'object_jump'
:
return
sorted
(
actions
.
get
(
'object_jump'
,
[])
+
actions
.
get
(
'object_jio_jump'
,
[]),
key
=
lambda
x
:
x
[
"priority"
])
if
dialog_category
==
'object_report'
:
return
sorted
(
actions
.
get
(
'object_report'
,
[])
+
actions
.
get
(
'object_jio_report'
,
[]),
key
=
lambda
x
:
x
[
"priority"
])
elif
dialog_category
==
'object_exchange'
:
return
sorted
(
actions
.
get
(
'object_exchange'
,
[])
+
actions
.
get
(
'object_jio_exchange'
,
[]),
key
=
lambda
x
:
x
[
"priority"
])
elif
dialog_category
==
'object_action'
:
return
sorted
(
actions
.
get
(
'object_action'
,
[])
+
actions
.
get
(
'object_jio_action'
,
[]),
key
=
lambda
x
:
x
[
"priority"
])
elif
dialog_category
==
'object_fast_input'
:
return
sorted
(
actions
.
get
(
'object_fast_input'
,
[])
+
actions
.
get
(
'object_jio_fast_input'
,
[]),
key
=
lambda
x
:
x
[
"priority"
])
elif
dialog_category
==
'object_button'
:
return
sorted
(
actions
.
get
(
'object_button'
,
[])
+
actions
.
get
(
'object_jio_button'
,
[])
+
actions
.
get
(
'object_jio_button_raw'
,
[]),
key
=
lambda
x
:
x
[
"priority"
])
action_mapping_dict
=
{
"object_jump"
:
[
"object_jump"
,
"object_jio_jump"
],
"object_report"
:
[
"object_report"
,
"object_jio_report"
],
"object_exchange"
:
[
"object_exchange"
,
"object_jio_exchange"
],
"object_action"
:
[
"object_action"
,
"object_jio_action"
],
"object_fast_input"
:
[
"object_fast_input"
,
"object_jio_fast_input"
],
"object_button"
:
[
"object_button"
,
"object_jio_button"
]
}
def
getActionList
(
dialog_category
):
action_list
=
[]
for
key
in
action_mapping_dict
[
dialog_category
]:
action_list
+=
actions
.
get
(
key
,
[])
+
actions
.
get
(
"{}_raw"
.
format
(
key
),
[])
return
sorted
(
action_list
,
key
=
lambda
x
:
x
[
"priority"
])
if
dialog_category
in
action_mapping_dict
:
return
getActionList
(
dialog_category
)
if
dialog_category
!=
'object_print'
:
return
actions
.
get
(
dialog_category
,
[])
...
...
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