mozilla/spartacus — pull request #70 by muffinresearch (2014-06-19 17:07:03+00:00)
Title: Add wait views WiP

This ended-up resulting in a bit of a re-jig so that all the ugly event listening code to handle resets could be removed.

This is the summary so far:

* Add PageView all pages (e.g. not errors or throbbers) derive from this. This view defaults to listening to model events and adds the handlers for the events which then make it possible to override them in the relevant places for reset.
* A new IndexView has been added whose job it is to deal with start-up.
* The global AppView still exists but is pretty much limited to setting up the app.
* There's now a view manager which deals with tearing down the previous views instances. This makes it a lot easier to ensure we don't have zombie views kicking around.
* The router now uses the viewManager to show views which makes that a bit simpler. (It could almost certainly be reduced further to just config).
* the hide method on throbber and error has been removed so that we just use close() directly. Saves on a bunch of duplication where the old hide method was just a wrapper.
* Adds the port of the wait code. This is mostly just lifted in direct from webpay.
* Added a current func, which allows a lookup of the current view via the router.