• Resolved marketzeitgeist

    (@marketzeitgeist)


    Hi Tobias,

    Your advice and instructions have worked perfectly. The integration of inserting images and opening links was a very clever solution indeed.

    Ok, so now I would like to have my cake and eat it too-you might say 😉

    What would be the best way to modify TableTools to use only Copy and Print buttons (that is, removing csv and excel buttons)? I have found the following from datatables.net

    $(document).ready( function () {
    	$('#example').dataTable( {
    		"sDom": 'T<"clear">lfrtip',
    		"oTableTools": {
    			"aButtons": [ "copy", "print" ]
    		}
    	} );
    } );

    but I don’t know how to or where to add this code.

    Any advice you would have with this will be genuinely appreciated. Thank you very much indeed (once again) and I hope that this request isn’t too difficult or time consuming.

    Take care,

    Matt

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    such code can be added to the DataTables loading call by using the “Custom Commands” textfield in the “DataTables JavaScript features” section on the “Edit” screen of the table.

    In this case, you should only need to add this:

    "oTableTools": { "aButtons": [ "copy", "print" ] }

    Regards,
    Tobias

    Thread Starter marketzeitgeist

    (@marketzeitgeist)

    Hey Tobias,

    I really appreciate your assistance but I inserted the code you suggested and it doesn’t seem to work. Perhaps I’m leaving a step out of the process (it would not be the first time) but it seems rather straight forward.

    Go to this link to see an example of how/where I inserted the code you suggested.

    Also, this is any example of some of the tables I’m trying to modify.

    http://www.emptus.com/marketzeitgeist/?page_id=49

    Once again, thank you very much indeed for all of your hard work and assistance. I assure you that as soon as this site is open for business we’ll make sure you are compensated.

    Until then…fingers crossed!

    take care,

    Matt

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi Matt,

    argh, I’m seeing the reason for the problem:
    As it seems, the possibility to change the visibility of the buttons with that command is part of TableTools 2.0 only. WP-Table Reloaded however ships with version 1.8.

    Unfortunately, I’m not quite sure, when I can include version 2.0, because there are a few things that need special attention, as part of the integration into WP-Table Reloaded.

    So, if you really need the functionality now, you’ll need to manually include TableTools into your site, by following the documentation on their website. Basically, this means that you would use WP-Table Reloaded only to generate the static HTML output for a table, but not to load DataTables/TableTools. This would need to be done manually.

    Regards,
    Tobias

    Thread Starter marketzeitgeist

    (@marketzeitgeist)

    Thanks for all of your help with this Tobias! Will glady wait and not a big deal at all.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘TableTools modification’ is closed to new replies.