mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-27 04:20:22 +08:00
update copy API in js
This commit is contained in:
parent
cf0218e2d1
commit
50665831bd
@ -1786,23 +1786,21 @@ var IPython = (function (IPython) {
|
||||
cache : false,
|
||||
type : "POST",
|
||||
dataType : "json",
|
||||
data : JSON.stringify({copy_from : this.notebook_name}),
|
||||
async : false,
|
||||
success : function (data, status, xhr) {
|
||||
var notebook_name = data.name;
|
||||
window.open(utils.url_path_join(
|
||||
base_project_url,
|
||||
'notebooks',
|
||||
path,
|
||||
notebook_name
|
||||
data.path,
|
||||
data.name
|
||||
), '_blank');
|
||||
}
|
||||
};
|
||||
var url = utils.url_path_join(
|
||||
base_project_url,
|
||||
'api/notebooks',
|
||||
path,
|
||||
this.notebook_name,
|
||||
'copy'
|
||||
path
|
||||
);
|
||||
$.ajax(url,settings);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user