1 # <a name="Table Plugin"></a> Table Plugin
3 Gives extra control off table display:
6 - Changing background color for header cells
7 - Changing background color for data cells - colors 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 - Table border width. Default: 1
16 - Table cell padding. Default: 0
18 - Table cell spacing. Default: 1
20 - Color for header cells ('\*'s around text). Default: <span>\#99CCCC</span>
21 - #Set HEADER\_BG = red
22 - Background color for table rows, two alternate colors. Default: <span>\#FFFFCC</span>,<span>\#FFFFFF</span>
23 - Set DATA\_BG = #FFFFCC,#FFFFFF
25 - #Set SORT = attachments
29 - Set SHORTDESCRIPTION = Control attributes of tables and sorting of table columns
31 ## <a name="Sorting"></a> Sorting
33 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:
37 - dd-MMM-YY or dd-MM-YYYY (can be / or space in place of -)
38 - MMM is Jan, Feb, etc
39 - number is digits, with optional decimal point
40 - otherwise treated as text
42 ## <a name="Per table settings"></a> Per table settings
44 On line before the table use `%TABLE{...}%`:
46 <table border="1" cellpadding="0" cellspacing="0" style="border-width: 1px">
48 <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>
49 <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>
50 <th bgcolor="#6b7f93" maxcols="0" style=""><a href="http://localhost?sortcol=2;table=1;up=0#sorted_table" rel="nofollow" title="Sort by this column"><font color="#ffffff">Example</font></a></th>
53 <td bgcolor="#ecf2f8" style=""><code>sort</code></td>
54 <td bgcolor="#ecf2f8" style=""> Set <code>on</code> or <code>off</code></td>
55 <td bgcolor="#ecf2f8" style=""><code>sort="on"</code></td>
58 <td bgcolor="#ffffff" style=""><code>headerbg</code></td>
59 <td bgcolor="#ffffff" style=""> Header cell background colour </td>
60 <td bgcolor="#ffffff" style=""><code>headerbg="#99CCCC"</code></td>
63 <td bgcolor="#ecf2f8" style=""><code>databg</code></td>
64 <td bgcolor="#ecf2f8" style=""> Data cell background colour, a comma seperated list </td>
65 <td bgcolor="#ecf2f8" style=""><code>databg="#C8CB8F,#DBDDB5"</code></td>
68 <td bgcolor="#ffffff" style=""><code>tableborder</code></td>
69 <td bgcolor="#ffffff" style=""> Table border width (pixels) </td>
70 <td bgcolor="#ffffff" style=""><code>tableborder="2"</code></td>
73 <td bgcolor="#ecf2f8" style=""><code>cellpadding</code></td>
74 <td bgcolor="#ecf2f8" style=""> Cell padding (pixels) </td>
75 <td bgcolor="#ecf2f8" style=""><code>cellpadding="0"</code></td>
78 <td bgcolor="#ffffff" style=""><code>cellspacing</code></td>
79 <td bgcolor="#ffffff" style=""> Cell spacing (pixels) </td>
80 <td bgcolor="#ffffff" style=""><code>cellspacing="3"</code></td>
84 All default to the global setting
86 ## <a name="Examples"></a> Examples
88 Line before table: `%TABLE{sort="on" tableborder="0" cellpadding="2" cellspacing="1" headerbg="#99CCCC" databg="#C8CB8F,#DBDDB5"}%`
90 <table border="0" cellpadding="3" cellspacing="0" style="border-width: 0px">
92 <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>
93 <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>
94 <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>
95 <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>
96 <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>
97 <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>
100 <td bgcolor="#C8CB8F" style=""> 1 </td>
101 <td bgcolor="#C8CB8F" style=""> C </td>
102 <td bgcolor="#C8CB8F" style=""> Chose new colours </td>
103 <td bgcolor="#C8CB8F" style=""> John </td>
104 <td bgcolor="#C8CB8F" style=""> 1-Dec-02 </td>
105 <td bgcolor="#C8CB8F" style=""> </td>
108 <td bgcolor="#DBDDB5" style=""> 2 </td>
109 <td bgcolor="#DBDDB5" style=""> X </td>
110 <td bgcolor="#DBDDB5" style=""> Release </td>
111 <td bgcolor="#DBDDB5" style=""> John </td>
112 <td bgcolor="#DBDDB5" style=""> 1-Apr-02 </td>
113 <td bgcolor="#DBDDB5" style=""> </td>
116 <td bgcolor="#C8CB8F" style=""> 3 </td>
117 <td bgcolor="#C8CB8F" style=""> </td>
118 <td bgcolor="#C8CB8F" style=""> Get feedback </td>
119 <td bgcolor="#C8CB8F" style=""> Anne </td>
120 <td bgcolor="#C8CB8F" style=""> 1-Feb-02 </td>
121 <td bgcolor="#C8CB8F" style=""> </td>
124 <td bgcolor="#DBDDB5" style=""> 12 </td>
125 <td bgcolor="#DBDDB5" style=""> C </td>
126 <td bgcolor="#DBDDB5" style=""> Spec error handling </td>
127 <td bgcolor="#DBDDB5" style=""> Jack </td>
128 <td bgcolor="#DBDDB5" style=""> 1-Dec-02 </td>
129 <td bgcolor="#DBDDB5" style=""> </td>
132 <td bgcolor="#C8CB8F" style=""> 5 </td>
133 <td bgcolor="#C8CB8F" style=""> </td>
134 <td bgcolor="#C8CB8F" style=""> Abc </td>
135 <td bgcolor="#C8CB8F" style=""> John </td>
136 <td bgcolor="#C8CB8F" style=""> </td>
137 <td bgcolor="#C8CB8F" style=""> </td>
141 -- [[JohnTalintyre]] - 07 Oct 2001 <br /> -- [[PeterThoeny]] - 15 Nov 2001 <br />