From 845edf6cb4a2a11d7137aad8e1571f44727cdeda 2013-10-19 00:26:14 From: MinRK Date: 2013-10-19 00:26:14 Subject: [PATCH] update copy API in js --- diff --git a/IPython/html/static/notebook/js/notebook.js b/IPython/html/static/notebook/js/notebook.js index f073419..b3d2962 100644 --- a/IPython/html/static/notebook/js/notebook.js +++ b/IPython/html/static/notebook/js/notebook.js @@ -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); };