FeeFighters/samurai-js — pull request #4 by tisho (2012-01-29 16:24:34+00:00)
Title: Better PaymentErrorHandler

This is still WIP, because I haven't updated the tests and documentation, but is tested inside the browser and achieves the same exact functionality of what we had before.

Commit summary:
* decoupled the error renderer from the payment error handler. The error handler would now just parse error messages and trigger events, which the renderer would pick up on and handle highlighting input fields and rendering error messages/summary.
* the `show-error` event is now called simply `error`, because `show` implies that something should visually change.
* the `errors-shown` event is now called `errors`.
* an `errors-shown` event is still dispatched, but this time by the PaymentErrorRenderer (which is technically more correct).