DataTables / TableTools

Please note that TableTools has now been retired and replaced by the Buttons and Select extensions which offers significant improvements and API integration with the rest of DataTables and the other extensions.
http://datatables.net/
Other
237 stars 149 forks source link

Issue in sMessage option in Print Functionality #47

Closed benjamingranados closed 10 years ago

benjamingranados commented 10 years ago

My TableTools 2.2.0 was not leaving me print a custom Message (you know, the sMessage option), so I dig into the code and I found that in line 2,314, in the following section:

if ( oConfig.sMessage ) { $('

') .addClass( this.classes.print.message ) .html( oConfig.sMessage ) .prepend( 'body' ); }

I needed to add .prependTo instead of .prepend to get it working. Don't know if is an error but I wanted to share the issue.

benjamingranados commented 10 years ago

I also had to replace this in line 2363 :/

  • Drop the print message */ if ( oDomPrint.message !== null ) { document.body.removeChild( oDomPrint.message ); oDomPrint.message = null; }

With:

/* Drop the print message */ $(".DTTT_PrintMessage").remove();

I think it's me but now it's working. I don't know why I couldn't get it working before :S

DataTables commented 10 years ago

Nice one - thanks for spotting that and letting me know!