Show More
@@ -72,15 +72,16 b' require([' | |||
|
72 | 72 | var save_widget = new savewidget.SaveWidget('span#save_widget', { |
|
73 | 73 | events: events, |
|
74 | 74 | keyboard_manager: keyboard_manager}); |
|
75 | var content_manager = new contentmanager.ContentManager($.extend({ | |
|
76 | events: events}, | |
|
77 | common_options)); | |
|
75 | 78 | var notebook = new notebook.Notebook('div#notebook', $.extend({ |
|
76 | 79 | events: events, |
|
77 | 80 | keyboard_manager: keyboard_manager, |
|
78 | 81 | save_widget: save_widget, |
|
82 | content_manager: content_manager, | |
|
79 | 83 | config: user_config}, |
|
80 | 84 | common_options)); |
|
81 | var content_manager = new contentmanager.ContentManager($.extend({ | |
|
82 | events: events}, | |
|
83 | common_options)); | |
|
84 | 85 | var login_widget = new loginwidget.LoginWidget('span#login_widget', common_options); |
|
85 | 86 | var toolbar = new maintoolbar.MainToolBar('#maintoolbar-container', { |
|
86 | 87 | notebook: notebook, |
@@ -137,6 +138,7 b' require([' | |||
|
137 | 138 | IPython.page = page; |
|
138 | 139 | IPython.layout_manager = layout_manager; |
|
139 | 140 | IPython.notebook = notebook; |
|
141 | IPython.content_manager = content_manager; | |
|
140 | 142 | IPython.pager = pager; |
|
141 | 143 | IPython.quick_help = quick_help; |
|
142 | 144 | IPython.login_widget = login_widget; |
@@ -61,6 +61,7 b' define([' | |||
|
61 | 61 | this.notebook_name = options.notebook_name; |
|
62 | 62 | this.events = options.events; |
|
63 | 63 | this.keyboard_manager = options.keyboard_manager; |
|
64 | this.content_manager = options.content_manager; | |
|
64 | 65 | this.save_widget = options.save_widget; |
|
65 | 66 | this.tooltip = new tooltip.Tooltip(this.events); |
|
66 | 67 | this.ws_url = options.ws_url; |
@@ -2120,21 +2121,7 b' define([' | |||
|
2120 | 2121 | }; |
|
2121 | 2122 | |
|
2122 | 2123 | Notebook.prototype.delete = function () { |
|
2123 | var that = this; | |
|
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); | |
|
2124 | this.content_manager.delete_notebook(this.notebook_name, this.notebook_path, this.base_url); | |
|
2138 | 2125 | }; |
|
2139 | 2126 | |
|
2140 | 2127 |
General Comments 0
You need to be logged in to leave comments.
Login now