Commit 4bd27f6c authored by Tomáš Peterka's avatar Tomáš Peterka Committed by Tomáš Peterka

[rendejrs_ui] Floatfield formats well non-editable integers

Fixes /#/bug_module/20171208-5E8D43

/reviewed-on nexedi/erp5!523
parent 1d49a0b7
...@@ -59,8 +59,8 @@ ...@@ -59,8 +59,8 @@
state_dict.text_content = state_dict.value.toString(); state_dict.text_content = state_dict.value.toString();
if (state_dict.text_content !== "" && thousand_sep !== "") { if (state_dict.text_content !== "" && thousand_sep !== "") {
tmp = input_format_re.exec(state_dict.text_content); tmp = input_format_re.exec(state_dict.text_content);
// tmp == [full-number, sign, integer-part, .decimal-part, ...] // tmp == [full-number, sign, integer-part, .decimal-part (can be undefined because of permissive regexp), ...]
state_dict.text_content = tmp[1] + toTriplets(tmp[2]).join(thousand_sep) + tmp[3]; state_dict.text_content = tmp[1] + toTriplets(tmp[2]).join(thousand_sep) + (tmp[3] || "");
tmp = undefined; tmp = undefined;
} }
} }
......
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>963.37747.27048.56217</string> </value> <value> <string>963.40246.8021.32017</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>1511321647.29</float> <float>1512458225.4</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment