mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-12 11:45:38 +08:00
fix notebook_path in menu bar
This commit is contained in:
parent
e1e0b19a6a
commit
e7db8cfd4e
@ -59,7 +59,8 @@ var IPython = (function (IPython) {
|
|||||||
|
|
||||||
MenuBar.prototype._nbconvert = function (format, download) {
|
MenuBar.prototype._nbconvert = function (format, download) {
|
||||||
download = download || false;
|
download = download || false;
|
||||||
var notebook_name = IPython.notebook.get_notebook_name();
|
var notebook_path = IPython.notebook.notebook_path;
|
||||||
|
var notebook_name = IPython.notebook.notebook_name;
|
||||||
if (IPython.notebook.dirty) {
|
if (IPython.notebook.dirty) {
|
||||||
IPython.notebook.save_notebook({async : false});
|
IPython.notebook.save_notebook({async : false});
|
||||||
}
|
}
|
||||||
@ -67,8 +68,8 @@ var IPython = (function (IPython) {
|
|||||||
this.base_url,
|
this.base_url,
|
||||||
'nbconvert',
|
'nbconvert',
|
||||||
format,
|
format,
|
||||||
this.notebook_path,
|
notebook_path,
|
||||||
notebook_name + '.ipynb'
|
notebook_name
|
||||||
) + "?download=" + download.toString();
|
) + "?download=" + download.toString();
|
||||||
|
|
||||||
window.open(url);
|
window.open(url);
|
||||||
@ -103,7 +104,7 @@ var IPython = (function (IPython) {
|
|||||||
base_url,
|
base_url,
|
||||||
'files',
|
'files',
|
||||||
notebook_path,
|
notebook_path,
|
||||||
notebook_name + '.ipynb'
|
notebook_name
|
||||||
);
|
);
|
||||||
window.location.assign(url);
|
window.location.assign(url);
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user