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
Levin Zimmermann
erp5
Commits
fa67c9d7
Commit
fa67c9d7
authored
Nov 21, 2019
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_web_renderjs_ui] form_list should only impact the first bottom listbox
parent
66a2c883
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
181 additions
and
157 deletions
+181
-157
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_form_js.js
...thTemplateItem/web_page_module/rjs_gadget_erp5_form_js.js
+18
-6
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_form_js.xml
...hTemplateItem/web_page_module/rjs_gadget_erp5_form_js.xml
+163
-151
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_form_js.js
View file @
fa67c9d7
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
* @argument field: array<tuple<str, object>> where first item is name, second meta info of the field
* @argument field: array<tuple<str, object>> where first item is name, second meta info of the field
* (obsolete to specify the meta information which is returned by JSON style since it is duplicate of information in document instance)
* (obsolete to specify the meta information which is returned by JSON style since it is duplicate of information in document instance)
*/
*/
function
addField
(
field
,
rendered_document
,
form_definition
,
form_gadget
,
group_name
,
modification_dict
)
{
function
addField
(
field
,
rendered_document
,
form_definition
,
form_gadget
,
group_name
,
modification_dict
,
is_first_bottom_listbox
)
{
var
field_name
=
field
[
0
],
var
field_name
=
field
[
0
],
field_element
,
field_element
,
suboptions
,
suboptions
,
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
suboptions
=
{
suboptions
=
{
hide_enabled
:
form_definition
.
hide_enabled
,
// listbox specific
hide_enabled
:
form_definition
.
hide_enabled
,
// listbox specific
configure_enabled
:
form_definition
.
configure_enabled
,
// listbox specific
configure_enabled
:
form_definition
.
configure_enabled
,
// listbox specific
extended_search
:
form_definition
.
extended_search
,
// searchfield specific
extended_search
:
(
is_first_bottom_listbox
&&
(
form_definition
.
extended_search
))
,
// searchfield specific
field_type
:
rendered_document
[
field_name
].
type
,
field_type
:
rendered_document
[
field_name
].
type
,
label
:
((
group_name
!==
"
bottom
"
)
&&
(
rendered_document
[
field_name
].
title
.
length
>
0
)),
// no label for bottom group and field without title
label
:
((
group_name
!==
"
bottom
"
)
&&
(
rendered_document
[
field_name
].
title
.
length
>
0
)),
// no label for bottom group and field without title
field_json
:
rendered_document
[
field_name
]
// pass
field_json
:
rendered_document
[
field_name
]
// pass
...
@@ -57,10 +57,9 @@
...
@@ -57,10 +57,9 @@
.
push
(
function
(
label_gadget
)
{
.
push
(
function
(
label_gadget
)
{
if
(
modification_dict
.
hasOwnProperty
(
'
hash
'
))
{
if
(
modification_dict
.
hasOwnProperty
(
'
hash
'
))
{
// XXX Hardcoded to get one listbox gadget
//pt form list gadget will get this listbox's info
//pt form list gadget will get this listbox's info
//then pass to search field gadget
//then pass to search field gadget
if
(
suboptions
.
field_type
===
'
ListBox
'
)
{
if
(
is_first_bottom_listbox
)
{
form_gadget
.
props
.
listbox_gadget
=
label_gadget
;
form_gadget
.
props
.
listbox_gadget
=
label_gadget
;
}
}
...
@@ -92,8 +91,16 @@
...
@@ -92,8 +91,16 @@
return
new
RSVP
.
Queue
()
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
.
push
(
function
()
{
var
first_listbox_found
=
false
;
return
RSVP
.
all
(
field_list
.
map
(
function
(
field
)
{
return
RSVP
.
all
(
field_list
.
map
(
function
(
field
)
{
return
addField
(
field
,
rendered_document
,
form_definition
,
form_gadget
,
group_name
,
modification_dict
);
var
is_first_bottom_listbox
=
false
;
if
((
!
first_listbox_found
)
&&
(
group_name
===
'
bottom
'
)
&&
(
rendered_document
.
hasOwnProperty
(
field
[
0
]))
&&
(
rendered_document
[
field
[
0
]].
type
===
'
ListBox
'
))
{
is_first_bottom_listbox
=
true
;
first_listbox_found
=
true
;
}
return
addField
(
field
,
rendered_document
,
form_definition
,
form_gadget
,
group_name
,
modification_dict
,
is_first_bottom_listbox
);
}));
}));
})
})
.
push
(
function
(
result_list
)
{
.
push
(
function
(
result_list
)
{
...
@@ -232,7 +239,12 @@
...
@@ -232,7 +239,12 @@
if
(
gadget
.
props
.
listbox_gadget
)
{
if
(
gadget
.
props
.
listbox_gadget
)
{
return
gadget
.
props
.
listbox_gadget
.
getListboxInfo
();
return
gadget
.
props
.
listbox_gadget
.
getListboxInfo
();
}
}
return
{};
return
{
search_column_list
:
[],
domain_list
:
[],
domain_dict
:
{},
begin_from
:
0
};
},
{
mutex
:
'
changestate
'
})
},
{
mutex
:
'
changestate
'
})
.
declareMethod
(
"
getContent
"
,
function
(
options
)
{
.
declareMethod
(
"
getContent
"
,
function
(
options
)
{
var
form_gadget
=
this
,
var
form_gadget
=
this
,
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_form_js.xml
View file @
fa67c9d7
...
@@ -148,171 +148,183 @@
...
@@ -148,171 +148,183 @@
</record>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.
patches.WorkflowTool
"
/>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.
Workflow
"
/>
</pickle>
</pickle>
<pickle>
<pickle>
<tuple>
<dictionary>
<none/>
<item>
<list>
<key>
<string>
_log
</string>
</key>
<dictionary>
<value>
<item>
<list>
<key>
<string>
action
</string>
</key>
<dictionary>
<value>
<string>
publish_alive
</string>
</value>
<item>
</item>
<key>
<string>
action
</string>
</key>
<item>
<value>
<string>
publish_alive
</string>
</value>
<key>
<string>
actor
</string>
</key>
</item>
<value>
<string>
romain
</string>
</value>
<item>
</item>
<key>
<string>
actor
</string>
</key>
<item>
<value>
<string>
romain
</string>
</value>
<key>
<string>
comment
</string>
</key>
</item>
<value>
<string></string>
</value>
<item>
</item>
<key>
<string>
comment
</string>
</key>
<item>
<value>
<string></string>
</value>
<key>
<string>
error_message
</string>
</key>
</item>
<value>
<string></string>
</value>
<item>
</item>
<key>
<string>
error_message
</string>
</key>
<item>
<value>
<string></string>
</value>
<key>
<string>
time
</string>
</key>
</item>
<value>
<item>
<object>
<key>
<string>
time
</string>
</key>
<klass>
<value>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
<object>
</klass>
<klass>
<tuple>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
<none/>
</klass>
</tuple>
<tuple>
<state>
<none/>
<tuple>
</tuple>
<float>
1406898405.89
</float>
<state>
<string>
GMT
</string>
<tuple>
</tuple>
<float>
1406898405.89
</float>
</state>
<string>
GMT
</string>
</object>
</tuple>
</value>
</state>
</item>
</object>
<item>
</value>
<key>
<string>
validation_state
</string>
</key>
</item>
<value>
<string>
published_alive
</string>
</value>
<item>
</item>
<key>
<string>
validation_state
</string>
</key>
</dictionary>
<value>
<string>
published_alive
</string>
</value>
</list>
</item>
</tuple>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</pickle>
</record>
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<pickle>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.
patches.WorkflowTool
"
/>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.
Workflow
"
/>
</pickle>
</pickle>
<pickle>
<pickle>
<tuple>
<dictionary>
<none/>
<item>
<list>
<key>
<string>
_log
</string>
</key>
<dictionary>
<value>
<item>
<list>
<key>
<string>
action
</string>
</key>
<dictionary>
<value>
<string>
edit
</string>
</value>
<item>
</item>
<key>
<string>
action
</string>
</key>
<item>
<value>
<string>
edit
</string>
</value>
<key>
<string>
actor
</string>
</key>
</item>
<value>
<string>
zope
</string>
</value>
<item>
</item>
<key>
<string>
actor
</string>
</key>
<item>
<value>
<string>
zope
</string>
</value>
<key>
<string>
comment
</string>
</key>
</item>
<value>
<item>
<none/>
<key>
<string>
comment
</string>
</key>
</value>
<value>
</item>
<none/>
<item>
</value>
<key>
<string>
error_message
</string>
</key>
</item>
<value>
<string></string>
</value>
<item>
</item>
<key>
<string>
error_message
</string>
</key>
<item>
<value>
<string></string>
</value>
<key>
<string>
serial
</string>
</key>
</item>
<value>
<string>
977.60082.60830.18653
</string>
</value>
<item>
</item>
<key>
<string>
serial
</string>
</key>
<item>
<value>
<string>
979.61953.36209.9762
</string>
</value>
<key>
<string>
state
</string>
</key>
</item>
<value>
<string>
current
</string>
</value>
<item>
</item>
<key>
<string>
state
</string>
</key>
<item>
<value>
<string>
current
</string>
</value>
<key>
<string>
time
</string>
</key>
</item>
<value>
<item>
<object>
<key>
<string>
time
</string>
</key>
<klass>
<value>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
<object>
</klass>
<klass>
<tuple>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
<none/>
</klass>
</tuple>
<tuple>
<state>
<none/>
<tuple>
</tuple>
<float>
1567602082.08
</float>
<state>
<string>
UTC
</string>
<tuple>
</tuple>
<float>
1574329059.87
</float>
</state>
<string>
UTC
</string>
</object>
</tuple>
</value>
</state>
</item>
</object>
</dictionary>
</value>
</list>
</item>
</tuple>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</pickle>
</record>
</record>
<record
id=
"5"
aka=
"AAAAAAAAAAU="
>
<record
id=
"5"
aka=
"AAAAAAAAAAU="
>
<pickle>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.
patches.WorkflowTool
"
/>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.
Workflow
"
/>
</pickle>
</pickle>
<pickle>
<pickle>
<tuple>
<dictionary>
<none/>
<item>
<list>
<key>
<string>
_log
</string>
</key>
<dictionary>
<value>
<item>
<list>
<key>
<string>
action
</string>
</key>
<dictionary>
<value>
<string>
detect_converted_file
</string>
</value>
<item>
</item>
<key>
<string>
action
</string>
</key>
<item>
<value>
<string>
detect_converted_file
</string>
</value>
<key>
<string>
actor
</string>
</key>
</item>
<value>
<string>
romain
</string>
</value>
<item>
</item>
<key>
<string>
actor
</string>
</key>
<item>
<value>
<string>
romain
</string>
</value>
<key>
<string>
comment
</string>
</key>
</item>
<value>
<string></string>
</value>
<item>
</item>
<key>
<string>
comment
</string>
</key>
<item>
<value>
<string></string>
</value>
<key>
<string>
error_message
</string>
</key>
</item>
<value>
<string></string>
</value>
<item>
</item>
<key>
<string>
error_message
</string>
</key>
<item>
<value>
<string></string>
</value>
<key>
<string>
external_processing_state
</string>
</key>
</item>
<value>
<string>
converted
</string>
</value>
<item>
</item>
<key>
<string>
external_processing_state
</string>
</key>
<item>
<value>
<string>
converted
</string>
</value>
<key>
<string>
serial
</string>
</key>
</item>
<value>
<string>
0.0.0.0
</string>
</value>
<item>
</item>
<key>
<string>
serial
</string>
</key>
<item>
<value>
<string>
0.0.0.0
</string>
</value>
<key>
<string>
time
</string>
</key>
</item>
<value>
<item>
<object>
<key>
<string>
time
</string>
</key>
<klass>
<value>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
<object>
</klass>
<klass>
<tuple>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
<none/>
</klass>
</tuple>
<tuple>
<state>
<none/>
<tuple>
</tuple>
<float>
1405427972.98
</float>
<state>
<string>
GMT
</string>
<tuple>
</tuple>
<float>
1405427972.98
</float>
</state>
<string>
GMT
</string>
</object>
</tuple>
</value>
</state>
</item>
</object>
</dictionary>
</value>
</list>
</item>
</tuple>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</pickle>
</record>
</record>
</ZopeData>
</ZopeData>
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