[sammy.js][ANN] Sammy v0.2.0 released

7 views
Skip to first unread message

Aaron Quint

unread,
Jun 10, 2009, 11:16:13 AM6/10/09
to sam...@googlegroups.com
Hey Everyone,

Big week with a lot of changes. I'm going to continue using the 'next'
branch as an unstable testing playground, and changes will be pulled
back to master for new releases.
Thanks to everyone who helped with this release!

CHANGES:

New:
- Location Overrides: All location methods refer to two
Sammy.Application methods: getLocation() and setLocation() which
return and take a string, respectively. The default behavior is to
pull the location from window.location.hash, but these methods can be
overridden to provide alternate location strategies. Theres an example
in examples/location_override. (thanks to britg, CodeOfficer)
- Sammy.Object#toHash() returns a JS object with any functions
stripped. Useful for using with params.
- Sammy.Application#swap() is the method called within partial() for
changing the content of $element(). The default behavior is just to
use $.fn.html(), but can be overridden to provide some fancy
animations.

Fixed:
- The 'changed' event is only fired at run() and after a partial's
callback. This is the event to bind to, to check the DOM after a
partial() call. (thanks to hpoydar).
- template() (aka $.srender) handles single quoted attributes now
(aka generated HAML)
- When the app booted up, run() would redirect to the start_url even
if another location was present.
- the _checkLocation() method now sets last_location properly (which
fixes continual checking if route isn't found)


Thanks again, I'm updating the documentation later this afternoon.
Please file any bugs in github or come talk to me in #sammy on irc.

--AQ

Aaron Quint
http://www.quirkey.com

Reply all
Reply to author
Forward
0 new messages