Advertisement
Guest User

DT2

a guest
Dec 17th, 2014
630
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. oTable = $('#table').DataTable({
  2.             "stateSave": true,
  3.             responsive: true,
  4.             "stateDuration": 3600,
  5.             ajax: {
  6.                 url: "/ajax/foobar"
  7.               },
  8.             "oColVis": {
  9.                 "buttonClass": 'btn btn-default',
  10.                 "buttonText": 'Columns'
  11.             },
  12.             dom: '<"datatable-header"RTCfl>t<"datatable-footer"ip>',
  13.                 tableTools: {
  14.                     sSwfPath: "/resources/media/swf/copy_csv_xls_pdf.swf",
  15.                     aButtons: [
  16.                         {
  17.                             sExtends:    'copy',
  18.                             sButtonText: 'Copy',
  19.                             sButtonClass: 'btn btn-default'
  20.                         },
  21.                         {
  22.                             sExtends:    'print',
  23.                             sButtonText: 'Print',
  24.                             sButtonClass: 'btn btn-default',
  25.                             bShowAll:    true
  26.                         },
  27.                         {
  28.                             sExtends:    'collection',
  29.                             sButtonText: 'Export <span class="caret"></span>',
  30.                             sButtonClass: 'btn btn-primary',
  31.                             aButtons:    [ 'csv', 'xls', 'pdf' ]
  32.                         }
  33.                     ]
  34.                 }
  35.         });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement