plugin:datatables
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
plugin:datatables [2015-09-30 14:18] – lotar | plugin:datatables [2024-04-21 09:58] (current) – 2001:1c04:2a92:5f00:4a0f:68f2:3f0c:20c6 | ||
---|---|---|---|
Line 5: | Line 5: | ||
author | author | ||
email : giuseppe.diterlizzi@gmail.com | email : giuseppe.diterlizzi@gmail.com | ||
- | type : syntax, | + | type : syntax, action |
- | lastupdate : 2015-09-18 | + | lastupdate : 2023-08-31 |
- | compatible : Weatherwax,hrun,Detritus | + | compatible : Kaos, Greebo, Frusterick Manners, |
depends | depends | ||
- | conflicts | + | conflicts |
similar | similar | ||
- | tags : datatables, tables, jquery | + | tags : datatables, tables, jquery, filter |
- | downloadurl: | + | downloadurl: |
- | bugtracker : https:// | + | bugtracker : https:// |
- | sourcerepo : https:// | + | sourcerepo : https:// |
donationurl: | donationurl: | ||
Line 25: | Line 25: | ||
===== Installation ===== | ===== Installation ===== | ||
- | Install | + | Search and install |
+ | |||
+ | :!: **Note for Hogfather users** \\ | ||
+ | Hogfather use the JS " | ||
===== Examples/ | ===== Examples/ | ||
Line 78: | Line 81: | ||
| '' | | '' | ||
| '' | | '' | ||
- | | '' | + | | '' |
| '' | | '' | ||
| '' | | '' | ||
Line 90: | Line 93: | ||
Notes: | Notes: | ||
- | * The option names are actually used as HTML5 data attributes, so they must be formatted with hyphens-and-lower-case instead of camelCase | + | * The option names are actually used as HTML5 data attributes, so they must be formatted with hyphens-and-lower-case instead of CamelCase |
* Do not prepend option names with '' | * Do not prepend option names with '' | ||
- | * Complex option values must be specified using valid JSON, wrapped with single quotes '' | + | * Complex option values must be specified using valid JSON, wrapped with single quotes '' |
+ | * Datatables won't work in complex tables, where cells are merged together (e.g. with ":::" | ||
==== Extra Options ==== | ==== Extra Options ==== | ||
Line 98: | Line 102: | ||
The plugin also implements extra features beyond the options from DataTables jQuery library. | The plugin also implements extra features beyond the options from DataTables jQuery library. | ||
- | ^ Option | + | ^ Option |
- | | '' | + | | '' |
===== Extensions ===== | ===== Extensions ===== | ||
- | ==== Fixed Header ==== | + | ^ ^ Attribute ^ Example |
- | + | ^ Fixed Header | |
- | ^ Attribute ^ Default Value ^ Description | + | ^ Fixed Columns |
- | | '' | + | ^ Responsive |
- | | '' | + | ^ Buttons |
===== Configuration and Settings ===== | ===== Configuration and Settings ===== | ||
- | ^ Configuration Option ^ Default Value ^ Description ^ | + | ^ Configuration Option |
- | | '' | + | | '' |
- | | '' | + | | '' |
- | | '' | + | | '' |
===== Demo ===== | ===== Demo ===== | ||
Line 122: | Line 126: | ||
===== Development ===== | ===== Development ===== | ||
- | [[https:// | + | [[https:// |
=== Change Log === | === Change Log === | ||
- | {{rss> | + | {{rss> |
=== Bugs / Feature Requests === | === Bugs / Feature Requests === | ||
- | Please report bugs or feature requests at the [[http:// | + | Please report bugs or feature requests at the [[https:// |
=== ToDo/Wish List === | === ToDo/Wish List === | ||
===== FAQ ===== | ===== FAQ ===== | ||
+ | |||
+ | * I cannot get the buttons (csv, | ||
+ | * How to use with the [[CSV]] plugin: read the [[https:// | ||
+ | * I would like sorting a column by date. dd/mm/yyyy doesn' | ||
+ | * Information is sorted as text by default in Datatables. According to this [[https:// | ||
+ | * It seems the tables default to a background color of white. Is there a way to change that? I tried modifying some values in the plugin css files but they are difficult to read and the changes seemed to have no effect. | ||
+ | * It would be nice if it was possible to state which column the sort should be applied to (as a default) | ||
===== Discussion ===== | ===== Discussion ===== | ||
+ | |||
+ | This plugin looks like the answer to my dreams!:-) | ||
+ | |||
+ | Can it use any of the jQuery DataTables data sources? | ||
+ | rather than having to fill the data in the DokuWiki source page? In particular I would like to use the ajax | ||
+ | server side processing to run some PHP to read a database to provide the data. | ||
+ | |||
+ | Also, are the table editing functions of DataTables available? | ||
+ | |||
+ | ==== Suggestion: autolink ==== | ||
+ | This is quite a very nice & practical plugin, that you may use in conjunction with [[plugin: | ||
+ | |||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | Only a little suggestion if you use it with sql plugin: wouldn' | ||
+ | |||
+ | < | ||
+ | https:// | ||
+ | <a href=" | ||
+ | </ | ||
+ | |||
+ | but maybe the problem is on sql plugin... | ||
+ | |||
+ | === Possible answer: SQL links === | ||
+ | |||
+ | One possible answer to the above is to modify the SQL query so it outputs a link. | ||
+ | |||
+ | * To make a URL clickable (where the thing returned from sql is already a URL, in field "'' | ||
+ | |||
+ | < | ||
+ | <sql> | ||
+ | SELECT | ||
+ | | ||
+ | ... | ||
+ | FROM | ||
+ | table | ||
+ | ... | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | To make "'' | ||
+ | |||
+ | * To put the id at the end of the link, e.g.: '' | ||
+ | |||
+ | < | ||
+ | <sql> | ||
+ | SELECT | ||
+ | | ||
+ | ... | ||
+ | FROM | ||
+ | table | ||
+ | ... | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | * To insert the field '' | ||
+ | |||
+ | < | ||
+ | <sql> | ||
+ | SELECT | ||
+ | CONCAT('< | ||
+ | ... | ||
+ | FROM | ||
+ | table | ||
+ | ... | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | And other variations on this, for example if you needed multiple fields to build the URL, that's possible too with '' | ||
+ | |||
+ | Obviously this hack is only useful if you're using datatables with the sql plugin. It also means you can't do "'' | ||
+ | |||
+ | I agree that auto-hyperlinks for URLs would be a neat feature. As an aside, the data in the PDF/ | ||
+ | |||
+ | |||
+ | * Any information for Igor support? | ||
+ |
plugin/datatables.1443615509.txt.gz · Last modified: 2015-09-30 14:18 by lotar