Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure a print button with Datatables #31

Merged
merged 1 commit into from Feb 23, 2018

Conversation

proxyconcept
Copy link

Some CSS to hide useless elements in the print view.

Also datatable can offer a specific print button, capable of printing only the table, but the entire table (without pagination). Official examples : https://datatables.net/extensions/buttons/examples/print/index.html

@coudot coudot added this to the 0.2 milestone Feb 23, 2018
@coudot coudot merged commit 8c42ac8 into ltb-project:master Feb 23, 2018
@nqb
Copy link
Contributor

nqb commented Feb 27, 2018

Really great feature.

I notice that when you click on buttons, web browsers display print preview but hidden by print settings. If you close print settings, you return to WP. Therefore, you can't take a close look to your print preview.

@proxyconcept
Copy link
Author

We can disable the "autoPrint" feature, see https://datatables.net/extensions/buttons/examples/print/autoPrint.html

In this case, Datatables only open the preview page, without the print popup. So the user can look at the preview, but he have to manually launch the print and then close the preview page.

I don't know what is the best choice. We can always imagine another new config option if necessary.

@coudot
Copy link
Member

coudot commented Feb 28, 2018

I would prefer a configuration option, with autoPrint enabled by default

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants