TableTools not exporting

TableTools not exporting

kaiiserkaiiser Posts: 9Questions: 0Answers: 0
edited December 2009 in Plug-ins
Hi,

i use windows and firefox 3.5.5 with adobe flash-player v10.* and i can´t get TableTools to work:

- bCsv: no hovering, no action
- bXls: no hover, no action
- bPrint gives a grey overlay-window with only "Print view Please use your browser's print function to print this table. Press escape when finished." as text in it, then fades out and TableTools get´s deactivated. Button is hovering (img get´s changed).
- (i deactivated copy to clipboard with "bCopy": false)

script-code from my header:
[code]

jQuery.noConflict();

var oTable;

jQuery(document).ready(function() {

oTable = jQuery('.datatable').dataTable( {
"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>',
"bJQueryUI": true,
"sPaginationType": "full_numbers"
} );

} );

var TableToolsInit = {
"oFeatures": {
"bCsv": true,
"bXls": true,
"bCopy": false,
"bPrint": true
},
"sPrintMessage": "",
"sTitle": "",
"sSwfPath": "media/swf/ZeroClipboard.swf",
"iButtonHeight": 30,
"iButtonWidth": 30,
"_iNextId": 1 /* Internal useage - but needs to be global */
};
[/code]

I´m pretty bad in js. Pls try to explain my problem to me as when you´d try to explain a caveman (or better: an ape) .. :) thanks a lot!

Regards, K.

Replies

  • kaiiserkaiiser Posts: 9Questions: 0Answers: 0
    oh and yeah, i read everything in the forum and even hooked the tableTools and ZeroClipboard from within the media-folder without success
  • kaiiserkaiiser Posts: 9Questions: 0Answers: 0
    2nd "oh!": i missed one directory with the ZeroClipboard.swf-Path > now it loads fine, when directly loading it, but the whole interface is gone. only values beneath each other without formating or even my table.... ?
  • allanallan Posts: 63,676Questions: 1Answers: 10,497 Site admin
    Hi kaiiser,

    Good to hear you made progress with this, but I'm not quite sure what is going on now :-). Any chance of a link showing the issue?

    Regards,
    Allan
  • bbertrandbbertrand Posts: 1Questions: 0Answers: 0
    comment iDisplayLength = -1 works somehow but may break smthg else ?

    http://datatables.net/forums/comments.php?DiscussionID=1055&page=1#Item_0

    I will evaluate this later on and the possibility of initializing it at declaration time.
  • kaiiserkaiiser Posts: 9Questions: 0Answers: 0
    edited January 2010
    @Allen: Sry for my late answer. The mail with the notification was catched by my spam-filter. It works now. (I´m running this in a closed area of a Wordpress-CMS Project so i can´t give you a link. Maybe per e-mail. :) )

    To explain all the problems (for later readers) i had:
    * I had to set the Path to ZeroClpboard.swf absolute in: definition, /js/tableTools.js and /ZeroClipbord/ZeroClipboard.js
    * Due to the fact, that wordpress uses other libraries aside from jQuery it makes sense to run jQuery in "no Conflict"-mode. So i had to replace most of the "$" with "jQuery".

    Thing(s) that doesn´t work at the moment:
    * sPrintMessage is always showing the orginal Title
    * oLanguage doens´t replace the original Text, it doubles it (at the moment - maybe i can get around it) and destroys the complete table. I tried referencing it through a file and putting it directly into the script-definition.
    * Fixed Header does nearly the same as oLanguage: It doubles the header (with more height) and when i scroll down it jumps slightly to the right...

    I really love dataTables AND TableTools, but i really had a hard time configuring it so far. :)
  • allanallan Posts: 63,676Questions: 1Answers: 10,497 Site admin
    Hi kaiiser,

    I'm quite tempted to set the path for the swf to something really daft, and show an alert if it hasn't been set to something sensible, since that is the most common issue with TableTools.

    Regarding your other points:

    1. sPrintMessage: I'm not sure what you mean. Do you mean you want to update it? If so you can't actually use TableToolsInit.sPrintMessage = "whatever". looking at the code, there isn't actually a way to do this update. I have have a look to see how it might be possible if this is what you are looking for.

    2. oLanguage: Not sure what you mean here. TableTools doesn't have an oLanguage variable. Is this in reference to DataTables itself. In which case, perhaps this example might help: http://datatables.net/examples/basic_init/language.html

    3. It sounds like a CSS issue this. You can put TableTools into the DOM where ever you want using sDom, and then control the surrounding components with CSS.

    Regards,
    Allan
  • kaiiserkaiiser Posts: 9Questions: 0Answers: 0
    @Allen,

    Hi, sry for listing all my problems in here. I forgot, that you "just" maintaine TableTools. :)

    Ad sPrintMessage: When you look at the code above, you see the empty "" there. This is where is just put ex. "whatever" in and that doesn´t work.

    I´ll post the other questions in the forum.

    Thanks for your help so far!!
  • allanallan Posts: 63,676Questions: 1Answers: 10,497 Site admin
    If you do something like TableToolsInit.sPrintMessage = "hello world"; just before you initialise DataTables with TableTools - then it shoudl do the trick. Remember that this message will appear at the very top of the table in plain text. In fact - it's left aligned to the document, so it can appear off to the side if the table is centred - but it will print correct, which is the main thing for the print view!

    Allan
  • kaiiserkaiiser Posts: 9Questions: 0Answers: 0
    Thanks Allen,

    i completely misunderstood the use of sPrintMessage. I thought it would be the message displayed in the overlay that fades out.

    K.
  • allanallan Posts: 63,676Questions: 1Answers: 10,497 Site admin
    Got it :-). That message is currently hardcoded, but easy to change in fnFeaturePrint. A reasonable thing to want to customise, so I'll add that in the next TableTools release.

    Regards,
    Allan
  • kaiiserkaiiser Posts: 9Questions: 0Answers: 0
    Thanks a lot! Still love DataTables and TableTools!
This discussion has been closed.