From 0115f0cc1027f9160ea505f2f941f6f70904caf4 2014-12-23 20:31:54 From: Jonathan Frederic Date: 2014-12-23 20:31:54 Subject: [PATCH] New file open editor --- diff --git a/IPython/html/static/tree/js/notebooklist.js b/IPython/html/static/tree/js/notebooklist.js index 6fce411..d348e11 100644 --- a/IPython/html/static/tree/js/notebooklist.js +++ b/IPython/html/static/tree/js/notebooklist.js @@ -72,7 +72,13 @@ define([ if (!NotebookList._bound_singletons) { NotebookList._bound_singletons = true; $('#new-file').click(function(e) { - that.contents.new_untitled(that.notebook_path || '', {type: 'file', ext: '.txt'}); + var w = window.open(); + that.contents.new_untitled(that.notebook_path || '', {type: 'file', ext: '.txt'}).then(function(data) { + var url = utils.url_join_encode( + that.base_url, 'edit', data.path + ); + w.location = url; + }); that.load_sessions(); }); $('#new-folder').click(function(e) {