A DataGrid built using PHP, the Smarty Template Engine, Scriptaculous, and Prototype ----------------- FEATURES * Container div is resizable and surrounds the grid with scrollbars * Column based extra features show up in a right-click menu on the column heading * Columns can be reordered - configurable by field (hold mouse down for 1sec over column heading until cursor changes, then drag away) * Columns can be added/remboolean oved - boolean configurable by field * Columns can be resized by dragging the resizer in the column header - AJAX used to save preferences (PHP is setting a cookie on this page so your prefs should stick) * Columns can be filtered - quicksearchable - boolean configurable by field, ex. right click on Vendor * There are hooks in place for sending sort, sort order information to the server - configurable by field * DOM is used where it's most scalable, otherwise we're using inline events and the server and template to swap out innerHTML * xhtml fixed-width tables used for presentation * CSS used for styling QUIRKS/BUGS * Untested in Mac Safari, except for one time when it crashed completely * Because IE handles table DOM so poorly, reordering columns in DOM is not very scalable. So there is a config option to set the number of rows above which the grid should go back to the server. See the almighty Quirksmode (http://www.quirksmode.org/dom/innerhtml.html) for more on this point * In order to use the Scriptaculous Sortable class for the row headers, the CSS for the tags resets their display property to inline. Why not just use divs then? Well, who knows, maybe I won't use Scriptaculous one day * Until the patch I've submitted to Mr. Thomas Fuchs is accepted, you'll need to use the included version of scriptaculous' dragdrop.js - I wrote the options. delay code into the Draggables class * Because Scriptaculous Draggables make use of the prototype function Element.makePositioned(), if you want to use column reorderability, then you cannot set any DOCTYPE in Windows IE to layout the column headers nicely. Ick! This is a known bug in IE. Again, see Quirksmode (http://www.quirksmode.org/bugreports/archives/2005/09/positionrelative_breaks_out_of_overflow_constraint.html) for a reference on this #TODO * Maybe convert grid header to divs for Sortable to be more normal * Make shorter id's and classNames for bytesize optimization * Visually cue on filters * Remove custom inline attributes for true xhtml validation * Reincorporate Rico LiveGrid THANKS I've gotten countless cues and a great deal of inspiration from: * My coworkers at FineTooth for all their help and for the courage to release this code * Skip Baney et al. at HandWire.com who wrote the original HTML and JavaScript including row * #groogroo (mrw, Arun, SmooveB, meekay, TanAdept, Ch1XenZz, bothrops, nebkor, marty, NekoChef, Nyiri) selection, grouping, and AJAX interaction. * The javascript-oriented ActiveWidgets Grid (http://www.activewidgets.com/) * The OpenRico LiveGrid (http://openrico.org/rico/livegrid.page) AUTHOR * Please contact me with bugs/suggestions etc. * Lindsey Simon