Change the path to create notebooks in when navigating directories

Closes gh-3263
Closes gh-3248
This commit is contained in:
Thomas Kluyver 2018-01-25 09:57:59 +01:00
parent 8441005a39
commit 1d84d839f3
2 changed files with 3 additions and 2 deletions

View File

@ -13,7 +13,6 @@ define([
var NewNotebookWidget = function (selector, options) {
this.selector = selector;
this.base_url = options.base_url;
this.notebook_path = options.notebook_path;
this.contents = options.contents;
this.events = options.events;
this.default_kernel = null;
@ -79,7 +78,8 @@ define([
var that = this;
kernel_name = kernel_name || this.default_kernel;
var w = window.open(undefined, IPython._target);
this.contents.new_untitled(that.notebook_path, {type: "notebook"}).then(
var dir_path = $('body').attr('data-notebook-path');
this.contents.new_untitled(dir_path, {type: "notebook"}).then(
function (data) {
var url = utils.url_path_join(
that.base_url, 'notebooks',

View File

@ -399,6 +399,7 @@ define([
NotebookList.prototype.update_location = function (path) {
this.notebook_path = path;
$('body').attr('data-notebook-path', path);
// Update the file tree list without reloading the page
this.load_list();
};