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
Paul Graydon
erp5
Commits
484b558b
Commit
484b558b
authored
Mar 05, 2024
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core: display listfields sorted by label in Base_getMultiListFieldPropertyDictList
parent
02825d8c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
55 additions
and
26 deletions
+55
-26
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_parallel_list_field_zuite/testDisableNode_Base_getMultiListFieldPropertyDictList.zpt
...estDisableNode_Base_getMultiListFieldPropertyDictList.zpt
+17
-4
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_parallel_list_field_zuite/testMultipleValidatorKeyEmptyField.zpt
...l_list_field_zuite/testMultipleValidatorKeyEmptyField.zpt
+34
-20
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_translate_zuite/testParallelFieldListTranslation.zpt
...s_ui_translate_zuite/testParallelFieldListTranslation.zpt
+1
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getMultiListFieldPropertyDictList.py
...skins/erp5_core/Base_getMultiListFieldPropertyDictList.py
+3
-1
No files found.
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_parallel_list_field_zuite/testDisableNode_Base_getMultiListFieldPropertyDictList.zpt
View file @
484b558b
...
@@ -49,6 +49,19 @@
...
@@ -49,6 +49,19 @@
</tr>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/save"
/>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/save"
/>
<tr>
<td
colspan=
"3"
><b>
Listfields are displayed in alphabetic order
</b></td>
</tr>
<tr>
<td>
assertText
</td>
<td>
//div[@data-gadget-scope='field_my_category_list']//div[@data-gadget-scope='PARALLEL_SUB_FIELD_0']/div/label
</td>
<td>
Foo Category
</td>
</tr>
<tr>
<td>
assertText
</td>
<td>
//div[@data-gadget-scope='field_my_category_list']//div[@data-gadget-scope='PARALLEL_SUB_FIELD_1']/div/label
</td>
<td>
foo_big_category
</td>
</tr>
<tr>
<tr>
<td
colspan=
"3"
><b>
Empty value by default
</b></td>
<td
colspan=
"3"
><b>
Empty value by default
</b></td>
</tr>
</tr>
...
@@ -89,12 +102,12 @@
...
@@ -89,12 +102,12 @@
<tr>
<tr>
<td>
select
</td>
<td>
select
</td>
<td>
//div[@data-gadget-scope='field_my_category_list']//div[@data-gadget-scope='PARALLEL_SUB_FIELD_0']//select
</td>
<td>
//div[@data-gadget-scope='field_my_category_list']//div[@data-gadget-scope='PARALLEL_SUB_FIELD_0']//select
</td>
<td>
label=
c
1
</td>
<td>
label=
a/a
1
</td>
</tr>
</tr>
<tr>
<tr>
<td>
select
</td>
<td>
select
</td>
<td>
//div[@data-gadget-scope='field_my_category_list']//div[@data-gadget-scope='PARALLEL_SUB_FIELD_1']//select
</td>
<td>
//div[@data-gadget-scope='field_my_category_list']//div[@data-gadget-scope='PARALLEL_SUB_FIELD_1']//select
</td>
<td>
label=
a/a
1
</td>
<td>
label=
c
1
</td>
</tr>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/save"
/>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/save"
/>
...
@@ -106,12 +119,12 @@
...
@@ -106,12 +119,12 @@
<tr>
<tr>
<td>
assertSelected
</td>
<td>
assertSelected
</td>
<td>
//div[@data-gadget-scope='field_my_category_list']//div[@data-gadget-scope='PARALLEL_SUB_FIELD_0']//select
</td>
<td>
//div[@data-gadget-scope='field_my_category_list']//div[@data-gadget-scope='PARALLEL_SUB_FIELD_0']//select
</td>
<td>
label=
c
1
</td>
<td>
label=
a/a
1
</td>
</tr>
</tr>
<tr>
<tr>
<td>
assertSelected
</td>
<td>
assertSelected
</td>
<td>
//div[@data-gadget-scope='field_my_category_list']//div[@data-gadget-scope='PARALLEL_SUB_FIELD_1']//select
</td>
<td>
//div[@data-gadget-scope='field_my_category_list']//div[@data-gadget-scope='PARALLEL_SUB_FIELD_1']//select
</td>
<td>
label=
a/a
1
</td>
<td>
label=
c
1
</td>
</tr>
</tr>
<tr>
<tr>
<td>
assertElementNotPresent
</td>
<td>
assertElementNotPresent
</td>
...
...
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_parallel_list_field_zuite/testMultipleValidatorKeyEmptyField.zpt
View file @
484b558b
...
@@ -45,6 +45,19 @@
...
@@ -45,6 +45,19 @@
</tr>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/save"
/>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/save"
/>
<tr>
<td
colspan=
"3"
><b>
Listfields are displayed in alphabetic order
</b></td>
</tr>
<tr>
<td>
assertText
</td>
<td>
//div[@data-gadget-scope='field_my_category_list']//div[@data-gadget-scope='PARALLEL_SUB_FIELD_0']/div/label
</td>
<td>
Foo Category
</td>
</tr>
<tr>
<td>
assertText
</td>
<td>
//div[@data-gadget-scope='field_my_category_list']//div[@data-gadget-scope='PARALLEL_SUB_FIELD_1']/div/label
</td>
<td>
foo_big_category
</td>
</tr>
<tr>
<tr>
<td
colspan=
"3"
><b>
Empty value by default
</b></td>
<td
colspan=
"3"
><b>
Empty value by default
</b></td>
</tr>
</tr>
...
@@ -80,18 +93,18 @@
...
@@ -80,18 +93,18 @@
<tr>
<tr>
<td>
select
</td>
<td>
select
</td>
<td>
//div[@data-gadget-scope='field_my_category_list']//div[@data-gadget-scope='PARALLEL_SUB_FIELD_0']//div//select
</td>
<td>
//div[@data-gadget-scope='field_my_category_list']//div[@data-gadget-scope='PARALLEL_SUB_FIELD_0']//div//select
</td>
<td>
label=
c1
</td>
<td>
label=
a
</td>
</tr>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/save"
/>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/save"
/>
<tr>
<tr>
<td>
assertText
</td>
<td>
assertText
</td>
<td>
//p[@id="field_category_list"]
</td>
<td>
//p[@id="field_category_list"]
</td>
<td>
foo_
big_category/c1
</td>
<td>
foo_
category/a
</td>
</tr>
</tr>
<tr>
<tr>
<td>
assertSelected
</td>
<td>
assertSelected
</td>
<td>
//div[@data-gadget-scope='field_my_category_list']//div[@data-gadget-scope='PARALLEL_SUB_FIELD_0']//div[1]//select
</td>
<td>
//div[@data-gadget-scope='field_my_category_list']//div[@data-gadget-scope='PARALLEL_SUB_FIELD_0']//div[1]//select
</td>
<td>
label=
c1
</td>
<td>
label=
a
</td>
</tr>
</tr>
<tr>
<tr>
<td>
assertSelected
</td>
<td>
assertSelected
</td>
...
@@ -120,7 +133,7 @@
...
@@ -120,7 +133,7 @@
<tr>
<tr>
<td>
select
</td>
<td>
select
</td>
<td>
//div[@data-gadget-scope='field_my_category_list']//div[@data-gadget-scope='PARALLEL_SUB_FIELD_1']//div//select
</td>
<td>
//div[@data-gadget-scope='field_my_category_list']//div[@data-gadget-scope='PARALLEL_SUB_FIELD_1']//div//select
</td>
<td>
label=
a
</td>
<td>
label=
c1
</td>
</tr>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/save"
/>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/save"
/>
<tr>
<tr>
...
@@ -131,7 +144,7 @@
...
@@ -131,7 +144,7 @@
<tr>
<tr>
<td>
assertSelected
</td>
<td>
assertSelected
</td>
<td>
//div[@data-gadget-scope='field_my_category_list']//div[@data-gadget-scope='PARALLEL_SUB_FIELD_0']//div[1]//select
</td>
<td>
//div[@data-gadget-scope='field_my_category_list']//div[@data-gadget-scope='PARALLEL_SUB_FIELD_0']//div[1]//select
</td>
<td>
label=
c1
</td>
<td>
label=
a
</td>
</tr>
</tr>
<tr>
<tr>
<td>
assertSelected
</td>
<td>
assertSelected
</td>
...
@@ -146,7 +159,7 @@
...
@@ -146,7 +159,7 @@
<tr>
<tr>
<td>
assertSelected
</td>
<td>
assertSelected
</td>
<td>
//div[@data-gadget-scope='field_my_category_list']//div[@data-gadget-scope='PARALLEL_SUB_FIELD_1']//div[1]//select
</td>
<td>
//div[@data-gadget-scope='field_my_category_list']//div[@data-gadget-scope='PARALLEL_SUB_FIELD_1']//div[1]//select
</td>
<td>
label=
a
</td>
<td>
label=
c1
</td>
</tr>
</tr>
<tr>
<tr>
<td>
assertSelected
</td>
<td>
assertSelected
</td>
...
@@ -164,7 +177,7 @@
...
@@ -164,7 +177,7 @@
</tr>
</tr>
<tr>
<tr>
<td>
select
</td>
<td>
select
</td>
<td>
//div[@data-gadget-scope='field_my_category_list']//div[@data-gadget-scope='PARALLEL_SUB_FIELD_
0
']//div[2]//select
</td>
<td>
//div[@data-gadget-scope='field_my_category_list']//div[@data-gadget-scope='PARALLEL_SUB_FIELD_
1
']//div[2]//select
</td>
<td>
label=c22
</td>
<td>
label=c22
</td>
</tr>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/save"
/>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/save"
/>
...
@@ -176,45 +189,46 @@
...
@@ -176,45 +189,46 @@
<tr>
<tr>
<td>
assertSelected
</td>
<td>
assertSelected
</td>
<td>
//div[@data-gadget-scope='field_my_category_list']//div[@data-gadget-scope='PARALLEL_SUB_FIELD_0']//div[1]//select
</td>
<td>
//div[@data-gadget-scope='field_my_category_list']//div[@data-gadget-scope='PARALLEL_SUB_FIELD_0']//div[1]//select
</td>
<td>
label=
c1
</td>
<td>
label=
a
</td>
</tr>
</tr>
<tr>
<tr>
<td>
assertSelected
</td>
<td>
assertSelected
</td>
<td>
//div[@data-gadget-scope='field_my_category_list']//div[@data-gadget-scope='PARALLEL_SUB_FIELD_0']//div[2]//select
</td>
<td>
//div[@data-gadget-scope='field_my_category_list']//div[@data-gadget-scope='PARALLEL_SUB_FIELD_0']//div[2]//select
</td>
<td>
label=c22
</td>
</tr>
<tr>
<td>
assertSelected
</td>
<td>
//div[@data-gadget-scope='field_my_category_list']//div[@data-gadget-scope='PARALLEL_SUB_FIELD_0']//div[3]//select
</td>
<td>
label=
</td>
<td>
label=
</td>
</tr>
</tr>
<tr>
<tr>
<td>
assertElementNotPresent
</td>
<td>
assertElementNotPresent
</td>
<td>
//div[@data-gadget-scope='field_my_category_list']//div[@data-gadget-scope='PARALLEL_SUB_FIELD_0']//div[
4
]
</td>
<td>
//div[@data-gadget-scope='field_my_category_list']//div[@data-gadget-scope='PARALLEL_SUB_FIELD_0']//div[
3
]
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
assertSelected
</td>
<td>
assertSelected
</td>
<td>
//div[@data-gadget-scope='field_my_category_list']//div[@data-gadget-scope='PARALLEL_SUB_FIELD_1']//div[1]//select
</td>
<td>
//div[@data-gadget-scope='field_my_category_list']//div[@data-gadget-scope='PARALLEL_SUB_FIELD_1']//div[1]//select
</td>
<td>
label=
a
</td>
<td>
label=
c1
</td>
</tr>
</tr>
<tr>
<tr>
<td>
assertSelected
</td>
<td>
assertSelected
</td>
<td>
//div[@data-gadget-scope='field_my_category_list']//div[@data-gadget-scope='PARALLEL_SUB_FIELD_1']//div[2]//select
</td>
<td>
//div[@data-gadget-scope='field_my_category_list']//div[@data-gadget-scope='PARALLEL_SUB_FIELD_1']//div[2]//select
</td>
<td>
label=c22
</td>
</tr>
<tr>
<td>
assertSelected
</td>
<td>
//div[@data-gadget-scope='field_my_category_list']//div[@data-gadget-scope='PARALLEL_SUB_FIELD_1']//div[3]//select
</td>
<td>
label=
</td>
<td>
label=
</td>
</tr>
</tr>
<tr>
<tr>
<td>
assertElementNotPresent
</td>
<td>
assertElementNotPresent
</td>
<td>
//div[@data-gadget-scope='field_my_category_list']//div[@data-gadget-scope='PARALLEL_SUB_FIELD_1']//div[
3
]
</td>
<td>
//div[@data-gadget-scope='field_my_category_list']//div[@data-gadget-scope='PARALLEL_SUB_FIELD_1']//div[
4
]
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td
colspan=
"3"
><b>
Remove first
value
</b></td>
<td
colspan=
"3"
><b>
Remove first
foo_big_category
</b></td>
</tr>
</tr>
<tr>
<tr>
<td>
select
</td>
<td>
select
</td>
<td>
//div[@data-gadget-scope='field_my_category_list']//div[@data-gadget-scope='PARALLEL_SUB_FIELD_
0
']//div[1]//select
</td>
<td>
//div[@data-gadget-scope='field_my_category_list']//div[@data-gadget-scope='PARALLEL_SUB_FIELD_
1
']//div[1]//select
</td>
<td>
label=
</td>
<td>
label=
</td>
</tr>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/save"
/>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/save"
/>
...
@@ -226,7 +240,7 @@
...
@@ -226,7 +240,7 @@
<tr>
<tr>
<td>
assertSelected
</td>
<td>
assertSelected
</td>
<td>
//div[@data-gadget-scope='field_my_category_list']//div[@data-gadget-scope='PARALLEL_SUB_FIELD_0']//div[1]//select
</td>
<td>
//div[@data-gadget-scope='field_my_category_list']//div[@data-gadget-scope='PARALLEL_SUB_FIELD_0']//div[1]//select
</td>
<td>
label=
c22
</td>
<td>
label=
a
</td>
</tr>
</tr>
<tr>
<tr>
<td>
assertSelected
</td>
<td>
assertSelected
</td>
...
@@ -241,7 +255,7 @@
...
@@ -241,7 +255,7 @@
<tr>
<tr>
<td>
assertSelected
</td>
<td>
assertSelected
</td>
<td>
//div[@data-gadget-scope='field_my_category_list']//div[@data-gadget-scope='PARALLEL_SUB_FIELD_1']//div[1]//select
</td>
<td>
//div[@data-gadget-scope='field_my_category_list']//div[@data-gadget-scope='PARALLEL_SUB_FIELD_1']//div[1]//select
</td>
<td>
label=
a
</td>
<td>
label=
c22
</td>
</tr>
</tr>
<tr>
<tr>
<td>
assertSelected
</td>
<td>
assertSelected
</td>
...
...
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_translate_zuite/testParallelFieldListTranslation.zpt
View file @
484b558b
...
@@ -51,7 +51,7 @@
...
@@ -51,7 +51,7 @@
<!-- Check that Category titles in parallel_list_field are well translated -->
<!-- Check that Category titles in parallel_list_field are well translated -->
<tr>
<tr>
<td>
assertText
</td>
<td>
assertText
</td>
<td>
//div[@data-gadget-scope='field_my_category_list']//div[@data-gadget-scope='PARALLEL_SUB_FIELD_
1
']//div//label
</td>
<td>
//div[@data-gadget-scope='field_my_category_list']//div[@data-gadget-scope='PARALLEL_SUB_FIELD_
0
']//div//label
</td>
<td>
Foo leibie
</td>
<td>
Foo leibie
</td>
</tr>
</tr>
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getMultiListFieldPropertyDictList.py
View file @
484b558b
...
@@ -42,4 +42,6 @@ for item in item_list:
...
@@ -42,4 +42,6 @@ for item in item_list:
# Return the list of subfield configuration.
# Return the list of subfield configuration.
return
sub_field_dict
.
values
()
return
sorted
(
sub_field_dict
.
values
(),
key
=
lambda
v
:
v
[
'title'
])
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