wp-excel-cms with jquery DataTables support
-
Thanks to @webteilchen for a nice plugin that is very useful and coded so it is easy to improve. There are some flaws and features missing but it is easy to customize even for me having no experience in WP plugin development but basic PHP skills.
I already did some conditional customization to create links and and special formatting inside the cells. Since I use jQuery DataTables in other websites I wanted to see if I could implement this into wp-excel-cms.
I would like to hear if this is of interest and you can test this (very beta) version. Download it here.
I have included DataTables 1.10.12 (and css) built with basic features so this can be expanded if you wish.
What I changed:
- Edit wp-excel-cms/public/templates/default.php to add <thead> and <tbody> to the table since DataTables requires this. Added class “dataTable” to table.
- Added DataTables js and css in wp-excel-cms/public/assets/css (and js) folders.
- Load these in wp-excel-cms.php
- Added ../public/assets/images/ for some DataTables arrows
- Edited ../public/assets/js/public.js to initiate DataTable on the created table with class”.dataTable”. Here you can add all the DataTables options also.
- Added code for internationalization of DataTables in same file with comment to how to change it
Wish list:
- jQuery is neede but included in newer WordPress so I did not check for that – should I?
- Trying to make an option in the shortcode to enable/disable DataTables, e.g.
[wp_excel_cms name="guestlist" datatables=1]
so you can enable or disable DataTables and avoid loading unnecessary js and css - Trying to figure out some css conflicts with WP themes
I am reading up on WordPress plugins so hoping to improve this.
- The topic ‘wp-excel-cms with jquery DataTables support’ is closed to new replies.