File tree 2 files changed +3
-2
lines changed
2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ define([
13
13
var NewNotebookWidget = function ( selector , options ) {
14
14
this . selector = selector ;
15
15
this . base_url = options . base_url ;
16
- this . notebook_path = options . notebook_path ;
17
16
this . contents = options . contents ;
18
17
this . events = options . events ;
19
18
this . default_kernel = null ;
@@ -79,7 +78,8 @@ define([
79
78
var that = this ;
80
79
kernel_name = kernel_name || this . default_kernel ;
81
80
var w = window . open ( undefined , IPython . _target ) ;
82
- this . contents . new_untitled ( that . notebook_path , { type : "notebook" } ) . then (
81
+ var dir_path = $ ( 'body' ) . attr ( 'data-notebook-path' ) ;
82
+ this . contents . new_untitled ( dir_path , { type : "notebook" } ) . then (
83
83
function ( data ) {
84
84
var url = utils . url_path_join (
85
85
that . base_url , 'notebooks' ,
Original file line number Diff line number Diff line change @@ -399,6 +399,7 @@ define([
399
399
400
400
NotebookList . prototype . update_location = function ( path ) {
401
401
this . notebook_path = path ;
402
+ $ ( 'body' ) . attr ( 'data-notebook-path' , path ) ;
402
403
// Update the file tree list without reloading the page
403
404
this . load_list ( ) ;
404
405
} ;
You can’t perform that action at this time.
0 commit comments