Show More
@@ -1,322 +1,326 b'' | |||
|
1 | 1 | //---------------------------------------------------------------------------- |
|
2 | 2 | // Copyright (C) 2008-2011 The IPython Development Team |
|
3 | 3 | // |
|
4 | 4 | // Distributed under the terms of the BSD License. The full license is in |
|
5 | 5 | // the file COPYING, distributed as part of this software. |
|
6 | 6 | //---------------------------------------------------------------------------- |
|
7 | 7 | |
|
8 | 8 | //============================================================================ |
|
9 | 9 | // MenuBar |
|
10 | 10 | //============================================================================ |
|
11 | 11 | |
|
12 | 12 | /** |
|
13 | 13 | * @module IPython |
|
14 | 14 | * @namespace IPython |
|
15 | 15 | * @submodule MenuBar |
|
16 | 16 | */ |
|
17 | 17 | |
|
18 | 18 | |
|
19 | 19 | var IPython = (function (IPython) { |
|
20 | 20 | "use strict"; |
|
21 | 21 | |
|
22 | 22 | var utils = IPython.utils; |
|
23 | 23 | |
|
24 | 24 | /** |
|
25 | 25 | * A MenuBar Class to generate the menubar of IPython notebook |
|
26 | 26 | * @Class MenuBar |
|
27 | 27 | * |
|
28 | 28 | * @constructor |
|
29 | 29 | * |
|
30 | 30 | * |
|
31 | 31 | * @param selector {string} selector for the menubar element in DOM |
|
32 | 32 | * @param {object} [options] |
|
33 | 33 | * @param [options.baseProjectUrl] {String} String to use for the |
|
34 | 34 | * Base Project url, default would be to inspect |
|
35 | 35 | * $('body').data('baseProjectUrl'); |
|
36 | 36 | * does not support change for now is set through this option |
|
37 | 37 | */ |
|
38 | 38 | var MenuBar = function (selector, options) { |
|
39 | 39 | options = options || {}; |
|
40 | 40 | if (options.baseProjectUrl !== undefined) { |
|
41 | 41 | this._baseProjectUrl = options.baseProjectUrl; |
|
42 | 42 | } |
|
43 | 43 | this.selector = selector; |
|
44 | 44 | if (this.selector !== undefined) { |
|
45 | 45 | this.element = $(selector); |
|
46 | 46 | this.style(); |
|
47 | 47 | this.bind_events(); |
|
48 | 48 | } |
|
49 | 49 | }; |
|
50 | 50 | |
|
51 | 51 | MenuBar.prototype.baseProjectUrl = function(){ |
|
52 | 52 | return this._baseProjectUrl || $('body').data('baseProjectUrl'); |
|
53 | 53 | }; |
|
54 | 54 | |
|
55 | 55 | MenuBar.prototype.notebookPath = function() { |
|
56 | 56 | var path = $('body').data('notebookPath'); |
|
57 | 57 | path = decodeURIComponent(path); |
|
58 | 58 | return path; |
|
59 | 59 | }; |
|
60 | 60 | |
|
61 | 61 | MenuBar.prototype.style = function () { |
|
62 | 62 | this.element.addClass('border-box-sizing'); |
|
63 | 63 | this.element.find("li").click(function (event, ui) { |
|
64 | 64 | // The selected cell loses focus when the menu is entered, so we |
|
65 | 65 | // re-select it upon selection. |
|
66 | 66 | var i = IPython.notebook.get_selected_index(); |
|
67 | 67 | IPython.notebook.select(i); |
|
68 | 68 | } |
|
69 | 69 | ); |
|
70 | 70 | }; |
|
71 | 71 | |
|
72 | 72 | MenuBar.prototype._nbconvert = function (format, download) { |
|
73 | 73 | download = download || false; |
|
74 | 74 | var notebook_name = IPython.notebook.get_notebook_name(); |
|
75 | 75 | if (IPython.notebook.dirty) { |
|
76 | 76 | IPython.notebook.save_notebook({async : false}); |
|
77 | 77 | } |
|
78 | 78 | var url = utils.url_path_join( |
|
79 | 79 | this.baseProjectUrl(), |
|
80 | 80 | 'nbconvert', |
|
81 | 81 | format, |
|
82 | 82 | this.notebookPath(), |
|
83 | 83 | notebook_name + '.ipynb' |
|
84 | 84 | ) + "?download=" + download.toString(); |
|
85 | 85 | |
|
86 | 86 | if (download) { |
|
87 | 87 | window.location.assign(url); |
|
88 | 88 | } else { |
|
89 | 89 | window.open(url); |
|
90 | 90 | } |
|
91 | 91 | } |
|
92 | 92 | |
|
93 | 93 | MenuBar.prototype.bind_events = function () { |
|
94 | 94 | // File |
|
95 | 95 | var that = this; |
|
96 | 96 | this.element.find('#new_notebook').click(function () { |
|
97 | 97 | IPython.notebook.new_notebook(); |
|
98 | 98 | }); |
|
99 | 99 | this.element.find('#open_notebook').click(function () { |
|
100 | 100 | window.open(utils.url_path_join( |
|
101 | 101 | that.baseProjectUrl(), |
|
102 | 102 | 'tree', |
|
103 | 103 | that.notebookPath() |
|
104 | 104 | )); |
|
105 | 105 | }); |
|
106 | 106 | this.element.find('#copy_notebook').click(function () { |
|
107 | 107 | IPython.notebook.copy_notebook(); |
|
108 | 108 | return false; |
|
109 | 109 | }); |
|
110 | 110 | this.element.find('#download_ipynb').click(function () { |
|
111 | 111 | var notebook_name = IPython.notebook.get_notebook_name(); |
|
112 | 112 | if (IPython.notebook.dirty) { |
|
113 | 113 | IPython.notebook.save_notebook({async : false}); |
|
114 | 114 | } |
|
115 | 115 | |
|
116 | 116 | var url = utils.url_path_join( |
|
117 | 117 | that.baseProjectUrl(), |
|
118 | 118 | 'files', |
|
119 | 119 | that.notebookPath(), |
|
120 | 120 | notebook_name + '.ipynb' |
|
121 | 121 | ); |
|
122 | 122 | window.location.assign(url); |
|
123 | 123 | }); |
|
124 | 124 | |
|
125 | 125 | this.element.find('#print_preview').click(function () { |
|
126 | 126 | that._nbconvert('html', false); |
|
127 | 127 | }); |
|
128 | 128 | |
|
129 | 129 | this.element.find('#download_py').click(function () { |
|
130 | 130 | that._nbconvert('python', true); |
|
131 | 131 | }); |
|
132 | 132 | |
|
133 | 133 | this.element.find('#download_html').click(function () { |
|
134 | 134 | that._nbconvert('html', true); |
|
135 | 135 | }); |
|
136 | ||
|
136 | ||
|
137 | this.element.find('#download_rst').click(function () { | |
|
138 | that._nbconvert('rst', true); | |
|
139 | }); | |
|
140 | ||
|
137 | 141 | this.element.find('#rename_notebook').click(function () { |
|
138 | 142 | IPython.save_widget.rename_notebook(); |
|
139 | 143 | }); |
|
140 | 144 | this.element.find('#save_checkpoint').click(function () { |
|
141 | 145 | IPython.notebook.save_checkpoint(); |
|
142 | 146 | }); |
|
143 | 147 | this.element.find('#restore_checkpoint').click(function () { |
|
144 | 148 | }); |
|
145 | 149 | this.element.find('#kill_and_exit').click(function () { |
|
146 | 150 | IPython.notebook.session.delete(); |
|
147 | 151 | setTimeout(function(){ |
|
148 | 152 | // allow closing of new tabs in Chromium, impossible in FF |
|
149 | 153 | window.open('', '_self', ''); |
|
150 | 154 | window.close(); |
|
151 | 155 | }, 500); |
|
152 | 156 | }); |
|
153 | 157 | // Edit |
|
154 | 158 | this.element.find('#cut_cell').click(function () { |
|
155 | 159 | IPython.notebook.cut_cell(); |
|
156 | 160 | }); |
|
157 | 161 | this.element.find('#copy_cell').click(function () { |
|
158 | 162 | IPython.notebook.copy_cell(); |
|
159 | 163 | }); |
|
160 | 164 | this.element.find('#delete_cell').click(function () { |
|
161 | 165 | IPython.notebook.delete_cell(); |
|
162 | 166 | }); |
|
163 | 167 | this.element.find('#undelete_cell').click(function () { |
|
164 | 168 | IPython.notebook.undelete(); |
|
165 | 169 | }); |
|
166 | 170 | this.element.find('#split_cell').click(function () { |
|
167 | 171 | IPython.notebook.split_cell(); |
|
168 | 172 | }); |
|
169 | 173 | this.element.find('#merge_cell_above').click(function () { |
|
170 | 174 | IPython.notebook.merge_cell_above(); |
|
171 | 175 | }); |
|
172 | 176 | this.element.find('#merge_cell_below').click(function () { |
|
173 | 177 | IPython.notebook.merge_cell_below(); |
|
174 | 178 | }); |
|
175 | 179 | this.element.find('#move_cell_up').click(function () { |
|
176 | 180 | IPython.notebook.move_cell_up(); |
|
177 | 181 | }); |
|
178 | 182 | this.element.find('#move_cell_down').click(function () { |
|
179 | 183 | IPython.notebook.move_cell_down(); |
|
180 | 184 | }); |
|
181 | 185 | this.element.find('#select_previous').click(function () { |
|
182 | 186 | IPython.notebook.select_prev(); |
|
183 | 187 | }); |
|
184 | 188 | this.element.find('#select_next').click(function () { |
|
185 | 189 | IPython.notebook.select_next(); |
|
186 | 190 | }); |
|
187 | 191 | this.element.find('#edit_nb_metadata').click(function () { |
|
188 | 192 | IPython.notebook.edit_metadata(); |
|
189 | 193 | }); |
|
190 | 194 | |
|
191 | 195 | // View |
|
192 | 196 | this.element.find('#toggle_header').click(function () { |
|
193 | 197 | $('div#header').toggle(); |
|
194 | 198 | IPython.layout_manager.do_resize(); |
|
195 | 199 | }); |
|
196 | 200 | this.element.find('#toggle_toolbar').click(function () { |
|
197 | 201 | $('div#maintoolbar').toggle(); |
|
198 | 202 | IPython.layout_manager.do_resize(); |
|
199 | 203 | }); |
|
200 | 204 | // Insert |
|
201 | 205 | this.element.find('#insert_cell_above').click(function () { |
|
202 | 206 | IPython.notebook.insert_cell_above('code'); |
|
203 | 207 | }); |
|
204 | 208 | this.element.find('#insert_cell_below').click(function () { |
|
205 | 209 | IPython.notebook.insert_cell_below('code'); |
|
206 | 210 | }); |
|
207 | 211 | // Cell |
|
208 | 212 | this.element.find('#run_cell').click(function () { |
|
209 | 213 | IPython.notebook.execute_selected_cell(); |
|
210 | 214 | }); |
|
211 | 215 | this.element.find('#run_cell_in_place').click(function () { |
|
212 | 216 | IPython.notebook.execute_selected_cell({terminal:true}); |
|
213 | 217 | }); |
|
214 | 218 | this.element.find('#run_all_cells').click(function () { |
|
215 | 219 | IPython.notebook.execute_all_cells(); |
|
216 | 220 | }); |
|
217 | 221 | this.element.find('#run_all_cells_above').click(function () { |
|
218 | 222 | IPython.notebook.execute_cells_above(); |
|
219 | 223 | }); |
|
220 | 224 | this.element.find('#run_all_cells_below').click(function () { |
|
221 | 225 | IPython.notebook.execute_cells_below(); |
|
222 | 226 | }); |
|
223 | 227 | this.element.find('#to_code').click(function () { |
|
224 | 228 | IPython.notebook.to_code(); |
|
225 | 229 | }); |
|
226 | 230 | this.element.find('#to_markdown').click(function () { |
|
227 | 231 | IPython.notebook.to_markdown(); |
|
228 | 232 | }); |
|
229 | 233 | this.element.find('#to_raw').click(function () { |
|
230 | 234 | IPython.notebook.to_raw(); |
|
231 | 235 | }); |
|
232 | 236 | this.element.find('#to_heading1').click(function () { |
|
233 | 237 | IPython.notebook.to_heading(undefined, 1); |
|
234 | 238 | }); |
|
235 | 239 | this.element.find('#to_heading2').click(function () { |
|
236 | 240 | IPython.notebook.to_heading(undefined, 2); |
|
237 | 241 | }); |
|
238 | 242 | this.element.find('#to_heading3').click(function () { |
|
239 | 243 | IPython.notebook.to_heading(undefined, 3); |
|
240 | 244 | }); |
|
241 | 245 | this.element.find('#to_heading4').click(function () { |
|
242 | 246 | IPython.notebook.to_heading(undefined, 4); |
|
243 | 247 | }); |
|
244 | 248 | this.element.find('#to_heading5').click(function () { |
|
245 | 249 | IPython.notebook.to_heading(undefined, 5); |
|
246 | 250 | }); |
|
247 | 251 | this.element.find('#to_heading6').click(function () { |
|
248 | 252 | IPython.notebook.to_heading(undefined, 6); |
|
249 | 253 | }); |
|
250 | 254 | this.element.find('#toggle_output').click(function () { |
|
251 | 255 | IPython.notebook.toggle_output(); |
|
252 | 256 | }); |
|
253 | 257 | this.element.find('#collapse_all_output').click(function () { |
|
254 | 258 | IPython.notebook.collapse_all_output(); |
|
255 | 259 | }); |
|
256 | 260 | this.element.find('#scroll_all_output').click(function () { |
|
257 | 261 | IPython.notebook.scroll_all_output(); |
|
258 | 262 | }); |
|
259 | 263 | this.element.find('#expand_all_output').click(function () { |
|
260 | 264 | IPython.notebook.expand_all_output(); |
|
261 | 265 | }); |
|
262 | 266 | this.element.find('#clear_all_output').click(function () { |
|
263 | 267 | IPython.notebook.clear_all_output(); |
|
264 | 268 | }); |
|
265 | 269 | // Kernel |
|
266 | 270 | this.element.find('#int_kernel').click(function () { |
|
267 | 271 | IPython.notebook.session.interrupt_kernel(); |
|
268 | 272 | }); |
|
269 | 273 | this.element.find('#restart_kernel').click(function () { |
|
270 | 274 | IPython.notebook.restart_kernel(); |
|
271 | 275 | }); |
|
272 | 276 | // Help |
|
273 | 277 | this.element.find('#keyboard_shortcuts').click(function () { |
|
274 | 278 | IPython.quick_help.show_keyboard_shortcuts(); |
|
275 | 279 | }); |
|
276 | 280 | |
|
277 | 281 | this.update_restore_checkpoint(null); |
|
278 | 282 | |
|
279 | 283 | $([IPython.events]).on('checkpoints_listed.Notebook', function (event, data) { |
|
280 | 284 | that.update_restore_checkpoint(IPython.notebook.checkpoints); |
|
281 | 285 | }); |
|
282 | 286 | |
|
283 | 287 | $([IPython.events]).on('checkpoint_created.Notebook', function (event, data) { |
|
284 | 288 | that.update_restore_checkpoint(IPython.notebook.checkpoints); |
|
285 | 289 | }); |
|
286 | 290 | }; |
|
287 | 291 | |
|
288 | 292 | MenuBar.prototype.update_restore_checkpoint = function(checkpoints) { |
|
289 | 293 | var ul = this.element.find("#restore_checkpoint").find("ul"); |
|
290 | 294 | ul.empty(); |
|
291 | 295 | if (!checkpoints || checkpoints.length === 0) { |
|
292 | 296 | ul.append( |
|
293 | 297 | $("<li/>") |
|
294 | 298 | .addClass("disabled") |
|
295 | 299 | .append( |
|
296 | 300 | $("<a/>") |
|
297 | 301 | .text("No checkpoints") |
|
298 | 302 | ) |
|
299 | 303 | ); |
|
300 | 304 | return; |
|
301 | 305 | } |
|
302 | 306 | |
|
303 | 307 | checkpoints.map(function (checkpoint) { |
|
304 | 308 | var d = new Date(checkpoint.last_modified); |
|
305 | 309 | ul.append( |
|
306 | 310 | $("<li/>").append( |
|
307 | 311 | $("<a/>") |
|
308 | 312 | .attr("href", "#") |
|
309 | 313 | .text(d.format("mmm dd HH:MM:ss")) |
|
310 | 314 | .click(function () { |
|
311 | 315 | IPython.notebook.restore_checkpoint_dialog(checkpoint); |
|
312 | 316 | }) |
|
313 | 317 | ) |
|
314 | 318 | ); |
|
315 | 319 | }); |
|
316 | 320 | }; |
|
317 | 321 | |
|
318 | 322 | IPython.MenuBar = MenuBar; |
|
319 | 323 | |
|
320 | 324 | return IPython; |
|
321 | 325 | |
|
322 | 326 | }(IPython)); |
@@ -1,305 +1,306 b'' | |||
|
1 | 1 | {% extends "page.html" %} |
|
2 | 2 | |
|
3 | 3 | {% block stylesheet %} |
|
4 | 4 | |
|
5 | 5 | {% if mathjax_url %} |
|
6 | 6 | <script type="text/javascript" src="{{mathjax_url}}?config=TeX-AMS_HTML-full&delayStartupUntil=configured" charset="utf-8"></script> |
|
7 | 7 | {% endif %} |
|
8 | 8 | <script type="text/javascript"> |
|
9 | 9 | // MathJax disabled, set as null to distingish from *missing* MathJax, |
|
10 | 10 | // where it will be undefined, and should prompt a dialog later. |
|
11 | 11 | window.mathjax_url = "{{mathjax_url}}"; |
|
12 | 12 | </script> |
|
13 | 13 | |
|
14 | 14 | <link rel="stylesheet" href="{{ static_url("components/codemirror/lib/codemirror.css") }}"> |
|
15 | 15 | |
|
16 | 16 | {{super()}} |
|
17 | 17 | |
|
18 | 18 | <link rel="stylesheet" href="{{ static_url("notebook/css/override.css") }}" type="text/css" /> |
|
19 | 19 | |
|
20 | 20 | {% endblock %} |
|
21 | 21 | |
|
22 | 22 | {% block params %} |
|
23 | 23 | |
|
24 | 24 | data-project="{{project}}" |
|
25 | 25 | data-base-project-url="{{base_project_url}}" |
|
26 | 26 | data-base-kernel-url="{{base_kernel_url}}" |
|
27 | 27 | data-notebook-name="{{notebook_name}}" |
|
28 | 28 | data-notebook-path="{{notebook_path}}" |
|
29 | 29 | class="notebook_app" |
|
30 | 30 | |
|
31 | 31 | {% endblock %} |
|
32 | 32 | |
|
33 | 33 | |
|
34 | 34 | {% block header %} |
|
35 | 35 | |
|
36 | 36 | <span id="save_widget" class="nav pull-left"> |
|
37 | 37 | <span id="notebook_name"></span> |
|
38 | 38 | <span id="checkpoint_status"></span> |
|
39 | 39 | <span id="autosave_status"></span> |
|
40 | 40 | </span> |
|
41 | 41 | |
|
42 | 42 | {% endblock %} |
|
43 | 43 | |
|
44 | 44 | |
|
45 | 45 | {% block site %} |
|
46 | 46 | |
|
47 | 47 | <div id="menubar-container" class="container"> |
|
48 | 48 | <div id="menubar"> |
|
49 | 49 | <div class="navbar"> |
|
50 | 50 | <div class="navbar-inner"> |
|
51 | 51 | <div class="container"> |
|
52 | 52 | <ul id="menus" class="nav"> |
|
53 | 53 | <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">File</a> |
|
54 | 54 | <ul class="dropdown-menu"> |
|
55 | 55 | <li id="new_notebook" |
|
56 | 56 | title="Make a new notebook (Opens a new window)"> |
|
57 | 57 | <a href="#">New</a></li> |
|
58 | 58 | <li id="open_notebook" |
|
59 | 59 | title="Opens a new window with the Dashboard view"> |
|
60 | 60 | <a href="#">Open...</a></li> |
|
61 | 61 | <!-- <hr/> --> |
|
62 | 62 | <li class="divider"></li> |
|
63 | 63 | <li id="copy_notebook" |
|
64 | 64 | title="Open a copy of this notebook's contents and start a new kernel"> |
|
65 | 65 | <a href="#">Make a Copy...</a></li> |
|
66 | 66 | <li id="rename_notebook"><a href="#">Rename...</a></li> |
|
67 | 67 | <li id="save_checkpoint"><a href="#">Save and Checkpoint</a></li> |
|
68 | 68 | <!-- <hr/> --> |
|
69 | 69 | <li class="divider"></li> |
|
70 | 70 | <li id="restore_checkpoint" class="dropdown-submenu"><a href="#">Revert to Checkpoint</a> |
|
71 | 71 | <ul class="dropdown-menu"> |
|
72 | 72 | <li><a href="#"></a></li> |
|
73 | 73 | <li><a href="#"></a></li> |
|
74 | 74 | <li><a href="#"></a></li> |
|
75 | 75 | <li><a href="#"></a></li> |
|
76 | 76 | <li><a href="#"></a></li> |
|
77 | 77 | </ul> |
|
78 | 78 | </li> |
|
79 | 79 | <li class="divider"></li> |
|
80 | 80 | <li id="print_preview"><a href="#">Print Preview</a></li> |
|
81 | 81 | <li class="dropdown-submenu"><a href="#">Download as</a> |
|
82 | 82 | <ul class="dropdown-menu"> |
|
83 | 83 | <li id="download_ipynb"><a href="#">IPython Notebook (.ipynb)</a></li> |
|
84 | 84 | <li id="download_py"><a href="#">Python (.py)</a></li> |
|
85 | 85 | <li id="download_html"><a href="#">HTML (.html)</a></li> |
|
86 | <li id="download_rst"><a href="#">reST (.rst)</a></li> | |
|
86 | 87 | </ul> |
|
87 | 88 | </li> |
|
88 | 89 | <li class="divider"></li> |
|
89 | 90 | |
|
90 | 91 | <li id="kill_and_exit" |
|
91 | 92 | title="Shutdown this notebook's kernel, and close this window"> |
|
92 | 93 | <a href="#" >Close and halt</a></li> |
|
93 | 94 | </ul> |
|
94 | 95 | </li> |
|
95 | 96 | <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">Edit</a> |
|
96 | 97 | <ul class="dropdown-menu"> |
|
97 | 98 | <li id="cut_cell"><a href="#">Cut Cell</a></li> |
|
98 | 99 | <li id="copy_cell"><a href="#">Copy Cell</a></li> |
|
99 | 100 | <li id="paste_cell_above" class="disabled"><a href="#">Paste Cell Above</a></li> |
|
100 | 101 | <li id="paste_cell_below" class="disabled"><a href="#">Paste Cell Below</a></li> |
|
101 | 102 | <li id="paste_cell_replace" class="disabled"><a href="#">Paste Cell & Replace</a></li> |
|
102 | 103 | <li id="delete_cell"><a href="#">Delete Cell</a></li> |
|
103 | 104 | <li id="undelete_cell" class="disabled"><a href="#">Undo Delete Cell</a></li> |
|
104 | 105 | <li class="divider"></li> |
|
105 | 106 | <li id="split_cell"><a href="#">Split Cell</a></li> |
|
106 | 107 | <li id="merge_cell_above"><a href="#">Merge Cell Above</a></li> |
|
107 | 108 | <li id="merge_cell_below"><a href="#">Merge Cell Below</a></li> |
|
108 | 109 | <li class="divider"></li> |
|
109 | 110 | <li id="move_cell_up"><a href="#">Move Cell Up</a></li> |
|
110 | 111 | <li id="move_cell_down"><a href="#">Move Cell Down</a></li> |
|
111 | 112 | <li class="divider"></li> |
|
112 | 113 | <li id="select_previous"><a href="#">Select Previous Cell</a></li> |
|
113 | 114 | <li id="select_next"><a href="#">Select Next Cell</a></li> |
|
114 | 115 | <li class="divider"></li> |
|
115 | 116 | <li id="edit_nb_metadata"><a href="#">Edit Notebook Metadata</a></li> |
|
116 | 117 | </ul> |
|
117 | 118 | </li> |
|
118 | 119 | <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">View</a> |
|
119 | 120 | <ul class="dropdown-menu"> |
|
120 | 121 | <li id="toggle_header" |
|
121 | 122 | title="Show/Hide the IPython Notebook logo and notebook title (above menu bar)"> |
|
122 | 123 | <a href="#">Toggle Header</a></li> |
|
123 | 124 | <li id="toggle_toolbar" |
|
124 | 125 | title="Show/Hide the action icons (below menu bar)"> |
|
125 | 126 | <a href="#">Toggle Toolbar</a></li> |
|
126 | 127 | </ul> |
|
127 | 128 | </li> |
|
128 | 129 | <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">Insert</a> |
|
129 | 130 | <ul class="dropdown-menu"> |
|
130 | 131 | <li id="insert_cell_above" |
|
131 | 132 | title="Insert an empty Code cell above the currently active cell"> |
|
132 | 133 | <a href="#">Insert Cell Above</a></li> |
|
133 | 134 | <li id="insert_cell_below" |
|
134 | 135 | title="Insert an empty Code cell below the currently active cell"> |
|
135 | 136 | <a href="#">Insert Cell Below</a></li> |
|
136 | 137 | </ul> |
|
137 | 138 | </li> |
|
138 | 139 | <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">Cell</a> |
|
139 | 140 | <ul class="dropdown-menu"> |
|
140 | 141 | <li id="run_cell" title="Run this cell, and move cursor to the next one"> |
|
141 | 142 | <a href="#">Run</a></li> |
|
142 | 143 | <li id="run_cell_in_place" title="Run this cell, without moving to the next one"> |
|
143 | 144 | <a href="#">Run in Place</a></li> |
|
144 | 145 | <li id="run_all_cells" title="Run all cells in the notebook"> |
|
145 | 146 | <a href="#">Run All</a></li> |
|
146 | 147 | <li id="run_all_cells_above" title="Run all cells above (but not including) this cell"> |
|
147 | 148 | <a href="#">Run All Above</a></li> |
|
148 | 149 | <li id="run_all_cells_below" title="Run this cell and all cells below it"> |
|
149 | 150 | <a href="#">Run All Below</a></li> |
|
150 | 151 | <li class="divider"></li> |
|
151 | 152 | <li id="change_cell_type" class="dropdown-submenu" |
|
152 | 153 | title="All cells in the notebook have a cell type. By default, new cells are created as 'Code' cells"> |
|
153 | 154 | <a href="#">Cell Type</a> |
|
154 | 155 | <ul class="dropdown-menu"> |
|
155 | 156 | <li id="to_code" |
|
156 | 157 | title="Contents will be sent to the kernel for execution, and output will display in the footer of cell"> |
|
157 | 158 | <a href="#">Code</a></li> |
|
158 | 159 | <li id="to_markdown" |
|
159 | 160 | title="Contents will be rendered as HTML and serve as explanatory text"> |
|
160 | 161 | <a href="#">Markdown</a></li> |
|
161 | 162 | <li id="to_raw" |
|
162 | 163 | title="Contents will pass through nbconvert unmodified"> |
|
163 | 164 | <a href="#">Raw NBConvert</a></li> |
|
164 | 165 | <li id="to_heading1"><a href="#">Heading 1</a></li> |
|
165 | 166 | <li id="to_heading2"><a href="#">Heading 2</a></li> |
|
166 | 167 | <li id="to_heading3"><a href="#">Heading 3</a></li> |
|
167 | 168 | <li id="to_heading4"><a href="#">Heading 4</a></li> |
|
168 | 169 | <li id="to_heading5"><a href="#">Heading 5</a></li> |
|
169 | 170 | <li id="to_heading6"><a href="#">Heading 6</a></li> |
|
170 | 171 | </ul> |
|
171 | 172 | </li> |
|
172 | 173 | <li class="divider"></li> |
|
173 | 174 | <li id="toggle_output" |
|
174 | 175 | title="Show/Hide the output portion of a Code cell"> |
|
175 | 176 | <a href="#">Toggle Current Output</a></li> |
|
176 | 177 | <li id="all_outputs" class="dropdown-submenu"><a href="#">All Output</a> |
|
177 | 178 | <ul class="dropdown-menu"> |
|
178 | 179 | <li id="expand_all_output"><a href="#">Expand</a></li> |
|
179 | 180 | <li id="scroll_all_output"><a href="#">Scroll Long</a></li> |
|
180 | 181 | <li id="collapse_all_output"><a href="#">Collapse</a></li> |
|
181 | 182 | <li id="clear_all_output" |
|
182 | 183 | title="Remove the output portion of all Code cells"> |
|
183 | 184 | <a href="#">Clear</a></li> |
|
184 | 185 | </ul> |
|
185 | 186 | </li> |
|
186 | 187 | </ul> |
|
187 | 188 | </li> |
|
188 | 189 | <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">Kernel</a> |
|
189 | 190 | <ul class="dropdown-menu"> |
|
190 | 191 | <li id="int_kernel" |
|
191 | 192 | title="Send KeyboardInterrupt (CTRL-C) to the Kernel"> |
|
192 | 193 | <a href="#">Interrupt</a></li> |
|
193 | 194 | <li id="restart_kernel" |
|
194 | 195 | title="Restart the Kernel"> |
|
195 | 196 | <a href="#">Restart</a></li> |
|
196 | 197 | </ul> |
|
197 | 198 | </li> |
|
198 | 199 | <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">Help</a> |
|
199 | 200 | <ul class="dropdown-menu" title="Opens in a new window"> |
|
200 | 201 | <li><a href="http://ipython.org/documentation.html" target="_blank">IPython Help</a></li> |
|
201 | 202 | <li><a href="http://ipython.org/ipython-doc/stable/interactive/notebook.html" target="_blank">Notebook Help</a></li> |
|
202 | 203 | <li id="keyboard_shortcuts" title="Opens a tooltip with all keyboard shortcuts"><a href="#">Keyboard Shortcuts</a></li> |
|
203 | 204 | <li><a href="http://ipython.org/ipython-doc/dev/interactive/cm_keyboard.html" target="_blank">Editor Shortcuts</a></li> |
|
204 | 205 | <li class="divider"></li> |
|
205 | 206 | <li><a href="http://docs.python.org" target="_blank">Python</a></li> |
|
206 | 207 | <li><a href="http://docs.scipy.org/doc/numpy/reference/" target="_blank">NumPy</a></li> |
|
207 | 208 | <li><a href="http://docs.scipy.org/doc/scipy/reference/" target="_blank">SciPy</a></li> |
|
208 | 209 | <li><a href="http://matplotlib.org/" target="_blank">Matplotlib</a></li> |
|
209 | 210 | <li><a href="http://docs.sympy.org/dev/index.html" target="_blank">SymPy</a></li> |
|
210 | 211 | <li><a href="http://pandas.pydata.org/pandas-docs/stable/" target="_blank">pandas</a></li> |
|
211 | 212 | </ul> |
|
212 | 213 | </li> |
|
213 | 214 | </ul> |
|
214 | 215 | <div id="notification_area"></div> |
|
215 | 216 | </div> |
|
216 | 217 | </div> |
|
217 | 218 | </div> |
|
218 | 219 | </div> |
|
219 | 220 | <div id="maintoolbar" class="navbar"> |
|
220 | 221 | <div class="toolbar-inner navbar-inner navbar-nobg"> |
|
221 | 222 | <div id="maintoolbar-container" class="container"></div> |
|
222 | 223 | </div> |
|
223 | 224 | </div> |
|
224 | 225 | </div> |
|
225 | 226 | |
|
226 | 227 | <div id="ipython-main-app"> |
|
227 | 228 | |
|
228 | 229 | <div id="notebook_panel"> |
|
229 | 230 | <div id="notebook"></div> |
|
230 | 231 | <div id="pager_splitter"></div> |
|
231 | 232 | <div id="pager"> |
|
232 | 233 | <div id='pager_button_area'> |
|
233 | 234 | </div> |
|
234 | 235 | <div id="pager-container" class="container"></div> |
|
235 | 236 | </div> |
|
236 | 237 | </div> |
|
237 | 238 | |
|
238 | 239 | </div> |
|
239 | 240 | <div id='tooltip' class='ipython_tooltip' style='display:none'></div> |
|
240 | 241 | |
|
241 | 242 | |
|
242 | 243 | {% endblock %} |
|
243 | 244 | |
|
244 | 245 | |
|
245 | 246 | {% block script %} |
|
246 | 247 | |
|
247 | 248 | {{super()}} |
|
248 | 249 | |
|
249 | 250 | <script src="{{ static_url("components/codemirror/lib/codemirror.js") }}" charset="utf-8"></script> |
|
250 | 251 | <script type="text/javascript"> |
|
251 | 252 | CodeMirror.modeURL = "{{ static_url("components/codemirror/mode/%N/%N.js") }}"; |
|
252 | 253 | </script> |
|
253 | 254 | <script src="{{ static_url("components/codemirror/addon/mode/loadmode.js") }}" charset="utf-8"></script> |
|
254 | 255 | <script src="{{ static_url("components/codemirror/addon/mode/multiplex.js") }}" charset="utf-8"></script> |
|
255 | 256 | <script src="{{ static_url("components/codemirror/addon/mode/overlay.js") }}" charset="utf-8"></script> |
|
256 | 257 | <script src="{{ static_url("components/codemirror/addon/edit/matchbrackets.js") }}" charset="utf-8"></script> |
|
257 | 258 | <script src="{{ static_url("components/codemirror/addon/comment/comment.js") }}" charset="utf-8"></script> |
|
258 | 259 | <script src="{{ static_url("components/codemirror/mode/htmlmixed/htmlmixed.js") }}" charset="utf-8"></script> |
|
259 | 260 | <script src="{{ static_url("components/codemirror/mode/xml/xml.js") }}" charset="utf-8"></script> |
|
260 | 261 | <script src="{{ static_url("components/codemirror/mode/javascript/javascript.js") }}" charset="utf-8"></script> |
|
261 | 262 | <script src="{{ static_url("components/codemirror/mode/css/css.js") }}" charset="utf-8"></script> |
|
262 | 263 | <script src="{{ static_url("components/codemirror/mode/rst/rst.js") }}" charset="utf-8"></script> |
|
263 | 264 | <script src="{{ static_url("components/codemirror/mode/markdown/markdown.js") }}" charset="utf-8"></script> |
|
264 | 265 | <script src="{{ static_url("components/codemirror/mode/gfm/gfm.js") }}" charset="utf-8"></script> |
|
265 | 266 | <script src="{{ static_url("components/codemirror/mode/python/python.js") }}" charset="utf-8"></script> |
|
266 | 267 | <script src="{{ static_url("notebook/js/codemirror-ipython.js") }}" charset="utf-8"></script> |
|
267 | 268 | |
|
268 | 269 | <script src="{{ static_url("components/highlight.js/build/highlight.pack.js") }}" charset="utf-8"></script> |
|
269 | 270 | |
|
270 | 271 | <script src="{{ static_url("dateformat/date.format.js") }}" charset="utf-8"></script> |
|
271 | 272 | |
|
272 | 273 | <script src="{{ static_url("base/js/events.js") }}" type="text/javascript" charset="utf-8"></script> |
|
273 | 274 | <script src="{{ static_url("base/js/utils.js") }}" type="text/javascript" charset="utf-8"></script> |
|
274 | 275 | <script src="{{ static_url("base/js/dialog.js") }}" type="text/javascript" charset="utf-8"></script> |
|
275 | 276 | <script src="{{ static_url("services/kernels/js/kernel.js") }}" type="text/javascript" charset="utf-8"></script> |
|
276 | 277 | <script src="{{ static_url("services/kernels/js/comm.js") }}" type="text/javascript" charset="utf-8"></script> |
|
277 | 278 | <script src="{{ static_url("services/sessions/js/session.js") }}" type="text/javascript" charset="utf-8"></script> |
|
278 | 279 | <script src="{{ static_url("notebook/js/layoutmanager.js") }}" type="text/javascript" charset="utf-8"></script> |
|
279 | 280 | <script src="{{ static_url("notebook/js/mathjaxutils.js") }}" type="text/javascript" charset="utf-8"></script> |
|
280 | 281 | <script src="{{ static_url("notebook/js/outputarea.js") }}" type="text/javascript" charset="utf-8"></script> |
|
281 | 282 | <script src="{{ static_url("notebook/js/cell.js") }}" type="text/javascript" charset="utf-8"></script> |
|
282 | 283 | <script src="{{ static_url("notebook/js/celltoolbar.js") }}" type="text/javascript" charset="utf-8"></script> |
|
283 | 284 | <script src="{{ static_url("notebook/js/codecell.js") }}" type="text/javascript" charset="utf-8"></script> |
|
284 | 285 | <script src="{{ static_url("notebook/js/completer.js") }}" type="text/javascript" charset="utf-8"></script> |
|
285 | 286 | <script src="{{ static_url("notebook/js/textcell.js") }}" type="text/javascript" charset="utf-8"></script> |
|
286 | 287 | <script src="{{ static_url("notebook/js/savewidget.js") }}" type="text/javascript" charset="utf-8"></script> |
|
287 | 288 | <script src="{{ static_url("notebook/js/quickhelp.js") }}" type="text/javascript" charset="utf-8"></script> |
|
288 | 289 | <script src="{{ static_url("notebook/js/pager.js") }}" type="text/javascript" charset="utf-8"></script> |
|
289 | 290 | <script src="{{ static_url("notebook/js/menubar.js") }}" type="text/javascript" charset="utf-8"></script> |
|
290 | 291 | <script src="{{ static_url("notebook/js/toolbar.js") }}" type="text/javascript" charset="utf-8"></script> |
|
291 | 292 | <script src="{{ static_url("notebook/js/maintoolbar.js") }}" type="text/javascript" charset="utf-8"></script> |
|
292 | 293 | <script src="{{ static_url("notebook/js/notebook.js") }}" type="text/javascript" charset="utf-8"></script> |
|
293 | 294 | <script src="{{ static_url("notebook/js/notificationwidget.js") }}" type="text/javascript" charset="utf-8"></script> |
|
294 | 295 | <script src="{{ static_url("notebook/js/notificationarea.js") }}" type="text/javascript" charset="utf-8"></script> |
|
295 | 296 | <script src="{{ static_url("notebook/js/tooltip.js") }}" type="text/javascript" charset="utf-8"></script> |
|
296 | 297 | <script src="{{ static_url("notebook/js/config.js") }}" type="text/javascript" charset="utf-8"></script> |
|
297 | 298 | <script src="{{ static_url("notebook/js/main.js") }}" type="text/javascript" charset="utf-8"></script> |
|
298 | 299 | |
|
299 | 300 | <script src="{{ static_url("notebook/js/contexthint.js") }}" charset="utf-8"></script> |
|
300 | 301 | |
|
301 | 302 | <script src="{{ static_url("notebook/js/celltoolbarpresets/default.js") }}" type="text/javascript" charset="utf-8"></script> |
|
302 | 303 | <script src="{{ static_url("notebook/js/celltoolbarpresets/rawcell.js") }}" type="text/javascript" charset="utf-8"></script> |
|
303 | 304 | <script src="{{ static_url("notebook/js/celltoolbarpresets/slideshow.js") }}" type="text/javascript" charset="utf-8"></script> |
|
304 | 305 | |
|
305 | 306 | {% endblock %} |
General Comments 0
You need to be logged in to leave comments.
Login now