There's been some good talking going on in IRC, and I managed to
collect a couple requests, bug fixes, new features into a new release.
Now that people might actually be using Sammy, though, I didn't want
to just push it before putting it out to the community.
If you have some time, please checkout v0.2.0pre from
http://github.com/quirkey/sammy/tree/next
Notable changes:
- Location has been re-factored. In response to some requests (britg,
CodeOfficer) all checks for an Application's location and the setting
there-of have been moved to two methods getLocation() and
setLocation(). This allows you to easily override just these two
methods to determine the apps current location from something other
then window.location.hash. I put an example in
examples/location_override
- Reworked the $.srender template engine to handle quoted strings a
little better
- Theres a new method swap() which is by default just a shortcut to
$element.html(), however, overriding it allows you to make every call
to partial() use whatever kind of swap or change animation you want.
In the future it might be cool to provide some defaults to make app
building even easier.
Fixes:
- the way run() uses the start location has been rewritten so that
start_location is only used if location is blank
- the app event 'changed' is now only fired at the initial render and
after a partial() callback is finished.
Come chat in #sammy when you have the time. Please file any bugs in
github issues. Feedback is greatly appreciated.
I'm hoping to get this released in the day or two as I have some other
fun suprises to release once this is final.
Thanks!
--AQ
Aaron Quint
http://www.quirkey.com