Merge branch 'ent-13332-se-pierde-exportacion-csv-en-vista-de-inventario-cuando-hay-muchos-elementos' into 'develop'

Ent 13332 Se pierde exportación CSV en vista de Inventario cuando hay muchos elementos.

See merge request artica/pandorafms!7138
This commit is contained in:
Jose Martin 2024-04-09 14:36:33 +00:00
commit e583211265
4 changed files with 14 additions and 5 deletions

View File

@ -4283,6 +4283,12 @@ function ui_print_datatable(array $parameters)
$js = '<script>';
$js .= 'var dt = '.$json_data.';';
$js .= 'var config = '.$json_config.';';
if (isset($parameters['data_element']) === true) {
$js .= 'var preload_elements = true;';
} else {
$js .= 'var preload_elements = false;';
}
$js .= '</script>';
$js .= '<script>';

View File

@ -1,4 +1,4 @@
/* global $ */
/* global $, preload_elements */
var dt = dt;
var config = config;
@ -420,8 +420,10 @@ $(document).ready(function() {
$(function() {
$(document).on("preInit.dt", function(ev, settings) {
if (preload_elements === false) {
$(`#${dt.id}_wrapper div.dataTables_length`).hide();
$(`#${dt.id}_wrapper div.dataTables_filter`).hide();
$(`#${dt.id}_wrapper div.dt-buttons`).hide();
}
});
});

View File

@ -20,7 +20,7 @@
}
.dataTables_paginate.paging_simple_numbers {
margin: 10px 20px 20px 0px;
margin: 20px 20px 20px 0px;
margin-right: 20px !important;
}

View File

@ -1305,6 +1305,7 @@ if ($inventory_module !== 'basic') {
'no_sortable_columns' => [],
'data_element' => $data,
'searching' => true,
'dom_elements' => 'rtipB',
'order' => [
'field' => $columns[0],
'direction' => 'asc',