colas@0
|
1 |
%META:TOPICINFO{author="TWikiContributor" date="1191730164" format="1.1" version="1"}%
|
colas@0
|
2 |
%META:TOPICPARENT{name="TWikiVariables"}%
|
colas@0
|
3 |
#VarTABLE
|
colas@0
|
4 |
---+++ TABLE{ _attributes_ } -- control attributes of tables and sorting of table columns
|
colas@0
|
5 |
* The =%<nop>TABLE{}%= variable is handled by the TablePlugin
|
colas@0
|
6 |
* Syntax: =%<nop>TABLE{ _attributes_ }%=
|
colas@0
|
7 |
%STARTSECTION{"table_attributes"}%
|
colas@0
|
8 |
* Supported attributes:
|
colas@0
|
9 |
| *Argument* | *Comment* | *Default value* | *Example* |
|
colas@0
|
10 |
| =sort= | Set table sorting by clicking headers ="on"= or ="off"=. | <span class="twikiGrayText">unspecified</span> | =sort="on"= |
|
colas@0
|
11 |
| =initsort= | Column to sort initially (="1"= to number of columns). | <span class="twikiGrayText">unspecified</span> | =initsort="2"= |
|
colas@0
|
12 |
| =initdirection= | Initial sorting direction for =initsort=, set to ="up"= (descending) or ="down"= (ascending). | <span class="twikiGrayText">unspecified</span> | =initdirection="up"= |
|
colas@0
|
13 |
| =disableallsort= | Disable all sorting, both initsort and header sort. This is mainly used by plugins such as the EditTablePlugin to disable sorting in a table while editing the table. | <span class="twikiGrayText">unspecified</span> | =disableallsort="on"= |
|
colas@0
|
14 |
| =headerbg= | Header cell background colour. | ="#6b7f93"= | =headerbg="#999999"= |
|
colas@0
|
15 |
| =headerbgsorted= | Header cell background colour of a sorted column. | the value of =headerbg= | =headerbgsorted="#32596c"= |
|
colas@0
|
16 |
| =headercolor= | Header cell text colour. | ="#ffffff"= | =headercolor="#0000cc"= |
|
colas@0
|
17 |
| =databg= | Data cell background colour, a comma separated list. Specify ="none"= for no colour, that is to use the colour/background of the page the table is on. | ="#edf4f9,#ffffff"= | =databg="#f2f2f2,#ffffff"= |
|
colas@0
|
18 |
| =databgsorted= | Data cell background colour of a sorted column; see =databg=. | the values of =databg= | =databgsorted="#d4e8e4,#e5f5ea"= |
|
colas@0
|
19 |
| =datacolor= | Data cell text colour, a comma separated list. | <span class="twikiGrayText">unspecified</span> | =datacolor="#0000CC, #000000"= |
|
colas@0
|
20 |
| =tableborder= | Table border width (pixels). | ="1"= | =tableborder="2"= |
|
colas@0
|
21 |
| =tableframe= | Table frame, set to ="void"= (no sides), ="above"= (the top side only), ="below"= (the bottom side only), ="hsides"= (the top and bottom sides only), ="lhs"= (the left-hand side only), ="rhs"= (the right-hand side only), ="vsides"= (the right and left sides only), ="box"= (all four sides), ="border"= (all four sides). | <span class="twikiGrayText">unspecified</span> | =tableframe="hsides"= |
|
colas@0
|
22 |
| =tablerules= | Table rules, set to ="none"= (no rules), ="groups"= (rules will appear between row groups and column groups only), ="rows"= (rules will appear between rows only), ="cols"= (rules will appear between columns only), ="all"= (rules will appear between all rows and columns). | <span class="twikiGrayText">unspecified</span> | =tablerules="rows"= |
|
colas@0
|
23 |
| =cellpadding= | Cell padding (pixels). | ="0"= | =cellpadding="0"= |
|
colas@0
|
24 |
| =cellspacing= | Cell spacing (pixels). | ="0"= | =cellspacing="3"= |
|
colas@0
|
25 |
| =cellborder= | Cell border width (pixels). | <span class="twikiGrayText">unspecified</span> | =cellborder="0"= |
|
colas@0
|
26 |
| =valign= | Vertical alignment of cells and headers, set to ="top"=, ="middle"=, ="bottom"= or ="baseline"=. | <span class="twikiGrayText">unspecified</span> | =valign="top"= |
|
colas@0
|
27 |
| =headervalign= | Vertical alignment of header cells; overrides =valign=. | <span class="twikiGrayText">unspecified</span> | =headervalign="top"= |
|
colas@0
|
28 |
| =datavalign= | Vertical alignment of data cells; overrides =valign=. | <span class="twikiGrayText">unspecified</span> | =datavalign="top"= |
|
colas@0
|
29 |
| =headeralign= | Header cell alignment, one value for all columns, or a comma separated list for different alignment of individual columns. Set to ="left"=, ="center"=, ="right"= or ="justify"=. Overrides individual cell settings. | <span class="twikiGrayText">unspecified</span> | =headeralign="left,right"= |
|
colas@0
|
30 |
| =dataalign= | Data cell alignment, one value for all columns, or a comma separated list for different alignment of individual columns. Set to ="left"=, ="center"=, ="right"= or ="justify"=. Overrides individual cell settings. | <span class="twikiGrayText">unspecified</span> | =dataalign="center"= |
|
colas@0
|
31 |
| =tablewidth= | Table width: Percentage of window width, or absolute pixel value. | <span class="twikiGrayText">unspecified</span> | =tablewidth="100%"= |
|
colas@0
|
32 |
| =columnwidths= | Column widths: Comma delimited list of column widths, percentage or absolute pixel value. | <span class="twikiGrayText">unspecified</span> | =columnwidths="80%,20%"= |
|
colas@0
|
33 |
| =headerrows= | Number of header rows to exclude from sort. (will be rendered in a HTML =thead= section) | ="1"= | =headerrows="1"= |
|
colas@0
|
34 |
| =footerrows= | Number of footer rows to exclude from sort. (will be rendered in a HTML =tfoot= section) | ="0"= | =footerrows="1"= |
|
colas@0
|
35 |
| =id= | Unique table identifier string, used for targeting a table with CSS. | =tableN= (where N is the table order number on the page) | =id="userTable"= |
|
colas@0
|
36 |
| =summary= | Table summary used by screenreaders: A summary of what the table presents. It should provide an orientation for someone who listens to the table. | <span class="twikiGrayText">unspecified</span> | =summary="List of subscribed users"= |
|
colas@0
|
37 |
| =caption= | Table caption: A title that will be displayed just above the table.| <span class="twikiGrayText">unspecified</span> | =caption="Users"= |
|
colas@0
|
38 |
%ENDSECTION{"table_attributes"}%
|
colas@0
|
39 |
* Example:%BR%
|
colas@0
|
40 |
=%<nop>TABLE{ tableborder="0" cellpadding="4" cellspacing="3" cellborder="0" }%= %BR%
|
colas@0
|
41 |
=| <nop>*A1*<nop> | <nop>*B1*<nop> |= %BR%
|
colas@0
|
42 |
=| A2 | B2 |=
|
colas@0
|
43 |
* Related: See TablePlugin for more details
|