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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
erp5
Commits
c2eb69f5
Commit
c2eb69f5
authored
Oct 14, 2016
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_web_renderjs_ui] Multilistfield: support item list without empty value
parent
bad70c9b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_multilistfield_js.js
...Item/web_page_module/rjs_gadget_erp5_multilistfield_js.js
+5
-1
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_multilistfield_js.xml
...tem/web_page_module/rjs_gadget_erp5_multilistfield_js.xml
+2
-2
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_multilistfield_js.js
View file @
c2eb69f5
...
@@ -29,10 +29,10 @@
...
@@ -29,10 +29,10 @@
rJS
(
window
)
rJS
(
window
)
.
declareMethod
(
'
render
'
,
function
(
options
)
{
.
declareMethod
(
'
render
'
,
function
(
options
)
{
var
field_json
=
options
.
field_json
||
{},
var
field_json
=
options
.
field_json
||
{},
item_list
=
field_json
.
items
,
state_dict
=
{
state_dict
=
{
value_list
:
JSON
.
stringify
(
field_json
.
value
||
value_list
:
JSON
.
stringify
(
field_json
.
value
||
field_json
.
default
||
[]),
field_json
.
default
||
[]),
item_list
:
JSON
.
stringify
(
field_json
.
items
),
editable
:
field_json
.
editable
,
editable
:
field_json
.
editable
,
required
:
field_json
.
required
,
required
:
field_json
.
required
,
name
:
field_json
.
key
,
name
:
field_json
.
key
,
...
@@ -40,6 +40,10 @@
...
@@ -40,6 +40,10 @@
sub_select_key
:
field_json
.
sub_select_key
,
sub_select_key
:
field_json
.
sub_select_key
,
sub_input_key
:
field_json
.
sub_input_key
sub_input_key
:
field_json
.
sub_input_key
};
};
if
((
item_list
.
length
===
0
)
||
(
item_list
[
0
][
0
]
!==
""
))
{
item_list
.
unshift
([
""
,
""
]);
}
state_dict
.
item_list
=
JSON
.
stringify
(
item_list
);
return
this
.
changeState
(
state_dict
);
return
this
.
changeState
(
state_dict
);
})
})
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_multilistfield_js.xml
View file @
c2eb69f5
...
@@ -230,7 +230,7 @@
...
@@ -230,7 +230,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
954.389
43.62606.2730
</string>
</value>
<value>
<string>
954.389
66.23297.54869
</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>
14764
58904.36
</float>
<float>
14764
60241.48
</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