Commit 5f27addc authored by Romain Courteaud's avatar Romain Courteaud

[erp5_web_renderjs_ui] Inform user when he sees sample of results

parent 1041a64a
......@@ -6,6 +6,7 @@
data-i18n=Records
data-i18n=Hide Rows
data-i18n=Submit
data-i18n=sample of
-->
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, user-scalable=no" />
......
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>967.44841.15161.33928</string> </value>
<value> <string>967.44852.3400.7082</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1526894643.05</float>
<float>1528106932.21</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -619,14 +619,18 @@
prev_param[gadget.state.key + '_begin_from'] = gadget.state.begin_from - lines;
setNext();
}
return gadget.getUrlForList([
{command: 'change', options: prev_param},
{command: 'change', options: next_param}
return RSVP.all([
gadget.translate('sample of'),
gadget.getUrlForList([
{command: 'change', options: prev_param},
{command: 'change', options: next_param}
])
]);
})
.push(function (url_list) {
var record,
.push(function (result_list) {
var sample_string = result_list[0],
url_list = result_list[1],
record,
previous_url = url_list[0],
next_url = url_list[1],
previous_classname = "ui-btn ui-icon-carat-l ui-btn-icon-left responsive ui-first-child",
......@@ -641,7 +645,11 @@
} else {
pagination_message = (((gadget.state.begin_from + lines) / lines - 1) * lines + 1) + " - " + (((gadget.state.begin_from + lines) / lines - 1) * lines + counter);
if (allDocs_result.count !== undefined) {
pagination_message += ' / ' + allDocs_result.count;
if ((allDocs_result.count === 1000) && (!gadget.state.show_count)) {
pagination_message += ' / ' + sample_string + ' ' + allDocs_result.count;
} else {
pagination_message += ' / ' + allDocs_result.count;
}
}
record = variable.translated_records + " " + pagination_message;
}
......
......@@ -236,7 +236,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>967.44855.43962.32563</string> </value>
<value> <string>967.65060.33188.22937</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -254,7 +254,7 @@
</tuple>
<state>
<tuple>
<float>1526894963.13</float>
<float>1528107178.27</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