Namespace BTM.Table
Record List Helper Functions and Classes
Defined in: table.js.
| Constructor Attributes | Constructor Name and Description |
|---|---|
| Method Attributes | Method Name and Description |
|---|---|
| <static> |
BTM.Table.arrayToRows(element, array)
Add new rows to an HTML table from a multi-dimensional Array of data
|
| <static> |
BTM.Table.initClickToSelectRow(element, index, selector)
Setup a handler to select a checkbox or radio button when a table row is clicked
|
| <static> |
BTM.Table.makeDynamic(element)
Convenience Function to create a Dynamic Table
|
| <static> |
BTM.Table.zebraStripes(element, )
Add "zebra stripes" to a table, tbody or table row.
|
Method Detail
<static>
BTM.Table.arrayToRows(element, array)
Add new rows to an HTML table from a multi-dimensional Array of data
- Parameters:
- {HTMLElement|String} element
- element ID or element reference to the table or tbody to update. If a table is referenced, the first tbody will be updated
- {Array[]} array
- the multi-dimensional Array of data to add to the table
<static>
BTM.Table.initClickToSelectRow(element, index, selector)
Setup a handler to select a checkbox or radio button when a table row is clicked
- Parameters:
- {HTMLElement|String} element
- element ID or element reference to the table row
- {Number} index Optional, Default: 0
- the index of the element to use in the array containing checkboxes & radio buttons for each row, (starting at 0)
- {String} selector Optional, Default: input[type=checkbox], input[type=radio]
- the CSS selector to find checkboxes & radio buttons in the row
<static>
{BTM.Table.Dynamic}
BTM.Table.makeDynamic(element)
Convenience Function to create a Dynamic Table
- Parameters:
- {HTMLElement|String} element
- element ID or element reference to existing HTML table
- Returns:
- {BTM.Table.Dynamic} new Dynamic Table object
- See:
- BTM.Table.Dynamic
<static>
{HTMLElement}
BTM.Table.zebraStripes(element, )
Add "zebra stripes" to a table, tbody or table row.
- Parameters:
- {HTMLElement|String} element
- element ID or element reference to the table, tbody or table row to apply "zebra stripes" to
- {String} Optional
- [classes=['odd','even']] the class names to apply to the rows, in order
- Returns:
- {HTMLElement} the original element