Modfies the Contents class to return JavaScript Error objects instead of passing on the return values from $.ajax(). This has two advantages. First, it allows the content manager to parse errors and give more informative messages than the ajax response. Second, it makes the Contents interface more general, since other kinds of backends might generate client-side errors.
Adds the key contentmanager_js_source to webapp_settings that allows for specifying the content manager JavaScript source file. Also adds a NotebookManager subclass, ClientSideNotebookManager, which does minimal logic. This class is used when the JavaScript content manager doesn't use the Python notebook manager, but rather implements that logic client side, as is the case for the Google Drive based content manager.
A sample command line that uses the Google Drive content manager, and the ClientSideNotebookManager, is
ipython notebook --NotebookApp.webapp_settings="{'contentmanager_js_source': 'base/js/drive_contentmanager'}" --NotebookApp.notebook_manager_class="IPython.html.services.notebooks.clientsidenbmanager.ClientSideNotebookManager"
Modifies ContentManager.save_notebook() to use events, so that the Notebook instance can listen for success or failure events. Also moves some logic out of save_notebook()
This logic doesn't really belong in ContentManager. It would be better to trigger an event, which is handled somewhere else. But there's no obvious place to put this event, so creating the error dialog inside the new_notebook method is ok for now.
Don't store notebook_path in ContentManager, because this sort of state (in addition to notebook_name) can change, and keeping track of this logic doesn't seem to be a part of the file management system. Instead, this logic can be left to the Notebook instance (and possible other places that manage it). This makes refactoring easier, and avoids having to replicate this logic in every implementation of ContentManager.