TableTools Not Working
TableTools Not Working
greyedge
Posts: 5Questions: 0Answers: 0
I've been working on this for a long time and I can't figure out the problem. I'm using Rails for my app. I've installed and included all necessary files for DataTables and TableTools. When I run the DataTables debugger, it says that both are installed and up-to-date. Datatables, itself, shows up fine.
Here's my application.js file:
//= require jquery
//= require jquery_ujs
//= require dataTables/jquery.dataTables
//= require TableTools
//= require ZeroClipboard
//= require_tree .
Because I had issues with TableTools files being located, I copied the .js files into /lib/assets/javascripts/ so that they can be found. It was after this change that the debugger recognized that I had TableTools installed.
Here's my application.css file:
*= require_self
*= require jquery.ui.core
*= require jquery.ui.theme
*= require dataTables/src/demo_table_jui
*= require dataTables/extras/TableTools
*= require dataTables/extras/TableTools_JUI
*= require_tree .
And, finally, here's my js.coffee:
$('#artists').dataTable
sPaginationType: "full_numbers"
bJQueryUI: true
sDom: 'T<"clear"><"fg-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix"lfr>t<"fg-toolbar ui-widget-header ui-corner-bl ui-corner-br ui-helper-clearfix"ip>'
oTableTools: {
sSwfPath: "http://localhost:3000/swf/copy_csv_xls_pdf.swf" }
I've tried it locally and it doesn't work. I changed the URL to the server address, pushed it up, and it still doesn't work. I've run out of ideas.
Here's my application.js file:
//= require jquery
//= require jquery_ujs
//= require dataTables/jquery.dataTables
//= require TableTools
//= require ZeroClipboard
//= require_tree .
Because I had issues with TableTools files being located, I copied the .js files into /lib/assets/javascripts/ so that they can be found. It was after this change that the debugger recognized that I had TableTools installed.
Here's my application.css file:
*= require_self
*= require jquery.ui.core
*= require jquery.ui.theme
*= require dataTables/src/demo_table_jui
*= require dataTables/extras/TableTools
*= require dataTables/extras/TableTools_JUI
*= require_tree .
And, finally, here's my js.coffee:
$('#artists').dataTable
sPaginationType: "full_numbers"
bJQueryUI: true
sDom: 'T<"clear"><"fg-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix"lfr>t<"fg-toolbar ui-widget-header ui-corner-bl ui-corner-br ui-helper-clearfix"ip>'
oTableTools: {
sSwfPath: "http://localhost:3000/swf/copy_csv_xls_pdf.swf" }
I've tried it locally and it doesn't work. I changed the URL to the server address, pushed it up, and it still doesn't work. I've run out of ideas.
This discussion has been closed.
Replies
As you can see from the examples TableTools does basically work, so there is something in your environment that is breaking, but without seeing it we can't know what it is.
I'd also suggest looking at your browser's debug console if you haven't already. Likely there is an error of some being reported.
Allan
edgewater.herokuapp.com
The app is currently not secure, because this is my test deployment. You can create a new user 'Sign In' at the login page.
The only index that contains the DataTables form, with my attempt at TableTools, is at this specific url:
http://edgewater.herokuapp.com/artists/
A link to this page is not available from the menu. You must manually type it in after logging into the application.
Allan