Show More
@@ -69,7 +69,6 b' define([' | |||||
69 | MenuBar.prototype._nbconvert = function (format, download) { |
|
69 | MenuBar.prototype._nbconvert = function (format, download) { | |
70 | download = download || false; |
|
70 | download = download || false; | |
71 | var notebook_path = this.notebook.notebook_path; |
|
71 | var notebook_path = this.notebook.notebook_path; | |
72 | var notebook_name = this.notebook.notebook_name; |
|
|||
73 | if (this.notebook.dirty) { |
|
72 | if (this.notebook.dirty) { | |
74 | this.notebook.save_notebook({async : false}); |
|
73 | this.notebook.save_notebook({async : false}); | |
75 | } |
|
74 | } | |
@@ -77,8 +76,7 b' define([' | |||||
77 | this.base_url, |
|
76 | this.base_url, | |
78 | 'nbconvert', |
|
77 | 'nbconvert', | |
79 | format, |
|
78 | format, | |
80 |
notebook_path |
|
79 | notebook_path | |
81 | notebook_name |
|
|||
82 | ) + "?download=" + download.toString(); |
|
80 | ) + "?download=" + download.toString(); | |
83 |
|
81 | |||
84 | window.open(url); |
|
82 | window.open(url); | |
@@ -120,17 +118,11 b' define([' | |||||
120 | this.element.find('#download_ipynb').click(function () { |
|
118 | this.element.find('#download_ipynb').click(function () { | |
121 | var base_url = that.notebook.base_url; |
|
119 | var base_url = that.notebook.base_url; | |
122 | var notebook_path = that.notebook.notebook_path; |
|
120 | var notebook_path = that.notebook.notebook_path; | |
123 | var notebook_name = that.notebook.notebook_name; |
|
|||
124 | if (that.notebook.dirty) { |
|
121 | if (that.notebook.dirty) { | |
125 | that.notebook.save_notebook({async : false}); |
|
122 | that.notebook.save_notebook({async : false}); | |
126 | } |
|
123 | } | |
127 |
|
124 | |||
128 | var url = utils.url_join_encode( |
|
125 | var url = utils.url_join_encode(base_url, 'files', notebook_path); | |
129 | base_url, |
|
|||
130 | 'files', |
|
|||
131 | notebook_path, |
|
|||
132 | notebook_name |
|
|||
133 | ); |
|
|||
134 | window.open(url + '?download=1'); |
|
126 | window.open(url + '?download=1'); | |
135 | }); |
|
127 | }); | |
136 |
|
128 |
General Comments 0
You need to be logged in to leave comments.
Login now