Monthly Archives: December 2008

Legacy horizontal menu with ExtJS

It’s easy to leverage ExtJS to build a legacy navigation menu, assuming you don’t need search engine visibility. v.Menu = Ext.extend(Ext.Toolbar, {   renderTo: ‘menu’,   initComponent:function() {   this.targets = { ‘menu-button-people’:'/people’, ‘menu-button-companies’:'/companies’ };   var items = [];   items.push({ text: ‘People’ }, { text: ‘Companies’ });   for(var i=0; i<items.length; i++) { [...]

ExtJS, Wufoo, and form theory

If you’ve stumbled across Wufoo’s blog, you’ll notice they’ve done extensive research into online form usability, given it is their core competency. ExtJS has its own CSS for forms, but it is possible to implement some of the Wufoo form suggestions. It’s easy to put the form labels above the field inputs: new Ext.form.FormPanel({ … [...]

Sensible form layouts with Ext.ux.layout.TableFormLayout

I think ExtJS contributor animal is quite prescient when he writes: The vertical, linear nature of Ext.layout.FormLayout baffles first time Ext users. The depth and complexity of the nested structure required with the traditional form layout is simply insane when building a form up declaratively. It’s essentially an enormous, massively nested data structure that’s virtually [...]

loader for custom mootools classes

For posterity, I thought I’d post code I was using to initialize multiple instances of some of my mootools classes with default and DOM element specific options. Additionally, I only wanted a class to be initialized for an element actually on the page, so #filter is used. Mootools is definitely more fun than Ext JS. [...]

Sensible remoteSort for Ext JS

If you’re managing complex model relationships like I am on the server side, you might find you need to sort on multiple columns to maintain correct ordering or perhaps because Ruby on Rails uses SELECT DISTINCT ON internally which exhibits unpredictable results when combined with PostgreSQL and LIMIT. Presently, Ext JS will simply send the [...]

Congressional Democrats still stupid

BAWHAHAHA! Seriously. Congress wanted to guarantee that the $700 billion financial bailout would limit the eye-popping pay of Wall Street executives, so lawmakers included a mechanism for reviewing executive compensation and penalizing firms that break the rules. But at the last minute, the Bush administration insisted on a one-sentence change to the provision, congressional aides [...]

Rails, json_serializer, associations, and you

While the JSON support in Rails has improved, at least as of 2.1.0 the serializer doesn’t take into account model overrides of #to_json. Fortunately, a patch has been introduced, although it has been staled out. Rails 2.3.3 and possibly earlier versions of Rails 2.3 no longer have this issue. In the meantime, I have been [...]

OpenOffice dot Org (OOo) is an epic fail!

I just stumbled across an OOo bug, an obvious usability issue, that’s been outstanding for more than five years. I mean, what the fuck? Seriously. If you select a bunch of cells, then start using the tab key to go through them for data entry, as people have done since time immemorial, a cell that [...]