copy_csv_xls_pdf.swf not loading (requirejs)

copy_csv_xls_pdf.swf not loading (requirejs)

moriciomoricio Posts: 5Questions: 0Answers: 0
edited April 2014 in TableTools
Hello,

I use TableTools plugin with requirejs, here's how:
[code]require.config({
baseUrl: "/medias/js/",
paths: {
"jquery": "//ajax.aspnetcdn.com/ajax/jquery/jquery-2.1.0.min",
"datatables": "//cdn.datatables.net/1.10.0-rc.1/js/jquery.dataTables",
"tabletools": "libs/DataTables/extensions/TableTools/js/dataTables.tableTools.min"
},
shim: {
"datatables": {
deps: ["css!/medias/css/dataTable.css"]
},
"tabletools": {
deps: ["datatables", "css!/medias/js/libs/DataTables/extensions/TableTools/css/dataTables.tableTools.css"]
}
},
map: {
"*": {
"css": "libs/css.min"
}
}
});[/code]

And init:
[code]requirejs(["tabletools"], function() {
$('#Histo').dataTable({
"sDom": 'T<"clear">lfrtip', //'',
"oTableTools": {
"sSwfPath": "/medias/js/libs/DataTables/extensions/TableTools/swf/copy_csv_xls_pdf.swf"
}
"aaData": [ <?php echo $aaData; ?> ],
"aoColumns": [ <?php echo $aoColumns; ?> ]
});
});[/code]

DataTable perfect showing.
dataTables.tableTools.min is correctly loading but not copy_csv_xls_pdf.swf.
No error repporting in Firebug and DataTables debug say TableTools not installed (ekukoh).

I dont understand why.
Any idea?

Thanks

Replies

  • allanallan Posts: 63,489Questions: 1Answers: 10,470 Site admin
    Can you link to a test case showing the problem please.

    Allan
  • moriciomoricio Posts: 5Questions: 0Answers: 0
    oups,
    http://debug.datatables.net/ekukoh
  • allanallan Posts: 63,489Questions: 1Answers: 10,470 Site admin
    I think in this case I'd actually need a test case, not just a debug trace.

    Allan
  • moriciomoricio Posts: 5Questions: 0Answers: 0
    edited April 2014
    [code]





    Software

    Version
    Date




    DataTables
    Stable:
    1.9.4
    Fri 26th Oct 2012, 08:11


    TableTools
    Stable:
    2.2.0
    Tue 29th Apr 2014, 02:02





    require.config({
    paths: {
    "jquery": "//ajax.aspnetcdn.com/ajax/jquery/jquery-2.1.0.min",
    "datatables": "//cdn.datatables.net/1.10.0-rc.1/js/jquery.dataTables.min",
    "tabletools": "//cdn.datatables.net/tabletools/2.2.0/js/dataTables.tableTools.min"
    },
    shim: {
    "datatables": {
    deps: ["css!//cdn.datatables.net/1.10.0-rc.1/css/jquery.dataTables.min.css"]
    },
    "tabletools": {
    deps: ["datatables"]
    }
    },
    map: {
    "*": {
    "css": "//cdnjs.cloudflare.com/ajax/libs/require-css/0.1.1/css.js"
    }
    }
    });
    requirejs(["tabletools"], function() {
    $('#table').dataTable({
    "iDisplayLength": 1,
    "sDom": 'T<"clear">lfrtip',
    "oTableTools": {
    "sSwfPath": "http://cdnjs.cloudflare.com/ajax/libs/datatables-tabletools/2.1.5/swf/copy_csv_xls_pdf.swf",
    "aButtons": [
    "copy",
    "print",
    {
    "sExtends": "collection",
    "sButtonText": "Save",
    "aButtons": [ "csv", "xls", "pdf" ]
    }
    ]
    }
    });
    });



    [/code]
  • prometeo84prometeo84 Posts: 1Questions: 0Answers: 0

    Please help.

    I try to put the swf file in another folder but don't work the export.

    "sSwfPath": "files/copy_csv_xls_pdf.swf",

    What I do wrong?.

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395

    You are the only person who knows the location of your .swf file.

This discussion has been closed.