Show More
@@ -91,7 +91,7 b' define([' | |||||
91 | // Create a new notebook in the same path as the current |
|
91 | // Create a new notebook in the same path as the current | |
92 | // notebook's path. |
|
92 | // notebook's path. | |
93 | var parent = utils.url_path_split(that.notebook.notebook_path)[0]; |
|
93 | var parent = utils.url_path_split(that.notebook.notebook_path)[0]; | |
94 | that.contents.new(parent, { |
|
94 | that.contents.new_untitled(parent, { | |
95 | type: "notebook", |
|
95 | type: "notebook", | |
96 | extra_settings: {async: false}, // So we can open a new window afterwards |
|
96 | extra_settings: {async: false}, // So we can open a new window afterwards | |
97 | success: function (data) { |
|
97 | success: function (data) { |
@@ -92,15 +92,15 b' define([' | |||||
92 |
|
92 | |||
93 |
|
93 | |||
94 | /** |
|
94 | /** | |
95 |
* Creates a new |
|
95 | * Creates a new untitled file or directory in the specified directory path. | |
96 | * |
|
96 | * | |
97 | * @method new |
|
97 | * @method new | |
98 |
* @param {String} path |
|
98 | * @param {String} path: the directory in which to create the new file/directory | |
99 | * @param {Object} options: |
|
99 | * @param {Object} options: | |
100 | * ext: file extension to use |
|
100 | * ext: file extension to use | |
101 | * type: model type to create ('notebook', 'file', or 'directory') |
|
101 | * type: model type to create ('notebook', 'file', or 'directory') | |
102 | */ |
|
102 | */ | |
103 | Contents.prototype.new = function(path, options) { |
|
103 | Contents.prototype.new_untitled = function(path, options) { | |
104 | var data = JSON.stringify({ |
|
104 | var data = JSON.stringify({ | |
105 | ext: options.ext, |
|
105 | ext: options.ext, | |
106 | type: options.type |
|
106 | type: options.type |
@@ -64,7 +64,7 b' require([' | |||||
64 | var login_widget = new loginwidget.LoginWidget('#login_widget', common_options); |
|
64 | var login_widget = new loginwidget.LoginWidget('#login_widget', common_options); | |
65 |
|
65 | |||
66 | $('#new_notebook').click(function (e) { |
|
66 | $('#new_notebook').click(function (e) { | |
67 | contents.new(common_options.notebook_path, { |
|
67 | contents.new_untitled(common_options.notebook_path, { | |
68 | type: "notebook", |
|
68 | type: "notebook", | |
69 | extra_settings: {async: false}, // So we can open a new window afterwards |
|
69 | extra_settings: {async: false}, // So we can open a new window afterwards | |
70 | success: function (data) { |
|
70 | success: function (data) { |
General Comments 0
You need to be logged in to leave comments.
Login now