diff --git a/IPython/html/services/notebooks/handlers.py b/IPython/html/services/notebooks/handlers.py index 4c32f1c..540a233 100644 --- a/IPython/html/services/notebooks/handlers.py +++ b/IPython/html/services/notebooks/handlers.py @@ -69,9 +69,9 @@ class NotebookHandler(IPythonHandler): if self.get_argument('download', default='False') == 'True': format = self.get_argument('format', default='json') - if format == u'json': + if format != u'json': self.set_header('Content-Type', 'application/json') - raise web.HTTPError(400, "Unrecognized format: %s" % ext) + raise web.HTTPError(400, "Unrecognized format: %s" % format) self.set_header('Content-Disposition', 'attachment; filename="%s"' % name diff --git a/IPython/html/static/notebook/js/menubar.js b/IPython/html/static/notebook/js/menubar.js index 48e8937..240ecf6 100644 --- a/IPython/html/static/notebook/js/menubar.js +++ b/IPython/html/static/notebook/js/menubar.js @@ -101,6 +101,10 @@ var IPython = (function (IPython) { ); window.location.assign(url); }); + + /* FIXME: download-as-py doesn't work right now + * We will need nbconvert hooked up to get this back + this.element.find('#download_py').click(function () { var notebook_name = IPython.notebook.get_notebook_name(); if (IPython.notebook.dirty) { @@ -114,6 +118,9 @@ var IPython = (function (IPython) { ); window.location.assign(url); }); + + */ + this.element.find('#rename_notebook').click(function () { IPython.save_widget.rename_notebook(); }); diff --git a/IPython/html/templates/notebook.html b/IPython/html/templates/notebook.html index 0abb374..83b2199 100644 --- a/IPython/html/templates/notebook.html +++ b/IPython/html/templates/notebook.html @@ -73,8 +73,8 @@ class="notebook_app"