mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-12 11:45:38 +08:00
Change the path to create notebooks in when navigating directories
Closes gh-3263 Closes gh-3248
This commit is contained in:
parent
8441005a39
commit
1d84d839f3
@ -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',
|
||||
|
@ -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();
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user