Sorry,
I found where is the problem.
Normaly I have in tabletools.php this:
* Evaluate “datatables_tabletools” parameter and add corresponding JavaScript code, if needed
*/
function tablepress_add_tabletools_js_command( $command, $html_id, $parameters, $table_id, $js_options ) {
if ( ! $js_options[‘datatables_tabletools’] )
return $command;
$table_wrapper = “{$html_id}_wrapper”;
$html_id = str_replace( ‘-‘, ‘_’, $html_id );
$table_name = “oTable_{$html_id}”;
$tabletools_name = “oTableTools_{$html_id}”;
$command = substr( $command, 0, -1 ); // removing ; at the end
$swf_path = plugins_url( ‘swf/copy_csv_xls_pdf.swf’, __FILE__ );
// with text (somme CSS needs to commented out!):
//$tabletools_options = ‘{ “sSwfPath”: “‘ . $swf_path . ‘”, “aButtons”: [ “copy”, “print”, { “sExtends”: “collection”, “sButtonText”: “Save as”, “aButtons”: [ “csv”, “xls”, “pdf” ] } ] }’;
// with images:
$tabletools_options = ‘{ “sSwfPath”: “‘ . $swf_path . ‘”, “sRowSelect”: “multi”, “aButtons”: [ { “sExtends”: “copy”, “sButtonText”: “”, “bSelectedOnly”: true, “mColumns”: “visible”}, { “sExtends”: “xls”, “sButtonText”: “”, “bSelectedOnly”: true, “mColumns”: “visible” }, { “sExtends”: “xls”, “sButtonText”: “”, “bSelectedOnly”: true, “mColumns”: “visible”, }, { “sExtends”: “pdf”, “sButtonText”: “”, “bSelectedOnly”: true, “mColumns”: “visible”, “sPdfOrientation”: “landscape”, }, { “sExtends”: “print”, “bShowAll”: false, “sButtonText”: “”, “bSelectedOnly”: true, “sPrintOrientation”: “landscape”, } ] }’;
$command = “var {$table_name} = {$command}, {$tabletools_name} = new TableTools({$table_name}, {$tabletools_options}); $(‘#{$table_wrapper}’).before({$tabletools_name}.dom.container);”;
return $command;
}
How can I aply now “bSelectedOnly”: true and “sRowSelect”: “multi”
Thanks!!