Class: HTMLColumn

FooTable. HTMLColumn

new HTMLColumn(instance, definition) → {FooTable.HTMLColumn}

The HTML column class is used to handle any raw HTML columns.
Parameters:
Name Type Description
instance FooTable.Table The parent FooTable.Table this column belongs to.
definition object An object containing all the properties to set for the column.
Returns:
Type
FooTable.HTMLColumn

Extends

Members

<readonly> $el :jQuery

The jQuery cell object for the column header.
Type:
Inherited From:

classes :Array.<string>

The classes to apply to all cells in this column.
Type:
  • Array.<string>
Inherited From:

<readonly> ft :FooTable.Table

The root FooTable.Table for the column.
Type:
Inherited From:

hidden :boolean

Whether or not this column is hidden from view and appears in the details row.
Type:
  • boolean
Inherited From:
Default Value:
  • false

<readonly> index :number

The index of the column in the table. This is set by the plugin during initialization.
Type:
  • number
Inherited From:
Default Value:
  • -1

<readonly> internal :boolean

Internal columns or there cells will not be returned when calling methods such as `FooTable.Row#val`.
Type:
  • boolean
Inherited From:

name :string

The name of the column. This name must correspond to the property name of the JSON row data.
Type:
  • string
Inherited From:
Default Value:
  • null

style :object

The styles to apply to all cells in this column.
Type:
  • object
Inherited From:

title :string

The title to display in the column header, this can be HTML.
Type:
  • string
Inherited From:
Default Value:
  • null

<readonly> type :string

The type of data displayed by the column.
Type:
  • string
Inherited From:

<readonly> virtual :boolean

Whether or not the column was parsed from a standard table row containing data instead of from an actual header row.
Type:
  • boolean
Inherited From:

visible :boolean

Whether or not this column is completely hidden from view and will not appear in the details row.
Type:
  • boolean
Inherited From:
Default Value:
  • true

Methods

<protected> $create()

After the column has been defined this ensures that the $el property is a jQuery object by either creating or updating the current value.
This:
Inherited From:

<protected> createCell(row) → {FooTable.Cell}

Creates a cell for this column from the supplied FooTable.Row object. This allows different column types to return different types of cells.
This:
Parameters:
Name Type Description
row FooTable.Row The row to create the cell from.
Inherited From:
Returns:
Type
FooTable.Cell

<protected> define(definition)

This is supplied the column definition in the form of a simple object created by merging options supplied via the plugin constructor with those parsed from the DOM.
This:
Parameters:
Name Type Description
definition object The object containing the column definition.
Inherited From:

<protected> formatter(value, options, rowData) → {string|HTMLElement|jQuery}

This is supplied the value retrieved from the FooTable.Column#parse function and must return a string, HTMLElement or jQuery object. The return value from this function is what is displayed in the cell in the table.
This:
Parameters:
Name Type Description
value string The value to format.
options object The current plugin options.
rowData object An object containing the current row data.
Inherited From:
Returns:
Type
string | HTMLElement | jQuery

<protected> parser(valueOrElement) → {jQuery|null}

This is supplied either the cell value or jQuery object to parse. Any value can be returned from this method and will be provided to the FooTable.HTMLColumn#format function to generate the cell contents.
This:
Parameters:
Name Type Description
valueOrElement * | jQuery The value or jQuery cell object.
Returns:
Type
jQuery | null

stringify() → {string}

Return the supplied value as a string.

Inherited From:
Returns:
Type
string
Copyright © 2016
Documentation generated by JSDoc 3.4.1 on 2017-07-06T21:37:42+02:00