##// END OF EJS Templates
switch notebook.delete to use contentmanager...
Jeff Hemmelgarn -
Show More
@@ -72,15 +72,16 b' require(['
72 var save_widget = new savewidget.SaveWidget('span#save_widget', {
72 var save_widget = new savewidget.SaveWidget('span#save_widget', {
73 events: events,
73 events: events,
74 keyboard_manager: keyboard_manager});
74 keyboard_manager: keyboard_manager});
75 var content_manager = new contentmanager.ContentManager($.extend({
76 events: events},
77 common_options));
75 var notebook = new notebook.Notebook('div#notebook', $.extend({
78 var notebook = new notebook.Notebook('div#notebook', $.extend({
76 events: events,
79 events: events,
77 keyboard_manager: keyboard_manager,
80 keyboard_manager: keyboard_manager,
78 save_widget: save_widget,
81 save_widget: save_widget,
82 content_manager: content_manager,
79 config: user_config},
83 config: user_config},
80 common_options));
84 common_options));
81 var content_manager = new contentmanager.ContentManager($.extend({
82 events: events},
83 common_options));
84 var login_widget = new loginwidget.LoginWidget('span#login_widget', common_options);
85 var login_widget = new loginwidget.LoginWidget('span#login_widget', common_options);
85 var toolbar = new maintoolbar.MainToolBar('#maintoolbar-container', {
86 var toolbar = new maintoolbar.MainToolBar('#maintoolbar-container', {
86 notebook: notebook,
87 notebook: notebook,
@@ -137,6 +138,7 b' require(['
137 IPython.page = page;
138 IPython.page = page;
138 IPython.layout_manager = layout_manager;
139 IPython.layout_manager = layout_manager;
139 IPython.notebook = notebook;
140 IPython.notebook = notebook;
141 IPython.content_manager = content_manager;
140 IPython.pager = pager;
142 IPython.pager = pager;
141 IPython.quick_help = quick_help;
143 IPython.quick_help = quick_help;
142 IPython.login_widget = login_widget;
144 IPython.login_widget = login_widget;
@@ -61,6 +61,7 b' define(['
61 this.notebook_name = options.notebook_name;
61 this.notebook_name = options.notebook_name;
62 this.events = options.events;
62 this.events = options.events;
63 this.keyboard_manager = options.keyboard_manager;
63 this.keyboard_manager = options.keyboard_manager;
64 this.content_manager = options.content_manager;
64 this.save_widget = options.save_widget;
65 this.save_widget = options.save_widget;
65 this.tooltip = new tooltip.Tooltip(this.events);
66 this.tooltip = new tooltip.Tooltip(this.events);
66 this.ws_url = options.ws_url;
67 this.ws_url = options.ws_url;
@@ -2120,21 +2121,7 b' define(['
2120 };
2121 };
2121
2122
2122 Notebook.prototype.delete = function () {
2123 Notebook.prototype.delete = function () {
2123 var that = this;
2124 this.content_manager.delete_notebook(this.notebook_name, this.notebook_path, this.base_url);
2124 var settings = {
2125 processData : false,
2126 cache : false,
2127 type : "DELETE",
2128 dataType: "json",
2129 error : utils.log_ajax_error,
2130 };
2131 var url = utils.url_join_encode(
2132 this.base_url,
2133 'api/contents',
2134 this.notebook_path,
2135 this.notebook_name
2136 );
2137 $.ajax(url, settings);
2138 };
2125 };
2139
2126
2140
2127
General Comments 0
You need to be logged in to leave comments. Login now