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 @@
state_dict.text_content = state_dict.value.toString();
if (state_dict.text_content !== "" && thousand_sep !== "") {
tmp = input_format_re.exec(state_dict.text_content);
// tmp == [full-number, sign, integer-part, .decimal-part, ...]
state_dict.text_content = tmp[1] + toTriplets(tmp[2]).join(thousand_sep) + tmp[3];
// 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] || "");
tmp = undefined;
}
}
......
......@@ -230,7 +230,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>963.37747.27048.56217</string> </value>
<value> <string>963.40246.8021.32017</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>1511321647.29</float>
<float>1512458225.4</float>
<string>UTC</string>
</tuple>
</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