Button collection problem in the example

Button collection problem in the example

cifracifra Posts: 4Questions: 0Answers: 0
edited April 2012 in TableTools
Hi Allan,
in the http://datatables.net/release-datatables/extras/TableTools/collection.html example the Save collection not work, while copy and print work. It is a my problem?
In the http://datatables.net/release-datatables/extras/TableTools/button_text.html all work correctly.

Thanks

Replies

  • allanallan Posts: 63,680Questions: 1Answers: 10,498 Site admin
    You are quite right - I'll take a closer look and see what has gone wrong there. Thanks for flagging it up!

    Allan
  • cifracifra Posts: 4Questions: 0Answers: 0
    Allan
    I think there is, also, a mistake in the http://datatables.net/release-datatables/extras/TableTools/swf_path.html.

    The "sSwfPath": "media/swf/copy_cvs_xls_pdf.swf" should be "sSwfPath": "media/swf/copy_csv_xls_pdf.swf"
  • KaibiKaibi Posts: 1Questions: 0Answers: 0
    Hey guys.
    I have the same problem and started to debug it a bit.

    For me it looks like the problem of calculating the size of dom-elements wich are hidden.
    The size and position of the flash containers is allways zero and so there is no clickable area.

    Hopefully this helps fixing the bug.
  • cifracifra Posts: 4Questions: 0Answers: 0
    Allan,
    I see if I comment the row "document.body.appendChild( nHidden );" inside the "_fnCollectionConfig" function in the "TableTools.js" it look work correctly.
    I believe that the problem is when the "_fnFlashGlue" run if the collection children has been append then it find them and append the flash part but with size equal to zero, instead of if I comment the row the collection children are append only when the collection button is pressed.
    Sorry for my english.
  • dwaterhouse82dwaterhouse82 Posts: 3Questions: 0Answers: 0
    Same issue for me as well, only effects collections, single buttons work.
    For now i'm just going to roll back to the previous version.
  • JDonaghyJDonaghy Posts: 1Questions: 0Answers: 0
    I'd like to confirm that cifra's fix works for me as well. I diff'd the code against the old version and noticed that this particular line was the only change to that function. Removing the line makes button collections work again.
  • allanallan Posts: 63,680Questions: 1Answers: 10,498 Site admin
    I've just committed a fix for this ( https://github.com/DataTables/TableTools/commit/9c7837c86f92f8c223637f1b93745b3855d75749 ). It will be in the nightly shortly, and in the next TableTools release.

    I didn't use cifra's fix directly as that results in a lot of 100mS timers being fired until the collection is shown (that's how it worked before, but it seems like a suboptimal approach in retrospect). The change I've put in will cause the buttons to resize correctly when the collection is shown, but without the need for the timer.

    Regards,
    Allan
  • allanallan Posts: 63,680Questions: 1Answers: 10,498 Site admin
    I should have said at the time - this is addressed in the latest TableTools release - currently standing at v2.1.2: http://datatables.net/download :-)
This discussion has been closed.