1 # <a name="Table Plugin"></a> Table Plugin
3 Gives extra control off table display:
6 - Changing background colour for header cells
7 - Changing background colour for data cells - colours can _alternate_
8 - Behaviour can be specified for a specific table using %TABLE\{...\}% or with global preferences
10 ## <a name="Global Preferences"></a> Global Preferences
12 - Set DEBUG to on to get debug messages in `data/debug.txt`. Default: `off`
14 - Colour for header cells ('\*'s around text). Default: <font>\#99CCCC</font>
15 - #Set HEADER\_BG = red
16 - #Set DATA\_BG = #C8CB8F,#DBDDB5
17 - Set DATA\_BG = #FFFFCC,#FFFFFF
18 - #Set SORT = attachments
22 - Set SHORTDESCRIPTION = Control sorting and colours for table display
24 ## <a name="Sorting"></a> Sorting
26 Click on column heading text to sort by a column. Initial column will be sorted in descending order, click again to get ascending order. The type of data in the cell is determined automatically:
30 - dd-MMM-YY or dd-MM-YYYY (can be / or space in place of -)
31 - MMM is Jan, Feb, etc
32 - number is digits, with optional decimal point
33 - otherwise treated as text
35 ## <a name="Per table settings"></a> Per table settings
37 On line before the table use %TABLE\{...\}%:
39 <table border="1" cellpadding="0" cellspacing="0" style="border-width: 1px">
41 <th bgcolor="#6b7f93" maxcols="0" style=""><a href="http://localhost?sortcol=0;table=1;up=0#sorted_table" rel="nofollow" title="Sort by this column"><font color="#ffffff">Argument</font></a></th>
42 <th bgcolor="#6b7f93" maxcols="0" style=""><a href="http://localhost?sortcol=1;table=1;up=0#sorted_table" rel="nofollow" title="Sort by this column"><font color="#ffffff">Comment</font></a></th>
45 <td bgcolor="#ecf2f8" style=""><code>sort</code></td>
46 <td bgcolor="#ecf2f8" style=""><code>on</code> or <code>off</code></td>
49 <td bgcolor="#ffffff" style=""><code>headerbg</code></td>
50 <td bgcolor="#ffffff" style=""> header cell background colour </td>
53 <td bgcolor="#ecf2f8" style=""><code>databg</code></td>
54 <td bgcolor="#ecf2f8" style=""> data cell background colour, a comma seperated list </td>
58 All default to the global setting
60 ## <a name="Examples"></a> Examples
62 Line before table: %TABLE\{sort="on" headerbg="#99CCCC" databg="#C8CB8F,#DBDDB5"\}%
64 <table border="1" cellpadding="0" cellspacing="0" style="border-width: 1px">
66 <th bgcolor="#99CCCC" maxcols="0" style=""><a href="http://localhost?sortcol=0;table=2;up=0#sorted_table" rel="nofollow" title="Sort by this column"><font color="#ffffff">Num</font></a></th>
67 <th bgcolor="#99CCCC" maxcols="0" style=""><a href="http://localhost?sortcol=1;table=2;up=0#sorted_table" rel="nofollow" title="Sort by this column"><font color="#ffffff">Status</font></a></th>
68 <th bgcolor="#99CCCC" maxcols="0" style=""><a href="http://localhost?sortcol=2;table=2;up=0#sorted_table" rel="nofollow" title="Sort by this column"><font color="#ffffff">Action</font></a></th>
69 <th bgcolor="#99CCCC" maxcols="0" style=""><a href="http://localhost?sortcol=3;table=2;up=0#sorted_table" rel="nofollow" title="Sort by this column"><font color="#ffffff">Who</font></a></th>
70 <th bgcolor="#99CCCC" maxcols="0" style=""><a href="http://localhost?sortcol=4;table=2;up=0#sorted_table" rel="nofollow" title="Sort by this column"><font color="#ffffff">When</font></a></th>
71 <th bgcolor="#99CCCC" maxcols="0" style=""><a href="http://localhost?sortcol=5;table=2;up=0#sorted_table" rel="nofollow" title="Sort by this column"><font color="#ffffff">Progress</font></a></th>
74 <td bgcolor="#C8CB8F" style=""> 1 </td>
75 <td bgcolor="#C8CB8F" style=""> C </td>
76 <td bgcolor="#C8CB8F" style=""> Chose new colours </td>
77 <td bgcolor="#C8CB8F" style=""> John </td>
78 <td bgcolor="#C8CB8F" style=""> 1-Dec-02 </td>
79 <td bgcolor="#C8CB8F" style=""> </td>
82 <td bgcolor="#DBDDB5" style=""> 2 </td>
83 <td bgcolor="#DBDDB5" style=""> X </td>
84 <td bgcolor="#DBDDB5" style=""> Release </td>
85 <td bgcolor="#DBDDB5" style=""> John </td>
86 <td bgcolor="#DBDDB5" style=""> 1-Apr-02 </td>
87 <td bgcolor="#DBDDB5" style=""> </td>
90 <td bgcolor="#C8CB8F" style=""> 3 </td>
91 <td bgcolor="#C8CB8F" style=""> </td>
92 <td bgcolor="#C8CB8F" style=""> Get feedback </td>
93 <td bgcolor="#C8CB8F" style=""> Anne </td>
94 <td bgcolor="#C8CB8F" style=""> 1-Feb-02 </td>
95 <td bgcolor="#C8CB8F" style=""> </td>
98 <td bgcolor="#DBDDB5" style=""> 12 </td>
99 <td bgcolor="#DBDDB5" style=""> C </td>
100 <td bgcolor="#DBDDB5" style=""> Spec error handling </td>
101 <td bgcolor="#DBDDB5" style=""> Jack </td>
102 <td bgcolor="#DBDDB5" style=""> 1-Dec-02 </td>
103 <td bgcolor="#DBDDB5" style=""> </td>
106 <td bgcolor="#C8CB8F" style=""> 5 </td>
107 <td bgcolor="#C8CB8F" style=""> </td>
108 <td bgcolor="#C8CB8F" style=""> Abc </td>
109 <td bgcolor="#C8CB8F" style=""> John </td>
110 <td bgcolor="#C8CB8F" style=""> </td>
111 <td bgcolor="#C8CB8F" style=""> </td>
115 -- [[JohnTalintyre]] - 07 Oct 2001 <br />