Table Configuration
Options
- limit number of rows: defines a maximum number of rows
- fix number of rows: defines an initial number of rows
- can be modified: whether the user can change the number of rows
- show line numbers: whether to show a first column with a line number
- tab on read only cells: whether the tab stops at read only cells
Definition of columns
For each table the columns must be defined. Other options control the behavior of the overall table
- columns: column[], // an array of column definitions (see below)
name: the name of the column shown in the table header
field: the id in the column / of the data
editor: default: readonly, can be text, uprules, downrules, date, select (needs an array with options), versionletter, user, textline, design, ...
options: (for select) array with id, name pairs, for rules: singleSelect:true, showTitle:true
Cell Editors
cell editors define how data can be entered and how it is displayed afterwards. The following editors exist
Editor | Description | Options |
---|---|---|
text | allows to enter rich text | |
textline | allows to enter a simple line of text (without formatting) | |
date | allows to select a date | |
date_today | allows to select a date. Initialized with today's date for new rows | |
today | read-only field with date of creation of row | |
select | allows to select a value from a dropdown | define the options the user can select { "id1":"option 1", "id2":"option 2", ....} "options":{ "setting":"dropdown_config" } |
user | allows to select a user | |
user_self | allows to select a user. Initialized with the user who created the row | |
self | read-only field with user who created the row | |
category (from 1.11 replaces rules:CAT1,...) | allows to select a category from the list of supplied categoires | "categories":["CAT1","CAT2"] "singleSelect": true, // if only one item can be selected |
uprules | allows to select items from the categories which are defined as up rules | "singleSelect": true, // if only one item can be selected "autolink":true // create up and down references if item are selected in table |
downrules | allows to select items from the categories which are defined as down rules | |
design | allows to select any item of any category marked as design | |
commentlog | The "comment log" editor allows each user to add comments with a time stamp and user id, sorted chronologically. | The option "append":true sorts them in the inverse order. |
version | The "version" column can be used to automatically fill the current version of an item in the table | |
none | for readonly columns |