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
Tristan Cavelier
erp5
Commits
de09c73f
Commit
de09c73f
authored
Jun 17, 2019
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "DATETIMEFIELDUPDATE fix for linesfield"
This reverts commit
65480a09
.
parent
877e3775
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
11 deletions
+3
-11
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_form_js.js
...plateItem/web_page_module/rjs_gadget_erp5_page_form_js.js
+1
-9
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_form_js.xml
...lateItem/web_page_module/rjs_gadget_erp5_page_form_js.xml
+2
-2
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_form_js.js
View file @
de09c73f
...
...
@@ -92,13 +92,6 @@ and handling data send&receive.
}
}
function
ensureComparable
(
value
,
field_type
)
{
// For LinesField, getContent returns string, but we may give an array of strings to the render method.
if
(
field_type
===
"
LinesField
"
)
{
return
value
.
join
?
value
.
join
(
"
\n
"
)
:
value
;
}
if
(
typeof
value
===
"
object
"
)
{
return
JSON
.
stringify
(
value
);
}
return
value
;
}
function
updateErp5DocumentForAfterSave
(
new_erp5_document
,
submitted_content
,
current_content
)
{
var
view
=
new_erp5_document
.
_embedded
.
_view
,
content_key_list
=
Object
.
keys
(
current_content
),
...
...
@@ -114,8 +107,7 @@ and handling data send&receive.
for
(
i
=
0
;
i
<
content_key_list
.
length
;
i
+=
1
)
{
key
=
content_key_list
[
i
];
if
(
document_reference_dict
[
key
]
&&
ensureComparable
(
submitted_content
[
key
],
document_reference_dict
[
key
].
type
)
===
ensureComparable
(
document_reference_dict
[
key
].
default
,
document_reference_dict
[
key
].
type
))
{
JSON
.
stringify
(
submitted_content
[
key
])
===
JSON
.
stringify
(
document_reference_dict
[
key
].
default
))
{
document_reference_dict
[
key
].
default
=
current_content
[
key
];
}
}
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_form_js.xml
View file @
de09c73f
...
...
@@ -228,7 +228,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
975.56533.481
3
7.29525
</string>
</value>
<value>
<string>
975.56533.481
2
7.29525
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -246,7 +246,7 @@
</tuple>
<state>
<tuple>
<float>
15584480
9
0.86
</float>
<float>
15584480
8
0.86
</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