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

\n"; for ($col=0; $col < count($line); $col++) { echo "\t\t\t\n"; } echo "\t\t\n"; } fclose($handle); ?>
ID First Name Last Name Phone City Email
233 (edit) Not a form element
"; echo ($col == 0) ? ''.$line[$col].' (edit)' : $line[$col]; echo "

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