copy_csv_xls_pdf.swf not loading (requirejs)
copy_csv_xls_pdf.swf not loading (requirejs)
moricio
Posts: 5Questions: 0Answers: 0
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
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
This discussion has been closed.
Replies
Allan
http://debug.datatables.net/ekukoh
Allan
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]
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?.
You are the only person who knows the location of your .swf file.