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
1
Issues
1
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
Roque
erp5
Commits
b30ede57
Commit
b30ede57
authored
Nov 07, 2019
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_web_renderjs_ui] Listfield: always send the default_%s:int:0 value
Compatibility
parent
dab26b0d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
169 additions
and
159 deletions
+169
-159
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listfield_js.js
...plateItem/web_page_module/rjs_gadget_erp5_listfield_js.js
+6
-8
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listfield_js.xml
...lateItem/web_page_module/rjs_gadget_erp5_listfield_js.xml
+163
-151
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listfield_js.js
View file @
b30ede57
/*global window, rJS, isEmpty, getFirstNonEmpty, ensureArray */
/*global window, rJS, isEmpty, getFirstNonEmpty, ensureArray
, isEmpty
*/
/*jslint nomen: true, indent: 2, maxerr: 3, maxlen: 80 */
/*jslint nomen: true, indent: 2, maxerr: 3, maxlen: 80 */
(
function
(
window
,
rJS
,
getFirstNonEmpty
,
ensureArray
)
{
(
function
(
window
,
rJS
,
getFirstNonEmpty
,
ensureArray
,
isEmpty
)
{
"
use strict
"
;
"
use strict
"
;
rJS
(
window
)
rJS
(
window
)
...
@@ -63,7 +63,7 @@
...
@@ -63,7 +63,7 @@
text_content
=
item_list
[
i
][
0
];
text_content
=
item_list
[
i
][
0
];
}
}
}
}
if
(
text_content
===
undefined
)
{
if
(
(
text_content
===
undefined
)
&&
!
isEmpty
(
this
.
state
.
value
)
)
{
text_content
=
'
??? (
'
+
this
.
state
.
value
+
'
)
'
;
text_content
=
'
??? (
'
+
this
.
state
.
value
+
'
)
'
;
}
}
state
.
text_content
=
text_content
;
state
.
text_content
=
text_content
;
...
@@ -90,6 +90,7 @@
...
@@ -90,6 +90,7 @@
})
})
.
declareMethod
(
'
getContent
'
,
function
()
{
.
declareMethod
(
'
getContent
'
,
function
()
{
var
context
=
this
;
if
(
this
.
state
.
editable
)
{
if
(
this
.
state
.
editable
)
{
return
this
.
getDeclaredGadget
(
'
sub
'
)
return
this
.
getDeclaredGadget
(
'
sub
'
)
.
push
(
function
(
gadget
)
{
.
push
(
function
(
gadget
)
{
...
@@ -100,10 +101,7 @@
...
@@ -100,10 +101,7 @@
// Automatically add default_%s:int:0
// Automatically add default_%s:int:0
// https://lab.nexedi.com/nexedi/erp5/blob/8ae0706177/product/Formulator/Widget.py#L1147
// https://lab.nexedi.com/nexedi/erp5/blob/8ae0706177/product/Formulator/Widget.py#L1147
/*jslint maxlen: 80 */
/*jslint maxlen: 80 */
var
key_list
=
Object
.
keys
(
result
),
i
;
result
[
"
default_
"
+
context
.
state
.
name
+
"
:int
"
]
=
0
;
for
(
i
=
0
;
i
<
key_list
.
length
;
i
+=
1
)
{
result
[
"
default_
"
+
key_list
[
i
]
+
"
:int
"
]
=
0
;
}
return
result
;
return
result
;
});
});
}
}
...
@@ -120,4 +118,4 @@
...
@@ -120,4 +118,4 @@
return
true
;
return
true
;
},
{
mutex
:
'
changestate
'
});
},
{
mutex
:
'
changestate
'
});
}(
window
,
rJS
,
getFirstNonEmpty
,
ensureArray
));
}(
window
,
rJS
,
getFirstNonEmpty
,
ensureArray
,
isEmpty
));
\ No newline at end of file
\ No newline at end of file
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listfield_js.xml
View file @
b30ede57
...
@@ -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.67
</float>
<state>
<string>
GMT
</string>
<tuple>
</tuple>
<float>
1406898405.67
</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>
975.29304.53589.37529
</string>
</value>
<item>
</item>
<key>
<string>
serial
</string>
</key>
<item>
<value>
<string>
979.41914.53909.44561
</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>
1556814300.71
</float>
<state>
<string>
UTC
</string>
<tuple>
</tuple>
<float>
1573126833.72
</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>
1405431319.35
</float>
<state>
<string>
GMT
</string>
<tuple>
</tuple>
<float>
1405431319.35
</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