mirror of
https://github.com/jupyter/notebook.git
synced 2025-03-19 13:20:36 +08:00
New file open editor
This commit is contained in:
parent
6e86c7645b
commit
34c08c035f
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user