Namespace: tableEditor

db.libs.tableEditor

Methods

(private, static) bindEvents(event)

Binds events

Parameters:
Name Type Description
event event Event passed from focus or blur
Source:

(static) deleteColumn(id, iopt) → {jQuery}

Deletes a column

Parameters:
Name Type Attributes Description
id jQuery | string The table to be referenced
i number <optional>
Index for the column to delete. If not set, the last column is selected
Source:
Returns:
the table
Type
jQuery

(static) deleteHeader(id) → {jQuery}

Removed the header/thead from the table

Parameters:
Name Type Description
id jQuery | string The table to be referenced
Source:
Returns:
the table
Type
jQuery

(static) deleteRow(id, iopt) → {jQuery}

Delete a row

Parameters:
Name Type Attributes Description
id jQuery | string The table to be referenced
i number <optional>
Index for the row to delete. If not set, last focus is used, if that is not possible the last row is selected
Source:
Returns:
the table
Type
jQuery

(static) getJSON(id) → {json}

Return table data as JSON

Parameters:
Name Type Description
id jQuery | string The table to be referenced
Source:
Returns:
Table data formated as json
Type
json

(static) init() → {jQuery}

Init Table editor

Source:
Returns:
all table editors
Type
jQuery

(static) insertColumn(id, iopt) → {jQuery}

Inserts a new column

Parameters:
Name Type Attributes Description
id jQuery | string The table to be referenced
i number <optional>
Where to insert the column, if not set, after last focused is used, if that's not possible, inserted at the end
Source:
Returns:
the table
Type
jQuery

(static) insertHeader(id) → {jQuery}

Inserts a header/thead at the top of the table

Parameters:
Name Type Description
id jQuery | string The table to be referenced
Source:
Returns:
the table
Type
jQuery

(static) insertRow(id, iopt) → {jQuery}

Insert a new row

Parameters:
Name Type Attributes Description
id jQuery | string The table to be referenced
i number <optional>
Where to insert the row, if not set, after last focused is used, if that's not possible, inserted at the end
Source:
Returns:
the table
Type
jQuery

(private, static) nextCell(eventopt)

Set focus to the next cell, if there is no "next cell", one is created

Parameters:
Name Type Attributes Description
event event <optional>
event passed from keypress
Source:

(private, static) nextRow(eventopt)

Set focus to the first cell in the next row. If there is no "next row", one is created

Parameters:
Name Type Attributes Description
event event <optional>
event passed from keypress
Source:

(static) toggleColumnClass(id, iopt, addClassnames, removeClassnames) → {jQuery}

Toggles classnames for column

Parameters:
Name Type Attributes Description
id jQuery | string The table to be referenced
i number <optional>
Index for the column to alter, if null, last focused is used, if that's not possible, the last column in the table is used
addClassnames string Classes to toggle
removeClassnames string Classes to remove
Source:
Returns:
the table
Type
jQuery

(static) toggleHeader(id) → {jQuery}

Toggles the table header/thead

Parameters:
Name Type Description
id jQuery | string The table to be referenced
Source:
Returns:
the table
Type
jQuery

(static) toggleRowClass(id, iopt, addClassnames, removeClassnames) → {jQuery}

Toggle classnames for row

Parameters:
Name Type Attributes Description
id jQuery | string The table to be referenced
i number <optional>
Index for the row to alter, if null, last focused is used, if that's not possible, the last row in the table is used
addClassnames string Classes to toggle
removeClassnames string Classes to remove
Source:
Returns:
the table
Type
jQuery

(private, static) unbindEvents(event)

Unbind events

Parameters:
Name Type Description
event event Event passed from focus or blur
Source: