Merge branch 'ent-12657-mostrar-show-entries-de-eventos-de-menor-a-mayor' into 'develop'

Ent 12657 mostrar show entries de eventos de menor a mayor

See merge request artica/pandorafms!6785
This commit is contained in:
Rafael Ameijeiras 2024-01-29 09:30:55 +00:00
commit ccaa25da23
2 changed files with 8 additions and 2 deletions

View File

@ -66,6 +66,11 @@ if (typeof dt.pagination_options !== "undefined") {
lengthMenu = dt.pagination_options; lengthMenu = dt.pagination_options;
} }
if (dt.pagination_options_order === "true") {
lengthMenu[0] = lengthMenu[0].sort((a, b) => a - b);
lengthMenu[1] = lengthMenu[1].sort((a, b) => a - b);
}
var ordering = true; var ordering = true;
if (typeof dt.ordering !== "undefined" && dt.ordering === false) { if (typeof dt.ordering !== "undefined" && dt.ordering === false) {
ordering = dt.ordering; ordering = dt.ordering;

View File

@ -2819,7 +2819,7 @@ try {
'extra_html' => $active_filters_div.$graph_div, 'extra_html' => $active_filters_div.$graph_div,
'pagination_options' => [ 'pagination_options' => [
[ [
$config['block_size'], (int) $config['block_size'],
10, 10,
25, 25,
100, 100,
@ -2827,7 +2827,7 @@ try {
500, 500,
], ],
[ [
$config['block_size'], (int) $config['block_size'],
10, 10,
25, 25,
100, 100,
@ -2835,6 +2835,7 @@ try {
500, 500,
], ],
], ],
'pagination_options_order' => 'true',
'order' => [ 'order' => [
'field' => 'timestamp', 'field' => 'timestamp',
'direction' => 'desc', 'direction' => 'desc',