Commit 2cfd9162 authored by Romain Courteaud's avatar Romain Courteaud

[erp5_web_renderjs_ui] Listbox: cast document pagination information to int

parent eb39ffef
......@@ -1028,7 +1028,8 @@
next_classname = "ui-btn ui-icon-carat-r ui-btn-icon-right responsive ui-last-child",
fragment = document.createDocumentFragment(),
sub_element,
nav_element = gadget.element.querySelector('nav');
nav_element = gadget.element.querySelector('nav'),
from_index;
if ((gadget.state.begin_from === 0) && (counter === 0)) {
record = variable.translated_no_record;
......@@ -1037,7 +1038,8 @@
record = counter + " " + variable.translated_records;
pagination_message = counter;
} else {
pagination_message = (((gadget.state.begin_from + lines) / lines - 1) * lines + 1) + " - " + (((gadget.state.begin_from + lines) / lines - 1) * lines + counter);
from_index = Math.round(((gadget.state.begin_from + lines) / lines - 1) * lines);
pagination_message = (from_index + 1) + " - " + (from_index + counter);
if (allDocs_result.count !== undefined) {
if ((allDocs_result.count === 1000) && (!gadget.state.show_count)) {
pagination_message += ' / ' + sample_string + ' ' + allDocs_result.count;
......
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>977.11616.36565.47718</string> </value>
<value> <string>978.14035.65281.57804</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1563530945.78</float>
<float>1567608261.37</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