Hi,
thanks for your post, and sorry for the trouble.
Please make sure that the “Use DataTables” checkbox on the table’s “Edit” screen is checked. The checkboxes for the individual features can then be turned off.
Please also clear the cache of your CSS/JS caching and optimization plugin.
Regards,
Tobias
It worked, but I was wondering how I can replace these buttons with icons and align them all in the table footer instead of them appearing at the top of the table.
Thanks Tobias.
Hi,
to move them to the footer, you can add this to the “Custom Commands” text field on the table’s “Edit” screen:
"dom": "lfrtipB"
As for the icons: I recommend to use CSS code to add these as background images to the buttons. For example, you could add this to the “Custom CSS” textarea on the “Plugin Options” screen of TablePress:
.dataTables_wrapper .buttons-pdf {
background: ...;
}
(This would have to be adjusted to have an image URL.)
Regards,
Tobias
Hi Tobias,
Just one more thing. How can I hide this text and button border and leave only the image?
Printscreen: https://uploaddeimagens.com.br/imagens/MdRf7Ew
Hi,
please try adding
.dataTables_wrapper .buttons-pdf span {
display: none;
}
to hide the text, and
border: none;
to the other CSS block to remove the border.
Regards,
Tobias
Hi Tobias,
All your steps worked.
But I found a conflict.
I tried to add the buttons to this table: https://mrs2020.blendon.com.br/relatorio-de-sustentabilidade-2020/sumario-de-conteudo-gri-e-sasb/ and they don’t appear and an error doesn’t appear on my console DataTables.
-
This reply was modified 4 years, 12 months ago by
thiagowski.
Hi,
the problem here is that this table uses #rowspan# to merge/connect cells in a column. Unfortunately, the external DataTables JavaScript library and the Buttons Extension are not compatible to that. If you want to use that, you must remove all #rowspan# from the table.
Regards,
Tobias
Hi Tobias,
So I can’t merge columns and cells? Is there any other way to merge correctly? Because I have to follow a graphic model and I need to merge some cells and columns.
Hi,
yes, if you want to use any of the JavaScript features, like search, sort, or the buttons, you can not merge columns/cells in this table. It’s just not supported by the external JavaScript library that TablePress uses. Sorry for not having better news here.
Regards,
Tobias