Generated by JsDoc Toolkit 2.4.0 on Sat Sep 10 2011 10:47:46 GMT+0100 (BST)
HTML template: Codeview

# Class ColReorder

ColReorder
Defined in: ColReorder.js.

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

Field Summary
Field Attributes | Field Name and Description
--- | ---
<static> | ColReorder.aoInstances Array of all ColReorder instances for later reference
<constant> | CLASS Name of this class
<static> <constant> | ColReorder.VERSION ColReorder version

Method Summary
Method Attributes | Method Name and Description
--- | ---
<private> | _fnConstruct() Constructor logic
<private> | _fnCreateDragNode() Copy the TH element that is being drags so the user has the idea that they are actually moving it around the page.
<private> | _fnMouseDown(event, element) Mouse down on a TH element in the table header
<private> | _fnMouseListener(int, element) Add a mouse down listener to a particluar TH element
<private> | _fnMouseMove(event) Deal with a mouse move event while dragging a node
<private> | _fnMouseUp(event) Finish off the mouse drag and insert the column where needed
<private> | _fnOrderColumns(array) Set the column order from an array
<private> | _fnStateSave(string) This function effectively replaces the state saving function in DataTables (this is needed because otherwise DataTables would state save the columns in their reordered state, not the original which is needed on first draw).
<static> | ColReorder.fnReset(object) Reset the column ordering for a DataTables instance
| fnReset()

Class Detail
ColReorder(DataTables, ColReorder)
ColReorder provides column visiblity control for DataTables

Parameters:
{object} DataTables
  object
{object} ColReorder
  options

Field Detail
<static> {array} ColReorder.aoInstances
Array of all ColReorder instances for later reference

Default Value:
  []

<constant> {String} CLASS
Name of this class

Default Value:
  ColReorder

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

Default Value:
  As code

Method Detail
<private> _fnConstruct()
Constructor logic

Returns:
  void

<private> _fnCreateDragNode()
Copy the TH element that is being drags so the user has the idea that they are actually moving it around the page.

Returns:
  void

<private> _fnMouseDown(event, element)
Mouse down on a TH element in the table header

Parameters:
event
  e Mouse event
element
  nTh TH element to be dragged

Returns:
  void

<private> _fnMouseListener(int, element)
Add a mouse down listener to a particluar TH element

Parameters:
int
  i Column index
element
  nTh TH element clicked on

Returns:
  void

<private> _fnMouseMove(event)
Deal with a mouse move event while dragging a node

Parameters:
event
  e Mouse event

Returns:
  void

<private> _fnMouseUp(event)
Finish off the mouse drag and insert the column where needed

Parameters:
event
  e Mouse event

Returns:
  void

<private> _fnOrderColumns(array)
Set the column order from an array

Parameters:
array
  a An array of integers which dictate the column order that should be applied

Returns:
  void

<private> _fnStateSave(string)
This function effectively replaces the state saving function in DataTables (this is needed because otherwise DataTables would state save the columns in their reordered state, not the original which is needed on first draw). This is sensitive to any changes in the DataTables state saving method!

Parameters:
string
  sCurrentVal

Returns:
  string JSON encoded cookie string for DataTables

<static> ColReorder.fnReset(object)
Reset the column ordering for a DataTables instance

Parameters:
object
  oTable DataTables instance to consider

Returns:
  void

fnReset()