Generated by JsDoc Toolkit 2.4.0 on Sat Feb 26 2011 14:41:27 GMT-0000 (GMT)
HTML template: Codeview

Class TableTools

TableTools
Defined in: TableTools.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
TableTools(oDT, oOpts)
TableTools provides flexible buttons and other tools for a DataTables enhanced table
Field Summary
Field Attributes Field Name and Description
<constant>  
Name of this class
<static> <constant>  
TableTools.VERSION
TableTools version
Method Summary
Method Attributes Method Name and Description
 
fnCalcColRatios(oConfig)
Calculate a unity array with the column width by proportion for a set of columns to be included for a button.
<static>  
TableTools.fnGetInstance(node)
Get the master instance for a table node (or id if a string is given)
<static>  
TableTools.fnGetMasters()
Get an array of all the master instances
 
Retreieve the settings object from an instance
 
fnGetTableData(oConfig)
Get the information contained in a table as a string
 
fnGetTitle(oConfig)
Get the title of the document - useful for file names.
 
Check to see if a current row is selected or not
 
Resize the flash elements of the buttons attached to this TableTools instance - this is useful for when initialising TableTools when it is hidden (display:none) since sizes can't be calculated at that time.
 
Check to see if any of the ZeroClipboard client's attached need to be resized
 
Select all rows in the table
 
Deselect all rows in the table
 
fnSetText(clip, text)
Pass text to a flash button instance, which will be used on the button's click handler
 
Retreieve the settings object from an instance
Class Detail
TableTools(oDT, oOpts)
TableTools provides flexible buttons and other tools for a DataTables enhanced table
Parameters:
{Object} oDT
DataTables instance
{Object} oOpts
TableTools options
{String} oOpts.sSwfPath
ZeroClipboard SWF path
{String} oOpts.sRowSelect
Row selection options - 'none', 'single' or 'multi'
{Function} oOpts.fnPreRowSelect
Callback function just prior to row selection
{Function} oOpts.fnRowSelected
Callback function just after row selection
{Function} oOpts.fnRowDeselected
Callback function when row is deselected
{Array} oOpts.aButtons
List of buttons to be used
Field Detail
<constant> {String} CLASS
Name of this class
Default Value:
TableTools
<static> <constant> {String} TableTools.VERSION
TableTools version
Default Value:
2.0.1
Method Detail
{Array} fnCalcColRatios(oConfig)
Calculate a unity array with the column width by proportion for a set of columns to be included for a button. This is particularly useful for PDF creation, where we can use the column widths calculated by the browser to size the columns in the PDF.
Parameters:
{Object} oConfig
Button configuration object
Returns:
{Array} Unity array of column ratios
<static> {Object} TableTools.fnGetInstance(node)
Get the master instance for a table node (or id if a string is given)
Parameters:
node
Returns:
{Object} ID of table OR table node, for which we want the TableTools instance
<static> {Array} TableTools.fnGetMasters()
Get an array of all the master instances
Returns:
{Array} List of master TableTools instances
{array} fnGetSelected()
Retreieve the settings object from an instance
Returns:
{array} List of TR nodes which are currently selected
{String} fnGetTableData(oConfig)
Get the information contained in a table as a string
Parameters:
{Object} oConfig
Button configuration object
Returns:
{String} Table data as a string
{String} fnGetTitle(oConfig)
Get the title of the document - useful for file names. The title is retrieved from either the configuration object's 'title' parameter, or the HTML document title
Parameters:
{Object} oConfig
Button configuration object
Returns:
{String} Button title
{Boolean} fnIsSelected(n)
Check to see if a current row is selected or not
Parameters:
{Node} n
TR node to check if it is currently selected or not
Returns:
{Boolean} true if select, false otherwise
fnResizeButtons()
Resize the flash elements of the buttons attached to this TableTools instance - this is useful for when initialising TableTools when it is hidden (display:none) since sizes can't be calculated at that time.
Returns:
void
fnResizeRequired()
Check to see if any of the ZeroClipboard client's attached need to be resized
Returns:
void
fnSelectAll()
Select all rows in the table
Returns:
void
fnSelectNone()
Deselect all rows in the table
Returns:
void
fnSetText(clip, text)
Pass text to a flash button instance, which will be used on the button's click handler
Parameters:
{Object} clip
Flash button object
{String} text
Text to set
Returns:
void
{object} fnSettings()
Retreieve the settings object from an instance
Returns:
{object} TableTools settings object