TableEditor

Flexible in place editing of TableSorter


PURPOSE

TableEditor provides flexible in place editing of HTML tables. User defined handler functions can easily be dropped in to, for example, update the data source via an AJAX request.

PREVIEW

ID First Name Last Name Phone City Email
233 (edit) Not a form element
1 (edit) Brice Burgess (800)768-5283 Milwaukee b@b.com
2 (edit) Christian Bach (800)768-6288 Chicago c@c.com
3 (edit) Abe Lincoln (800)223-2331 Washington D.C. l@l.com
8 (edit) Sam Lightning Hopkings (800)728-1221 Houston s@s.com
15 (edit) Rudyard Kipling (512)121-1280 London r@r.com

REQUIREMENTS

TableEditor is a jQuery plugin. It requires jQuery (1.0.3 recommended) and should be used in conjunction with Christian Bach's TableSorter plugin. Future versions will likely function independant of TableSorter.

FILES

README

Use documentation in the works. See Example(s), Program Flow, and source comments in tableEditor.js

EXAMPLES

PROGRAM FLOW

On table load, assign an "edit" event to all elements matching the configurable EVENT_LINK selector (by default; all table cell links of class "tsEditLink").

When "edit" event is called;

  1. Execute PRE_EDIT function (if defined)
  2. Change "edit" event link to "save" event
  3. Disable sorting on table
  4. Make row cells editable
  5. Execute POST_EDIT function (if defined)

When "save" event is called;

  1. Execute PRE_SAVE function (if defined)
  2. Make row cells non-editable, cache changed & original values to pass to UPDATE function
  3. Clear tableSorter's cache
  4. Execute UPDATE function (if defined)

CHANGES

TODO



(c) 2006 - Brice Burgess