::::: : the wood : davidrobins.net

Playing with jQuery: dates and choosers

Technical ·Thursday September 12, 2013 @ 20:44 EDT (link)

We released version 1.17.6 of the exacqVision API today; this release had a couple bad bugs: 1.17.4 was released on the 6th, and we discovered we had stopped sending input trigger events (mea culpa; flipped a ! in refactoring), so released 1.17.5, but then the current version was released today to fix an integer overflow issue in JPEG scaling code.

On to jQuery. When writing the last few entries on this site, I added a new Auto category, which caused my list of category check boxes to wrap the line. I decide that this was a baroque (and broke) way of doing things, so hied around for a jQuery control that would do it better, and came across Chosen, which is quite elegant. It looks a lot like selecting email addresses in GMail, in fact. I did have some trouble with it displaying tiny tiny text in the edit area, which eventually was fixed (through a process of starting with their demo page and determining what was different) by adding a <!doctype html> declaration, which then needed a margin-top setting on the top element so vertical space didn't appear at the top of the document. Yes, HTML is still a bit of a black art, but it has gotten so much better. Getting the control itself to work was trivial, and I needed only minor changes to the underlying Perl (mostly code removal, which is always nice).

Today I decided the date entry box was going to be a date picker, so added in the jQuery UI Datepicker control. With a minor tweak to use a sane format (ISO8601), it didn't even require any server-side code changes this time.

One snag I ran into is that the Popeye plugin that I use to display photos doesn't appear to work with jQuery 2.0.3. I don't have a solution for that yet; I may use a different photo widget, or attempt to fix the issues myself.

Books finished: The Phoenix Exultant; or, Dispossessed In Utopia.