×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Javascript
Posted by: Marcelo Aleks
Added: May 8, 2015 10:12 PM
Modified: May 23, 2015 7:46 PM
Views: 1869
  1.     function initTableProdutos() {
  2.  
  3.         var t = $('#tableProdutos').DataTable({
  4.             "ajax": "/private/produtos",
  5.             "deferRender": true,
  6.             "scrollY": 200,
  7.             "scrollCollapse": true,
  8.             "jQueryUI": true,
  9.             "paging": false,
  10.             "language": {
  11.                 "lengthMenu": "Apresenta _MENU_ registros por página",
  12.                 "zeroRecords": "Nada a ser apresentado",
  13.                 "info": "Página  _PAGE_ of _PAGES_",
  14.                 "infoEmpty": "Nenhum registro disponível",
  15.                 "emptyTable": "Tabela vazia",
  16.                 "infoFiltered": "(filtrados de _MAX_ total de registros)",
  17.                 "search": "Busca",
  18.                 "paginate": {
  19.                     "previous": "anterior",
  20.                     "next": "próximo"
  21.                 }
  22.  
  23.             },
  24.             //Define como será a coluna '0'
  25.             "columnDefs": [{
  26.                     "searchable": false,
  27.                     "orderable": false,
  28.                     "targets": 0  //[0,1]
  29.                 }],
  30.             //Ordem da coluna
  31.             "order": [[1, 'asc']]
  32.  
  33.         });
  34.  
  35.  
  36.     setVisible("#tabProdutos", false);
  37.     setVisible("#tabProdutos", true);