| 94 | ---- |
| 95 | === sortedtable === |
| 96 | A WikiProcessor which sorts tables with JavaScript. |
| 97 | |
| 98 | Requires [http://www.kryogenix.org/code/browser/sorttable/sorttable.js sorttable.js] from http://www.kryogenix.org/code/browser/sorttable/ . |
| 99 | |
| 100 | Usage: |
| 101 | |
| 102 | 1. Fetch [http://www.kryogenix.org/code/browser/sorttable/sorttable.js sorttable.js] (see above) |
| 103 | 1. Put the script somewhere on your HTTP server and set the variable js_url in the [http://projects.edgewall.com/trac/attachment/wiki/ProcessorBazaar/sortedtable.py file] OR put the JavaScript file in the same directory as the Python file. |
| 104 | 1. Use WikiProcessor syntax like |
| 105 | {{{ |
| 106 | {{{ |
| 107 | #!sortedtable |
| 108 | || Strings || Numbers || |
| 109 | || abc || 2 || |
| 110 | || def || 10 || |
| 111 | || abd || 9 || |
| 112 | }}} |
| 113 | }}} |
| 114 | Use the usual table syntax for wiki pages. |
| 115 | 1. If the browser has JavaScript enabled, you will be able to sort the resulting table by clicking on the headings in the first row. |
| 116 | |
| 117 | [[BR]]''Download:'' http://projects.edgewall.com/trac/attachment/wiki/ProcessorBazaar/sortedtable.py |
| 118 | [[BR]]''By:'' Stefan Schwarzer (sschwarzer at sschwarzer.net) |
| 119 | [[BR]]''Version:'' >= 0.8 (tested with 0.8) |