Can't integrate TableTools

Can't integrate TableTools

rolinadrolinad Posts: 4Questions: 0Answers: 0
edited December 2013 in TableTools
Hello,
i was a while trying to integrate TableTools to my project but i cant...
Datatables with Bootstrap 3 works fine....

My table structure
[code]





[.............]



[......]

[/code]

I think that my problem is the js...

[code]
$(document).ready(function() {
$('.datatable').dataTable({

"sDom": 'T<"clear">lfrtip',
"oTableTools": {
"sSwfPath": "/assets/media/swf/copy_csv_xls_pdf.swf",
"aButtons": [
"copy",
"print",
{
"sExtends": "collection",
"sButtonText": 'Save ',
"aButtons": [ "csv", "xls", "pdf" ]
}
]
},


"sPaginationType": "bs_normal",
"oLanguage": {
"sProcessing": "Procesando...",
"sLengthMenu": "Mostrar _MENU_ registros",
"sZeroRecords": "No se encontraron resultados",
"sEmptyTable": "Ningún dato disponible en esta tabla",
"sInfo": "Mostrando registros del _START_ al _END_ de un total de _TOTAL_ registros",
"sInfoEmpty": "Mostrando registros del 0 al 0 de un total de 0 registros",
"sInfoFiltered": "(filtrado de un total de _MAX_ registros)",
"sInfoPostFix": "",
"sSearch": "Buscar:",
"sUrl": "",
"sInfoThousands": ",",
"sLoadingRecords": "Cargando...",
"oPaginate": {
"sFirst": "Primero",
"sLast": "Último",
"sNext": "Siguiente",
"sPrevious": "Anterior"
},
"oAria": {
"sSortAscending": ": Activar para ordenar la columna de manera ascendente",
"sSortDescending": ": Activar para ordenar la columna de manera descendente"
}
},

});
})
[/code]

it would be nice if someone help me with this...
What is wrong???

Replies

  • allanallan Posts: 57,236Questions: 1Answers: 9,113 Site admin
    I don't immediately see anything wrong there. Can you please link to a test case: http://datatables.net/forums/discussion/12899

    Allan
  • rolinadrolinad Posts: 4Questions: 0Answers: 0
    Sorry...
    the example is here:
    http://tufotografia.cl/test/index.html
    there are two examples, with sDom line, and without it

    My problem start when i write sDom line in js...
  • allanallan Posts: 57,236Questions: 1Answers: 9,113 Site admin
    If you look at the console in your browser you will see:

    > [Error] ReferenceError: Can't find variable: ZeroClipboard_TableTools

    You need to include this file as well: https://github.com/DataTables/TableTools/blob/master/media/js/ZeroClipboard.js

    Allan
  • rolinadrolinad Posts: 4Questions: 0Answers: 0
    edited December 2013
    Oh... that's it what i was missing...
    Thanks!

    still cant see correctly the buttons, the swf apparently is loaded without problem...
    http://tufotografia.cl/tabletools/index.html
  • allanallan Posts: 57,236Questions: 1Answers: 9,113 Site admin
    Looks like you haven't included the TableTools CSS: https://github.com/DataTables/TableTools/blob/master/media/css/TableTools.css
  • rolinadrolinad Posts: 4Questions: 0Answers: 0
    That's was all that i needed...

    Thanks a lot!!
This discussion has been closed.