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.
instead of GET terminals/new
to be consistent with creating new notebooks.
We had to stop using GET notebooks/new
because browsers would create new notebooks when making preview thumbnails for commonly visited pages, etc.
I assume the same issue would apply to terminals
store the Future for the initial request,
allowing subsequent requests to wait on the same pending reply.
Previously, any incoming requests that arrived while waiting for the first reply would send their own request.