Show More
@@ -154,6 +154,10 b' define([' | |||
|
154 | 154 | that._nbconvert('pdf', true); |
|
155 | 155 | }); |
|
156 | 156 | |
|
157 | this.element.find('#download_script').click(function () { | |
|
158 | that._nbconvert('script', true); | |
|
159 | }); | |
|
160 | ||
|
157 | 161 | this.element.find('#rename_notebook').click(function () { |
|
158 | 162 | that.save_widget.rename_notebook({notebook: that.notebook}); |
|
159 | 163 | }); |
@@ -373,20 +377,6 b' define([' | |||
|
373 | 377 | var langname = (langinfo.name || 'Script') |
|
374 | 378 | langname = langname.charAt(0).toUpperCase()+langname.substr(1) // Capitalise |
|
375 | 379 | el.find('a').text(langname + ' ('+(langinfo.file_extension || 'txt')+')'); |
|
376 | ||
|
377 | // Unregister any previously registered handlers | |
|
378 | el.off('click'); | |
|
379 | if (langinfo.nbconvert_exporter) { | |
|
380 | // Metadata specifies a specific exporter, e.g. 'python' | |
|
381 | el.click(function() { | |
|
382 | that._nbconvert(langinfo.nbconvert_exporter, true); | |
|
383 | }); | |
|
384 | } else { | |
|
385 | // Use generic 'script' exporter | |
|
386 | el.click(function() { | |
|
387 | that._nbconvert('script', true); | |
|
388 | }); | |
|
389 | } | |
|
390 | 380 | }; |
|
391 | 381 | |
|
392 | 382 | // Backwards compatability. |
General Comments 0
You need to be logged in to leave comments.
Login now