pxnx

Flexigrid jQuery plugin: extending to allow sorting of static grids

Flexigrid is a nice lightweight jQuery plugin that turns tables into sortable, searchable, data-driven grids.  It’s all ajaxed up to the hilt, like every other jQuery plugin, but it can also create a quick nice-looking grid from a plain ol’ HTML table.

Out of the box, though, its column sorting feature does not work unless your grid is hooked up to a server-side data source.  Here is a svn patch that adds this functionality to the current head branch of flexigrid.js:

flexigrid-sort-in-place.diff

This patch is built on the current trunk revision of flexigrid.js, which is r3.  I am currently unable to create a patch for the current release version (“1.0b3″), which is slightly different; but to apply these changes to that version is pretty simple, since I only made 3 changes:

  1. add “sortorder: ‘asc’” to the default properties struct up at the top
  2. add the “else if (!p.url) this.inPlaceSort();” clause to the end of the changeSort method
  3. copy in the inPlaceSort() function

WordPress plugins released

I developed two plugins (so far) to support the new Habitat for Humanity Portland/Metro East site, and they are now listed in the WordPress Plugin Repository:

So far today I have compulsively checked the download statistics and somehow 60+ people downloaded PageSpot within about 6 hours of it being published.  I know there are a lot of WordPress blogs and users out there but there must be even more than I assumed.