Show More
@@ -4,7 +4,8 b'' | |||
|
4 | 4 | define([ |
|
5 | 5 | 'base/js/namespace', |
|
6 | 6 | 'jquery', |
|
7 | ], function(IPython, $) { | |
|
7 | 'base/js/utils', | |
|
8 | ], function(IPython, $, utils) { | |
|
8 | 9 | var ContentManager = function(notebook_path, base_url) { |
|
9 | 10 | // Constructor |
|
10 | 11 | // |
@@ -18,7 +19,7 b' define([' | |||
|
18 | 19 | this.version = 0.1; |
|
19 | 20 | this.notebook_path = notebook_path; |
|
20 | 21 | this.base_url = base_url; |
|
21 | } | |
|
22 | }; | |
|
22 | 23 | |
|
23 | 24 | ContentManager.prototype.new_notebook = function() { |
|
24 | 25 | var path = this.notebook_path; |
@@ -49,7 +50,7 b' define([' | |||
|
49 | 50 | path |
|
50 | 51 | ); |
|
51 | 52 | $.ajax(url,settings); |
|
52 | } | |
|
53 | }; | |
|
53 | 54 | |
|
54 | 55 | ContentManager.prototype.delete_notebook = function(notebook) { |
|
55 | 56 | var that = notebook; |
@@ -67,7 +68,7 b' define([' | |||
|
67 | 68 | that.notebook_name |
|
68 | 69 | ); |
|
69 | 70 | $.ajax(url, settings); |
|
70 | } | |
|
71 | }; | |
|
71 | 72 | |
|
72 | 73 | ContentManager.prototype.rename_notebook = function(notebook, nbname) { |
|
73 | 74 | var that = notebook; |
@@ -93,7 +94,7 b' define([' | |||
|
93 | 94 | this.notebook_name |
|
94 | 95 | ); |
|
95 | 96 | $.ajax(url, settings); |
|
96 | } | |
|
97 | }; | |
|
97 | 98 | |
|
98 | 99 | ContentManager.prototype.save_notebook = function(notebook, extra_settings) { |
|
99 | 100 | // Create a JSON model to be sent to the server. |
@@ -129,11 +130,10 b' define([' | |||
|
129 | 130 | ); |
|
130 | 131 | $.ajax(url, settings); |
|
131 | 132 | }; |
|
132 | } | |
|
133 | 133 | |
|
134 | 134 | ContentManager.prototype.save_checkpoint = function() { |
|
135 | 135 | // This is not necessary - integrated into save |
|
136 | } | |
|
136 | }; | |
|
137 | 137 | |
|
138 | 138 | ContentManager.prototype.restore_checkpoint = function(notebook, id) { |
|
139 | 139 | that = notebook; |
@@ -151,7 +151,7 b' define([' | |||
|
151 | 151 | ).fail( |
|
152 | 152 | $.proxy(that.restore_checkpoint_error, that) |
|
153 | 153 | ); |
|
154 | } | |
|
154 | }; | |
|
155 | 155 | |
|
156 | 156 | ContentManager.prototype.list_checkpoints = function(notebook) { |
|
157 | 157 | that = notebook; |
@@ -167,7 +167,9 b' define([' | |||
|
167 | 167 | ).fail( |
|
168 | 168 | $.proxy(that.list_checkpoints_error, that) |
|
169 | 169 | ); |
|
170 | } | |
|
170 | }; | |
|
171 | ||
|
172 | IPython.ContentManager = ContentManager; | |
|
171 | 173 | |
|
172 | return ContentManager; | |
|
174 | return {'ContentManager': ContentManager}; | |
|
173 | 175 | }); |
General Comments 0
You need to be logged in to leave comments.
Login now