TableTools Not Working

TableTools Not Working

greyedgegreyedge Posts: 5Questions: 0Answers: 0
edited July 2013 in TableTools
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.

Replies

  • greyedgegreyedge Posts: 5Questions: 0Answers: 0
    Let me add that this is for an academic assignment that is due next Tuesday, so a quick reply would be AMAZINGLY helpful.
  • aaronwaaronw Posts: 89Questions: 3Answers: 4
    I'm not actually sure what your question is - how does it not work? What happens?
  • greyedgegreyedge Posts: 5Questions: 0Answers: 0
    Datatables loads correctly, but no buttons appear for TableTools.
  • allanallan Posts: 63,494Questions: 1Answers: 10,470 Site admin
    Can you please link to a test case so we can see the issue? http://datatables.net/forums/discussion/12899/post-test-cases-when-asking-for-help-please-read .

    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
  • greyedgegreyedge Posts: 5Questions: 0Answers: 0
    The application is currently being hosted at Heroku. Here's the link:

    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.
  • greyedgegreyedge Posts: 5Questions: 0Answers: 0
    Strangely enough... after working on another problem, I accidentally fixed this. I think the problem came from having issues with Heroku and precompile. Since I'm using Devise, precompile has to be disabled. But, it can be run manually before pushing to Heroku. So, once I precompiled to fix another problem, the buttons were accessible.
  • allanallan Posts: 63,494Questions: 1Answers: 10,470 Site admin
    Heh - fair enough. Good to hear that it is working now.

    Allan
This discussion has been closed.