Ciao a tutti
Utilizzo il template metronic per un pannello di controllo.
In una pagina utilizzo un datatable e voglio invertire il campo di ricerca e il campo numero elementi per pagina.
Ho trovato questo codice:
"sDom": '<"pull-left"f><"pull-right"l>tip',
Quando visualizzo la pagina i 2 campi vengono invertiti, ma ricevo questo errore:
TypeError: an is undefined
in
/Metronic/plugins/data-tables/jquery.dataTables.js
e non carica i dati.
Quì il codice utilizzato:
codice:
oTable = $('#dtElenco').dataTable({
"oLanguage": {
"sUrl": "/Metronic/plugins/data-tables/language/it-IT.txt"
},
"aoColumns": [
{ "bSortable": false, "sClass": "txt-center" },
{ "bSortable": false, "sClass": "txt-center" },
null,
null,
{ "sClass": "txt-center" },
{ "bSortable": false, "sClass": "txt-center" }
],
"aaSorting": [[2, "asc"]],
"aLengthMenu": [
[20, 50, 100],
[20, 50, 100] // change per page values here
],
// set the initial value
"iDisplayLength": 20,
"sDom": '<"pull-left"f><"pull-right"l>tip',
"sPaginationType": "bootstrap",
"aoColumnDefs": [
{ 'bSortable': false, 'aTargets': [0] },
{ "bSearchable": false, "aTargets": [0] }
],
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "/Handler/Utenti/utentiTable.ashx",
"fnServerData": function (sSource, aoData, fnCallback) {
...
},
});