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
Léo-Paul Géneau
erp5
Commits
9b0c2be8
Commit
9b0c2be8
authored
Nov 21, 2018
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_web_renderjs_ui] Form: no need to create gadget DOM element manually
parent
51a27b9b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
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
+7
-3
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
+2
-2
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_form_js.js
View file @
9b0c2be8
...
@@ -45,12 +45,9 @@
...
@@ -45,12 +45,9 @@
suboptions
.
field_json
.
editable
=
0
;
suboptions
.
field_json
.
editable
=
0
;
}
}
field_element
=
document
.
createElement
(
"
div
"
);
if
(
modification_dict
.
hasOwnProperty
(
'
hash
'
))
{
if
(
modification_dict
.
hasOwnProperty
(
'
hash
'
))
{
queue
=
form_gadget
.
declareGadget
(
'
gadget_erp5_label_field.html
'
,
{
queue
=
form_gadget
.
declareGadget
(
'
gadget_erp5_label_field.html
'
,
{
scope
:
rendered_document
[
field_name
].
key
,
// ugly! Should be just `field_name` but too many tests depend on it
scope
:
rendered_document
[
field_name
].
key
,
// ugly! Should be just `field_name` but too many tests depend on it
element
:
field_element
,
sandbox
:
"
public
"
sandbox
:
"
public
"
});
});
}
else
{
}
else
{
...
@@ -70,6 +67,13 @@
...
@@ -70,6 +67,13 @@
// gadget_list hold references to all created gadgets
// gadget_list hold references to all created gadgets
form_gadget
.
props
.
gadget_list
.
push
(
label_gadget
);
form_gadget
.
props
.
gadget_list
.
push
(
label_gadget
);
}
}
if
(
modification_dict
.
hasOwnProperty
(
'
hash
'
))
{
field_element
=
label_gadget
.
element
;
}
else
{
// XXX Investigate why removing this break everything
// There is not reason to always create a DOM element
field_element
=
document
.
createElement
(
"
div
"
);
}
return
label_gadget
.
render
(
suboptions
);
return
label_gadget
.
render
(
suboptions
);
})
})
.
push
(
function
()
{
.
push
(
function
()
{
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_form_js.xml
View file @
9b0c2be8
...
@@ -230,7 +230,7 @@
...
@@ -230,7 +230,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
97
0.11330.19298.59511
</string>
</value>
<value>
<string>
97
1.50821.45797.19694
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -248,7 +248,7 @@
...
@@ -248,7 +248,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
15
37454067.98
</float>
<float>
15
42818616.03
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</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