Commit 54ab1ad8 by Romain Courteaud

[erp5_web_renderjs_ui] ListField: support first_item parameter

1 parent 2db2ecd3
...@@ -16,8 +16,13 @@ ...@@ -16,8 +16,13 @@
editable: field_json.editable, editable: field_json.editable,
required: field_json.required, required: field_json.required,
name: field_json.key, name: field_json.key,
title: field_json.title title: field_json.title,
first_item: field_json.first_item
}; };
if ((!state_dict.value) && (state_dict.first_item)) {
state_dict.value = field_json.items[0][1];
}
return this.changeState(state_dict); return this.changeState(state_dict);
}) })
......
...@@ -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.38571.58992.44731</string> </value> <value> <string>954.44644.53233.55825</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>1476437096.88</float> <float>1476801003.44</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!