zepheira/exhibit3 — pull request #68 by karger (2012-07-25 19:10:13+00:00)
Title: Corrected LABjs usage and fixed timeline load-order problems.

Based on the setting of the "AlwaysPreserveOrder" option in LABjs, it
appears that the intent was to serialize all script loading in
exhibit. However, LABjs only guarantees serialization of scripts that
are in the same chain, and Exhibit wasn't chaining its $LAB.script()
calls.

I've introduced a new function, Exhibit.includeScript, in
exhibit-api.js. It accepts a string (url to be included as a
script) or a function (to be queued for execution after the previous
script loads). In either case, it serializes all passed in scripts in
the order of invocation of includeScript.

I've modified the timeline extension to make use of the new loading
mechanism, and the timeline in the nobelists example now works.

BUG: because of the polling hack for timeline, it is possible
that on a slow connection the poll will succeed (Timeline is defined)
before all of Timeline is loaded/initialized, which will make Exhibit
choke when it tries to configure the timeline.