Re-factor JS to add listenable events.

hideSaveAndContinue and showSaveAndContinue are now events which we can
listen on to trigger alternate logic.