mirror of
https://github.com/jupyter/notebook.git
synced 2025-02-05 12:19:58 +08:00
remove nbconvert_exporter handling from frontend
dispatch happens in the script exporter, frontend doesn't need to know about it anymore.
This commit is contained in:
parent
53943d64de
commit
93bbf6d52e
@ -154,6 +154,10 @@ define([
|
||||
that._nbconvert('pdf', true);
|
||||
});
|
||||
|
||||
this.element.find('#download_script').click(function () {
|
||||
that._nbconvert('script', true);
|
||||
});
|
||||
|
||||
this.element.find('#rename_notebook').click(function () {
|
||||
that.save_widget.rename_notebook({notebook: that.notebook});
|
||||
});
|
||||
@ -373,20 +377,6 @@ define([
|
||||
var langname = (langinfo.name || 'Script')
|
||||
langname = langname.charAt(0).toUpperCase()+langname.substr(1) // Capitalise
|
||||
el.find('a').text(langname + ' ('+(langinfo.file_extension || 'txt')+')');
|
||||
|
||||
// Unregister any previously registered handlers
|
||||
el.off('click');
|
||||
if (langinfo.nbconvert_exporter) {
|
||||
// Metadata specifies a specific exporter, e.g. 'python'
|
||||
el.click(function() {
|
||||
that._nbconvert(langinfo.nbconvert_exporter, true);
|
||||
});
|
||||
} else {
|
||||
// Use generic 'script' exporter
|
||||
el.click(function() {
|
||||
that._nbconvert('script', true);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
// Backwards compatability.
|
||||
|
Loading…
Reference in New Issue
Block a user