Commit 3f1a84f1 authored by Romain Courteaud's avatar Romain Courteaud

[erp5_web_renderjs_ui] Align right the integer/float fields

parent 9774ad11
......@@ -12,6 +12,5 @@
<script src="gadget_erp5_field_float.js" type="text/javascript"></script>
</head>
<body>
</body>
<body><div class="floatfield"></div></body>
</html>
\ No newline at end of file
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>954.34618.13218.7202</string> </value>
<value> <string>956.15544.35120.8499</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1476697790.84</float>
<float>1482832895.67</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -43,11 +43,12 @@
}
result = this.declareGadget(url, {scope: 'sub'})
.push(function (input) {
var child = element.firstChild;
// Clear first to DOM, append after to reduce flickering/manip
while (element.firstChild) {
element.removeChild(element.firstChild);
while (child.firstChild) {
child.removeChild(child.firstChild);
}
element.appendChild(input.element);
child.appendChild(input.element);
return input;
});
} else {
......
......@@ -230,7 +230,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>954.45675.44850.53452</string> </value>
<value> <string>956.15606.9114.8567</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>1479375725.91</float>
<float>1482842715.75</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -12,6 +12,5 @@
<script src="gadget_erp5_field_integer.js" type="text/javascript"></script>
</head>
<body>
</body>
<body><div class="integerfield"></div></body>
</html>
\ No newline at end of file
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>954.42877.47511.36096</string> </value>
<value> <string>956.15544.49991.48571</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1476697183.42</float>
<float>1482832904.74</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -37,11 +37,12 @@
}
result = this.declareGadget(url, {scope: 'sub'})
.push(function (input) {
var child = element.firstChild;
// Clear first to DOM, append after to reduce flickering/manip
while (element.firstChild) {
element.removeChild(element.firstChild);
while (child.firstChild) {
child.removeChild(child.firstChild);
}
element.appendChild(input.element);
child.appendChild(input.element);
return input;
});
} else {
......
......@@ -230,7 +230,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>954.45675.44850.53452</string> </value>
<value> <string>956.15546.61555.10547</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>1479375649.91</float>
<float>1482836410.69</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -1023,6 +1023,15 @@ div[data-gadget-scope='header'] .ui-header ul {
flex: 1;
}
/**********************************************
* Gadget: float/integer field
**********************************************/
.floatfield p,
.integerfield p,
.floatfield input,
.integerfield input {
text-align: right;
}
/**********************************************
* Listbox
**********************************************/
div[data-gadget-scope='erp5_searchfield'] {
......
......@@ -242,7 +242,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>956.14405.28282.34542</string> </value>
<value> <string>956.15601.59473.18841</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>1482764582.12</float>
<float>1482836317.11</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -1199,6 +1199,15 @@ div[data-gadget-scope='header'] .ui-header {
}
}
/**********************************************
* Gadget: float/integer field
**********************************************/
.floatfield, .integerfield {
p, input {
text-align: right;
}
}
/**********************************************
* Listbox
**********************************************/
......
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