##// END OF EJS Templates
disable download-as-pt...
MinRK -
Show More
@@ -69,9 +69,9 b' class NotebookHandler(IPythonHandler):'
69
69
70 if self.get_argument('download', default='False') == 'True':
70 if self.get_argument('download', default='False') == 'True':
71 format = self.get_argument('format', default='json')
71 format = self.get_argument('format', default='json')
72 if format == u'json':
72 if format != u'json':
73 self.set_header('Content-Type', 'application/json')
73 self.set_header('Content-Type', 'application/json')
74 raise web.HTTPError(400, "Unrecognized format: %s" % ext)
74 raise web.HTTPError(400, "Unrecognized format: %s" % format)
75
75
76 self.set_header('Content-Disposition',
76 self.set_header('Content-Disposition',
77 'attachment; filename="%s"' % name
77 'attachment; filename="%s"' % name
@@ -101,6 +101,10 b' var IPython = (function (IPython) {'
101 );
101 );
102 window.location.assign(url);
102 window.location.assign(url);
103 });
103 });
104
105 /* FIXME: download-as-py doesn't work right now
106 * We will need nbconvert hooked up to get this back
107
104 this.element.find('#download_py').click(function () {
108 this.element.find('#download_py').click(function () {
105 var notebook_name = IPython.notebook.get_notebook_name();
109 var notebook_name = IPython.notebook.get_notebook_name();
106 if (IPython.notebook.dirty) {
110 if (IPython.notebook.dirty) {
@@ -114,6 +118,9 b' var IPython = (function (IPython) {'
114 );
118 );
115 window.location.assign(url);
119 window.location.assign(url);
116 });
120 });
121
122 */
123
117 this.element.find('#rename_notebook').click(function () {
124 this.element.find('#rename_notebook').click(function () {
118 IPython.save_widget.rename_notebook();
125 IPython.save_widget.rename_notebook();
119 });
126 });
@@ -73,8 +73,8 b' class="notebook_app"'
73 <li class="divider"></li>
73 <li class="divider"></li>
74 <li class="dropdown-submenu"><a href="#">Download as</a>
74 <li class="dropdown-submenu"><a href="#">Download as</a>
75 <ul class="dropdown-menu">
75 <ul class="dropdown-menu">
76 <li id="download_ipynb"><a href="#">IPython (.ipynb)</a></li>
76 <li id="download_ipynb"><a href="#">IPython Notebook (.ipynb)</a></li>
77 <li id="download_py"><a href="#">Python (.py)</a></li>
77 <!-- <li id="download_py"><a href="#">Python (.py)</a></li> -->
78 </ul>
78 </ul>
79 </li>
79 </li>
80 <li class="divider"></li>
80 <li class="divider"></li>
General Comments 0
You need to be logged in to leave comments. Login now