Compatible with DokuWiki
Similar to sortablejs
Download and install the plugin using the Plugin Manager using the URL given above. Refer to Plugins on how to install plugins manually.
This script can be used the same way as the Sortablejs Plugin. It adds a small text field on top of your table and filters for the entered text. Esp. in combination with the CSV Plugin this small plugin is very useful.
Example:
<searchtable> ^ Test ^ Col1 ^ Col2 ^ | Row1 | Val1 | Val2 | | Row2 | Val3 | Val4 | </searchtable>
A little improvement to give the Input a class-name
In syntax.php:
$renderer->doc .= '<div class="searchtable' . $match . '" id="' . $id . '">';
$renderer->doc .= '<form class="searchtable" onsubmit="return false;"><input class="searchtable" name="filtertable" onkeyup="searchtable.filterall(this, \'' . $id . '\')" type="text"></form>';
A new File: print.css
div.dokuwiki form.searchtable { display: none; }
A new File: style.css
what you like, similar to the text search input
IE8 has a different opinion than other browsers as to how a javascript array should be ended, so it barfs on this script.js code snippet:
...
getTableByID: function(_id) {
var _table = document.getElementById(_id).getElementsByTagName('table')[0];
return _table;
},
...
Remove the trailing comma after the last array entry, and presto!
...
getTableByID: function(_id) {
var _table = document.getElementById(_id).getElementsByTagName('table')[0];
return _table;
}
...
— Strand Åge 2011/01/26 13:35