Merge branch 'ent-4763-paginacion-datatables' into 'develop'
datatables hide when only 1 page See merge request artica/pandorafms!2784
This commit is contained in:
commit
adaead5f8f
pandora_console/include
|
@ -3191,14 +3191,18 @@ function ui_print_datatable(array $parameters)
|
|||
$.fn.dataTable.ext.errMode = "none";
|
||||
$.fn.dataTable.ext.classes.sPageButton = "'.$pagination_class.'";
|
||||
dt_'.$table_id.' = $("#'.$table_id.'").DataTable({
|
||||
';
|
||||
drawCallback: function(settings) {';
|
||||
if (isset($parameters['drawCallback'])) {
|
||||
$js .= 'drawCallback: function(settings) {
|
||||
'.$parameters['drawCallback'].'
|
||||
},';
|
||||
$js .= $parameters['drawCallback'];
|
||||
}
|
||||
|
||||
$js .= '
|
||||
if (dt_'.$table_id.'.page.info().pages > 1) {
|
||||
$("#'.$table_id.'_wrapper > .dataTables_paginate.paging_simple_numbers").show()
|
||||
} else {
|
||||
$("#'.$table_id.'_wrapper > .dataTables_paginate.paging_simple_numbers").hide()
|
||||
}
|
||||
},
|
||||
processing: true,
|
||||
serverSide: true,
|
||||
paging: true,
|
||||
|
@ -3303,6 +3307,7 @@ function ui_print_datatable(array $parameters)
|
|||
dt_'.$table_id.'.draw().page(0)
|
||||
});
|
||||
});
|
||||
|
||||
</script>';
|
||||
|
||||
// Order.
|
||||
|
|
Loading…
Reference in New Issue