Generated by JsDoc Toolkit 2.4.0 on Wed Mar 02 2011 19:10:29 GMT-0000 (GMT)
HTML template: Codeview

# Class ColVis

ColVis
Defined in: ColVis.js.

Class Summary
Constructor Attributes | Constructor Name and Description
--- | ---
| ColVis(DataTables, oInit) ColVis provides column visiblity control for DataTables

Field Summary
Field Attributes | Field Name and Description
--- | ---
<static> | ColVis.aInstances Collection of all ColVis instances
<constant> | CLASS Name of this class
<static> <constant> | ColVis.VERSION ColVis version

Method Summary
Method Attributes | Method Name and Description
--- | ---
<private> | _fnAddButtons() Loop through the columns in the table and as a new button for each one.
<private> | _fnApplyCustomisation() Apply any customisation to the settings from the DataTables initialisation
<private> | _fnCollectionHide() Hide the show / hide list and the background
<private> | _fnCollectionShow() Show the show / hide list and the background
<private> | _fnConstruct() Constructor logic
<private> | _fnDataTablesApiIndex() Get the position in the DataTables instance array of the table for this instance of ColVis
<private> | _fnDomBackground() Create the element used to shade the background, and capture hide events (it is shown and hidden as needed)
<private> | _fnDomBaseButton(text) Create the DOM needed for the button and apply some base properties.
<private> | _fnDomCatcher() An element to be placed on top of the activate button to catch events
<private> | _fnDomCollection() Create the element used to contain list the columns (it is shown and hidden as needed)
<private> | _fnDomColumnButton(i) Create the DOM for a show / hide button
<private> | _fnDomRestoreButton() Create a button which allows a "restore" action
<private> | _fnDrawCallback() On each table draw, check the visiblity checkboxes as needed.
<static> | ColVis.fnRebuild(object) Rebuild the collection for a given table, or all tables if no parameter given
| fnRebuild() Rebuild the list of buttons for this instance (i.e.

Class Detail
ColVis(DataTables, oInit)
ColVis provides column visiblity control for DataTables

Parameters:
{object} DataTables
  settings object
oInit

Field Detail
<static> {Array} ColVis.aInstances
Collection of all ColVis instances

Default Value:
  []

<constant> {String} CLASS
Name of this class

Default Value:
  ColVis

<static> <constant> {String} ColVis.VERSION
ColVis version

Default Value:
  1.0.4.dev

Method Detail
<private> _fnAddButtons()
Loop through the columns in the table and as a new button for each one.

Returns:
  void

<private> _fnApplyCustomisation()
Apply any customisation to the settings from the DataTables initialisation

Returns:
  void

<private> _fnCollectionHide()
Hide the show / hide list and the background

Returns:
  void

<private> _fnCollectionShow()
Show the show / hide list and the background

Returns:
  void

<private> _fnConstruct()
Constructor logic

Returns:
  void

<private> {int} _fnDataTablesApiIndex()
Get the position in the DataTables instance array of the table for this instance of ColVis

Returns:
  {int} Index

<private> {Node} _fnDomBackground()
Create the element used to shade the background, and capture hide events (it is shown and hidden as needed)

Returns:
  {Node} div container for the background

<private> {Node} _fnDomBaseButton(text)
Create the DOM needed for the button and apply some base properties. All buttons start here

Parameters:
{String} text
  Button text

Returns:
  {Node} DIV element for the button

<private> {Node} _fnDomCatcher()
An element to be placed on top of the activate button to catch events

Returns:
  {Node} div container for the collection

<private> {Node} _fnDomCollection()
Create the element used to contain list the columns (it is shown and hidden as needed)

Returns:
  {Node} div container for the collection

<private> {Node} _fnDomColumnButton(i)
Create the DOM for a show / hide button

Parameters:
{int} i
  Column in question

Returns:
  {Node} Created button

<private> {Node} _fnDomRestoreButton()
Create a button which allows a "restore" action

Returns:
  {Node} Created button

<private> _fnDrawCallback()
On each table draw, check the visiblity checkboxes as needed. This allows any process to update the table's column visiblity and ColVis will still be accurate.

Returns:
  void

<static> ColVis.fnRebuild(object)
Rebuild the collection for a given table, or all tables if no parameter given

Parameters:
object
  oTable DataTable instance to consider - optional

Returns:
  void

fnRebuild()
Rebuild the list of buttons for this instance (i.e. if there is a column header update)

Returns:
  void