##// END OF EJS Templates
notebook: config section UI...
Matthias BUSSONNIER -
Show More
@@ -1,436 +1,441 b''
1 1 /**
2 2 * Primary styles
3 3 *
4 4 * Author: IPython Development Team
5 5 */
6 6
7 7
8 8 body {
9 9 background-color: white;
10 10 /* This makes sure that the body covers the entire window and needs to
11 11 be in a different element than the display: box in wrapper below */
12 12 position: absolute;
13 13 left: 0px;
14 14 right: 0px;
15 15 top: 0px;
16 16 bottom: 0px;
17 17 overflow: hidden;
18 18 }
19 19
20 20 span#save_widget {
21 21 position: static;
22 22 left: 0px;
23 23 padding: 5px 0px;
24 24 margin: 0px 0px 0px 0px;
25 25 }
26 26
27 27 span#quick_help_area {
28 28 position: static;
29 29 padding: 5px 0px;
30 30 margin: 0px 0px 0px 0px;
31 31 }
32 32
33 33 input#notebook_name {
34 34 height: 1em;
35 35 line-height: 1em;
36 36 padding: 5px;
37 37 }
38 38
39 39 span#kernel_status {
40 40 position: absolute;
41 41 padding: 8px 5px 5px 5px;
42 42 right: 10px;
43 43 font-weight: bold;
44 44 }
45 45
46 46
47 47 .status_idle {
48 48 color: gray;
49 49 visibility: hidden;
50 50 }
51 51
52 52 .status_busy {
53 53 color: red;
54 54 }
55 55
56 56 .status_restarting {
57 57 color: black;
58 58 }
59 59
60 60 div#left_panel {
61 61 overflow-y: auto;
62 62 top: 0px;
63 63 left: 0px;
64 64 margin: 0px;
65 65 padding: 0px;
66 66 position: absolute;
67 67 }
68 68
69 69 div.section_header {
70 70 padding: 5px;
71 71 }
72 72
73 73 div.section_header h3 {
74 74 display: inline;
75 75 }
76 76
77 77 div.section_content {
78 78 padding: 5px;
79 79 }
80 80
81 81 span.section_row_buttons button {
82 82 width: 70px;
83 83 }
84 84
85 85 span.section_row_buttons a {
86 86 width: 70px;
87 87 }
88 88
89 89 .section_row {
90 90 margin: 5px 0px;
91 91 }
92 92
93 93 .section_row_buttons {
94 94 float: right;
95 95 }
96 96
97 97 #kernel_persist {
98 98 float: right;
99 99 }
100 100
101 101 .help_string {
102 102 float: right;
103 103 width: 170px;
104 104 padding: 0px 5px;
105 105 text-align: left;
106 106 font-size: 85%;
107 107 }
108 108
109 109 .help_string_label {
110 110 float: right;
111 111 font-size: 85%;
112 112 }
113 113
114 114 #autoindent_span {
115 115 float: right;
116 116 }
117 117
118 #timebeforetooltip{
119 margin-top:-3px;
120 text-align:right;
121 }
122
118 123 #timebeforetooltip_span {
119 124 float: right;
120 125 }
121 126
122 127 #tooltipontab_span {
123 128 float: right;
124 129 }
125 130
126 131 #smartcompleter_span {
127 132 float: right;
128 133 }
129 134
130 135 .checkbox_label {
131 136 font-size: 85%;
132 137 float: right;
133 138 padding: 0.3em;
134 139 }
135 140
136 141 .section_row_header {
137 142 float: left;
138 143 font-size: 85%;
139 144 padding: 0.4em 0em;
140 145 font-weight: bold;
141 146 }
142 147
143 148 span.button_label {
144 149 padding: 0.2em 1em;
145 150 font-size: 77%;
146 151 float: right;
147 152 }
148 153
149 154 /* This is needed because FF was adding a 2px margin top and bottom. */
150 155 .section_row .ui-button {
151 156 margin-top: 0px;
152 157 margin-bottom: 0px;
153 158 }
154 159
155 160 #download_format {
156 161 float: right;
157 162 font-size: 85%;
158 163 width: 62px;
159 164 margin: 1px 5px;
160 165 }
161 166
162 167 div#left_panel_splitter {
163 168 width: 8px;
164 169 top: 0px;
165 170 left: 202px;
166 171 margin: 0px;
167 172 padding: 0px;
168 173 position: absolute;
169 174 }
170 175
171 176 div#notebook_panel {
172 177 /* The L margin will be set in the Javascript code*/
173 178 margin: 0px 0px 0px 0px;
174 179 padding: 0px;
175 180 }
176 181
177 182 div#notebook {
178 183 overflow-y: scroll;
179 184 overflow-x: auto;
180 185 width: 100%;
181 186 /* This spaces the cell away from the edge of the notebook area */
182 187 padding: 5px 5px 15px 5px;
183 188 margin: 0px
184 189 background-color: white;
185 190 }
186 191
187 192 div#pager_splitter {
188 193 height: 8px;
189 194 }
190 195
191 196 div#pager {
192 197 padding: 15px;
193 198 overflow: auto;
194 199 }
195 200
196 201 div.cell {
197 202 width: 100%;
198 203 padding: 5px 5px 5px 0px;
199 204 /* This acts as a spacer between cells, that is outside the border */
200 205 margin: 2px 0px 2px 0px;
201 206 }
202 207
203 208 div.code_cell {
204 209 background-color: white;
205 210 }
206 211 /* any special styling for code cells that are currently running goes here */
207 212 div.code_cell.running {
208 213 }
209 214
210 215 div.prompt {
211 216 /* This needs to be wide enough for 3 digit prompt numbers: In[100]: */
212 217 width: 11ex;
213 218 /* This 0.4em is tuned to match the padding on the CodeMirror editor. */
214 219 padding: 0.4em;
215 220 margin: 0px;
216 221 font-family: monospace;
217 222 text-align:right;
218 223 }
219 224
220 225 div.input {
221 226 page-break-inside: avoid;
222 227 }
223 228
224 229 /* input_area and input_prompt must match in top border and margin for alignment */
225 230 div.input_area {
226 231 color: black;
227 232 border: 1px solid #ddd;
228 233 border-radius: 3px;
229 234 background: #f7f7f7;
230 235 }
231 236
232 237 div.input_prompt {
233 238 color: navy;
234 239 border-top: 1px solid transparent;
235 240 }
236 241
237 242 div.output {
238 243 /* This is a spacer between the input and output of each cell */
239 244 margin-top: 5px;
240 245 }
241 246
242 247 div.output_prompt {
243 248 color: darkred;
244 249 }
245 250
246 251 /* This class is the outer container of all output sections. */
247 252 div.output_area {
248 253 padding: 0px;
249 254 page-break-inside: avoid;
250 255 }
251 256
252 257 /* This class is for the output subarea inside the output_area and after
253 258 the prompt div. */
254 259 div.output_subarea {
255 260 padding: 0.4em 6.1em 0.4em 0.4em;
256 261 }
257 262
258 263 /* The rest of the output_* classes are for special styling of the different
259 264 output types */
260 265
261 266 /* all text output has this class: */
262 267 div.output_text {
263 268 text-align: left;
264 269 color: black;
265 270 font-family: monospace;
266 271 }
267 272
268 273 /* stdout/stderr are 'text' as well as 'stream', but pyout/pyerr are *not* streams */
269 274 div.output_stream {
270 275 padding-top: 0.0em;
271 276 padding-bottom: 0.0em;
272 277 }
273 278 div.output_stdout {
274 279 }
275 280 div.output_stderr {
276 281 background: #fdd; /* very light red background for stderr */
277 282 }
278 283
279 284 div.output_latex {
280 285 text-align: left;
281 286 color: black;
282 287 }
283 288
284 289 div.output_html {
285 290 }
286 291
287 292 div.output_png {
288 293 }
289 294
290 295 div.output_jpeg {
291 296 }
292 297
293 298 div.text_cell {
294 299 background-color: white;
295 300 }
296 301
297 302 div.text_cell_input {
298 303 color: black;
299 304 }
300 305
301 306 div.text_cell_render {
302 307 font-family: "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
303 308 outline: none;
304 309 resize: none;
305 310 width: inherit;
306 311 border-style: none;
307 312 padding: 5px;
308 313 color: black;
309 314 }
310 315
311 316 .CodeMirror {
312 317 line-height: 1.231; /* Changed from 1em to our global default */
313 318 }
314 319
315 320 .CodeMirror-scroll {
316 321 height: auto; /* Changed to auto to autogrow */
317 322 /* The CodeMirror docs are a bit fuzzy on if overflow-y should be hidden or visible.*/
318 323 /* We have found that if it is visible, vertical scrollbars appear with font size changes.*/
319 324 overflow-y: hidden;
320 325 overflow-x: auto; /* Changed from auto to remove scrollbar */
321 326 }
322 327
323 328 /* CSS font colors for translated ANSI colors. */
324 329
325 330
326 331 .ansiblack {color: black;}
327 332 .ansired {color: darkred;}
328 333 .ansigreen {color: darkgreen;}
329 334 .ansiyellow {color: brown;}
330 335 .ansiblue {color: darkblue;}
331 336 .ansipurple {color: darkviolet;}
332 337 .ansicyan {color: steelblue;}
333 338 .ansigrey {color: grey;}
334 339 .ansibold {font-weight: bold;}
335 340
336 341 .completions , .tooltip{
337 342 position: absolute;
338 343 z-index: 10;
339 344 overflow: auto;
340 345 border: 1px solid black;
341 346 }
342 347
343 348 .completions select {
344 349 background: white;
345 350 outline: none;
346 351 border: none;
347 352 padding: 0px;
348 353 margin: 0px;
349 354 font-family: monospace;
350 355 }
351 356
352 357 @-moz-keyframes fadeIn {
353 358 from {opacity:0;}
354 359 to {opacity:1;}
355 360 }
356 361
357 362 @-webkit-keyframes fadeIn {
358 363 from {opacity:0;}
359 364 to {opacity:1;}
360 365 }
361 366
362 367 @keyframes fadeIn {
363 368 from {opacity:0;}
364 369 to {opacity:1;}
365 370 }
366 371
367 372 /*"close" "expand" and "Open in pager button" of
368 373 /* the tooltip*/
369 374 .tooltip a{
370 375 float:right;
371 376 }
372 377
373 378 /*properties of tooltip after "expand"*/
374 379 .bigtooltip{
375 380 height:30%;
376 381 }
377 382
378 383 /*properties of tooltip before "expand"*/
379 384 .smalltooltip{
380 385 text-overflow: ellipsis;
381 386 overflow: hidden;
382 387 height:15%;
383 388 }
384 389
385 390 .tooltip{
386 391 /*transition when "expand"ing tooltip */
387 392 -webkit-transition-property: height;
388 393 -webkit-transition-duration: 1s;
389 394 -moz-transition-property: height;
390 395 -moz-transition-duration: 1s;
391 396 transition-property: height;
392 397 transition-duration: 1s;
393 398 max-width:700px;
394 399 border-radius: 0px 10px 10px 10px;
395 400 box-shadow: 3px 3px 5px #999;
396 401 /*fade-in animation when inserted*/
397 402 -webkit-animation: fadeIn 200ms;
398 403 -moz-animation: fadeIn 200ms;
399 404 animation: fadeIn 200ms;
400 405 vertical-align: middle;
401 406 background: #FDFDD8;
402 407 outline: none;
403 408 padding: 3px;
404 409 margin: 0px;
405 410 font-family: monospace;
406 411 min-height:50px;
407 412 }
408 413
409 414 .completions p{
410 415 background: #DDF;
411 416 /*outline: none;
412 417 padding: 0px;*/
413 418 border-bottom: black solid 1px;
414 419 padding: 1px;
415 420 font-family: monospace;
416 421 }
417 422
418 423 @media print {
419 424 body { overflow: visible !important; }
420 425 .ui-widget-content { border: 0px; }
421 426 }
422 427
423 428 .shortcut_key {
424 429 display: inline-block;
425 430 width: 13ex;
426 431 text-align: right;
427 432 font-family: monospace;
428 433 }
429 434
430 435 .shortcut_descr {
431 436 }
432 437
433 438 /* Word-wrap output correctly. This is the CSS3 spelling, though Firefox seems
434 439 to not honor it correctly. Webkit browsers (Chrome, rekonq, Safari) do.
435 440 */
436 441 pre, code, kbd, samp { white-space: pre-wrap; }
@@ -1,333 +1,334 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 // PanelSection
10 10 //============================================================================
11 11
12 12 var IPython = (function (IPython) {
13 13
14 14 var utils = IPython.utils;
15 15
16 16 // Base PanelSection class
17 17
18 18 var PanelSection = function (selector) {
19 19 this.selector = selector;
20 20 if (this.selector !== undefined) {
21 21 this.element = $(selector);
22 22 this.header = this.element.find('div.section_header');
23 23 this.content = this.element.find('div.section_content');
24 24 this.style();
25 25 this.bind_events();
26 26 }
27 27 this.expanded = true;
28 28 };
29 29
30 30
31 31 PanelSection.prototype.style = function () {
32 32 this.header.addClass('ui-widget ui-state-default ui-helper-clearfix');
33 33 this.header.attr('title', "Click to Show/Hide Section");
34 34 this.content.addClass('ui-widget section_content');
35 35 };
36 36
37 37
38 38 PanelSection.prototype.bind_events = function () {
39 39 var that = this;
40 40 this.header.click(function () {
41 41 that.toggle();
42 42 });
43 43 this.header.hover(function () {
44 44 that.header.toggleClass('ui-state-hover');
45 45 });
46 46 };
47 47
48 48
49 49 PanelSection.prototype.expand = function () {
50 50 if (!this.expanded) {
51 51 this.content.slideDown('fast');
52 52 this.expanded = true;
53 53 };
54 54 };
55 55
56 56
57 57 PanelSection.prototype.collapse = function () {
58 58 if (this.expanded) {
59 59 this.content.slideUp('fast');
60 60 this.expanded = false;
61 61 };
62 62 };
63 63
64 64
65 65 PanelSection.prototype.toggle = function () {
66 66 if (this.expanded === true) {
67 67 this.collapse();
68 68 } else {
69 69 this.expand();
70 70 };
71 71 };
72 72
73 73
74 74 PanelSection.prototype.create_children = function () {};
75 75
76 76
77 77 // NotebookSection
78 78
79 79 var NotebookSection = function () {
80 80 PanelSection.apply(this, arguments);
81 81 };
82 82
83 83
84 84 NotebookSection.prototype = new PanelSection();
85 85
86 86
87 87 NotebookSection.prototype.style = function () {
88 88 PanelSection.prototype.style.apply(this);
89 89 this.content.addClass('ui-helper-clearfix');
90 90 this.content.find('div.section_row').addClass('ui-helper-clearfix');
91 91 this.content.find('#new_open').buttonset();
92 92 this.content.find('#new_notebook').attr('title', "Create a new notebook");
93 93 this.content.find('#open_notebook').attr('title', "Open an existing notebook");
94 94 this.content.find('#download_notebook').button();
95 95 this.content.find('#download_notebook').attr('title',
96 96 "Download the notebook in the specified format," +
97 97 " either full ipynb notebook or as a Python script." +
98 98 " Make sure to save before downloading, to ensure the file is up to date."
99 99 );
100 100 // upload notebook doesn't exist:
101 101 this.content.find('#upload_notebook').button();
102 102 this.content.find('#download_format').addClass('ui-widget ui-widget-content');
103 103 this.content.find('#download_format option').addClass('ui-widget ui-widget-content');
104 104 };
105 105
106 106
107 107 NotebookSection.prototype.bind_events = function () {
108 108 PanelSection.prototype.bind_events.apply(this);
109 109 var that = this;
110 110 this.content.find('#new_notebook').click(function () {
111 111 window.open($('body').data('baseProjectUrl')+'new');
112 112 });
113 113 this.content.find('#open_notebook').click(function () {
114 114 window.open($('body').data('baseProjectUrl'));
115 115 });
116 116 this.content.find('#download_notebook').click(function () {
117 117 var format = that.content.find('#download_format').val();
118 118 var notebook_id = IPython.save_widget.get_notebook_id();
119 119 var url = $('body').data('baseProjectUrl') + 'notebooks/' + notebook_id + '?format=' + format;
120 120 window.open(url,'_newtab');
121 121 });
122 122 };
123 123
124 124 // ConfigSection
125 125
126 126 var ConfigSection = function () {
127 127 PanelSection.apply(this, arguments);
128 128 };
129 129
130 130 ConfigSection.prototype = new PanelSection();
131 131
132 132 ConfigSection.prototype.style = function () {
133 133 PanelSection.prototype.style.apply(this);
134 134 this.content.addClass('ui-helper-clearfix');
135 135 this.content.find('div.section_row').addClass('ui-helper-clearfix');
136 136
137 137 this.content.find('#tooltipontab').attr('title', 'Show tooltip if you press <Tab> after "(" or a white space');
138 138 this.content.find('#tooltipontab_label').attr('title', 'Show Tooltip when pressing Tab');
139 139
140 this.content.find('#timebeforetooltip').addClass("ui-widget ui-widget-content");
140 141 this.content.find('#timebeforetooltip').attr('title', 'Time before a tooltip auto-appear when "(" is pressed (negative value supress tooltip)');
141 142 this.content.find('#timebeforetooltip_label').attr('title', 'Time before a tooltip auto-appear when "(" is pressed (negative value supress tooltip)');
142 143
143 144 this.content.find('#smartcompleter').attr('title', 'When inside function call, completer try to propose kwargs first');
144 145 this.content.find('#smartcompleter_label').attr('title', 'When inside function call, completer try to propose kwargs first');
145 146 };
146 147
147 148
148 149 ConfigSection.prototype.bind_events = function () {
149 150 PanelSection.prototype.bind_events.apply(this);
150 151 this.content.find('#tooltipontab').change(function () {
151 152 var state = $('#tooltipontab').prop('checked');
152 153 IPython.notebook.set_tooltipontab(state);
153 154 });
154 155 this.content.find('#timebeforetooltip').change(function () {
155 156 var state = $('#timebeforetooltip').prop('value');
156 157 IPython.notebook.set_timebeforetooltip(state);
157 158 });
158 159 this.content.find('#smartcompleter').change(function () {
159 160 var state = $('#smartcompleter').prop('checked');
160 161 IPython.notebook.set_smartcompleter(state);
161 162 });
162 163 };
163 164
164 165 // CellSection
165 166
166 167 var CellSection = function () {
167 168 PanelSection.apply(this, arguments);
168 169 };
169 170
170 171 CellSection.prototype = new PanelSection();
171 172
172 173
173 174 CellSection.prototype.style = function () {
174 175 PanelSection.prototype.style.apply(this);
175 176 this.content.addClass('ui-helper-clearfix');
176 177 this.content.find('div.section_row').addClass('ui-helper-clearfix');
177 178 this.content.find('#delete_cell').button();
178 179 this.content.find('#delete_cell').attr('title', "Delete the selected cell");
179 180
180 181 this.content.find('#insert').buttonset();
181 182 this.content.find('#insert_cell_above').attr('title', "Insert new cell above selected");
182 183 this.content.find('#insert_cell_below').attr('title', "Insert new cell below selected");
183 184
184 185 this.content.find('#move').buttonset();
185 186 this.content.find('#move_cell_up').attr('title', "Move selected cell up one in the Notebook");
186 187 this.content.find('#move_cell_down').attr('title', "Move selected cell down one in the Notebook");
187 188
188 189 this.content.find('#cell_type').buttonset();
189 190 this.content.find('#to_markdown').attr('title', 'Change selected cell to markdown (for text)');
190 191 this.content.find('#to_code').attr('title', 'Change selected cell to code (for execution)');
191 192
192 193 this.content.find('#cell_output').buttonset();
193 194 this.content.find('#toggle_output').attr('title', 'Toggle visibility of the output of code cells');
194 195 this.content.find('#clear_all_output').attr('title', 'Clear output of all code cells (actually removes the data, unlike toggle)');
195 196
196 197 this.content.find('#run_cells').buttonset();
197 198 this.content.find('#run_selected_cell').attr('title', 'Submit the selected cell for execution');
198 199 this.content.find('#run_all_cells').attr('title', 'Run *all* code cells in the notebook in order');
199 200 this.content.find('#autoindent').attr('title', 'Autoindent code as-you-type');
200 201 this.content.find('#autoindent_label').attr('title', 'Autoindent code as-you-type');
201 202 };
202 203
203 204
204 205 CellSection.prototype.bind_events = function () {
205 206 PanelSection.prototype.bind_events.apply(this);
206 207 this.content.find('#toggle_output').click(function () {
207 208 IPython.notebook.toggle_output();
208 209 });
209 210 this.content.find('#clear_all_output').click(function () {
210 211 IPython.notebook.clear_all_output();
211 212 });
212 213 this.content.find('#delete_cell').click(function () {
213 214 IPython.notebook.delete_cell();
214 215 });
215 216 this.content.find('#insert_cell_above').click(function () {
216 217 IPython.notebook.insert_code_cell_above();
217 218 });
218 219 this.content.find('#insert_cell_below').click(function () {
219 220 IPython.notebook.insert_code_cell_below();
220 221 });
221 222 this.content.find('#move_cell_up').click(function () {
222 223 IPython.notebook.move_cell_up();
223 224 });
224 225 this.content.find('#move_cell_down').click(function () {
225 226 IPython.notebook.move_cell_down();
226 227 });
227 228 this.content.find('#to_code').click(function () {
228 229 IPython.notebook.to_code();
229 230 });
230 231 this.content.find('#to_markdown').click(function () {
231 232 IPython.notebook.to_markdown();
232 233 });
233 234 this.content.find('#run_selected_cell').click(function () {
234 235 IPython.notebook.execute_selected_cell();
235 236 });
236 237 this.content.find('#run_all_cells').click(function () {
237 238 IPython.notebook.execute_all_cells();
238 239 });
239 240 this.content.find('#autoindent').change(function () {
240 241 var state = $('#autoindent').prop('checked');
241 242 IPython.notebook.set_autoindent(state);
242 243 });
243 244 this.content.find('#tooltipontab').change(function () {
244 245 var state = $('#tooltipontab').prop('checked');
245 246 IPython.notebook.set_tooltipontab(state);
246 247 });
247 248 };
248 249
249 250
250 251 // KernelSection
251 252
252 253 var KernelSection = function () {
253 254 PanelSection.apply(this, arguments);
254 255 };
255 256
256 257
257 258 KernelSection.prototype = new PanelSection();
258 259
259 260
260 261 KernelSection.prototype.style = function () {
261 262 PanelSection.prototype.style.apply(this);
262 263 this.content.addClass('ui-helper-clearfix');
263 264 this.content.find('div.section_row').addClass('ui-helper-clearfix');
264 265 this.content.find('#int_restart').buttonset();
265 266 this.content.find("#int_kernel").attr('title', "Interrupt the kernel with SIGINT/Ctrl-C");
266 267 this.content.find("#restart_kernel").attr('title',
267 268 "Restart the kernel. This will shutdown the current kernel," +
268 269 " and start a new, clean kernel in its place, connected to this Notebook." +
269 270 " This may break the connection of other clients connected to this kernel." );
270 271 var kill_tip = "Kill the kernel on exit. If unchecked, the kernel will remain" +
271 272 " active after closing the session, allowing you to reconnect and resume later.";
272 273 this.content.find('#kill_kernel').attr('title', kill_tip);
273 274 this.content.find('#kill_kernel_label').attr('title', kill_tip);
274 275
275 276 };
276 277
277 278
278 279 KernelSection.prototype.bind_events = function () {
279 280 PanelSection.prototype.bind_events.apply(this);
280 281 this.content.find('#restart_kernel').click(function () {
281 282 IPython.notebook.restart_kernel();
282 283 });
283 284 this.content.find('#int_kernel').click(function () {
284 285 IPython.notebook.kernel.interrupt();
285 286 });
286 287 };
287 288
288 289
289 290 // HelpSection
290 291
291 292 var HelpSection = function () {
292 293 PanelSection.apply(this, arguments);
293 294 };
294 295
295 296
296 297 HelpSection.prototype = new PanelSection();
297 298
298 299
299 300 HelpSection.prototype.style = function () {
300 301 PanelSection.prototype.style.apply(this);
301 302 PanelSection.prototype.style.apply(this);
302 303 this.content.addClass('ui-helper-clearfix');
303 304 this.content.find('div.section_row').addClass('ui-helper-clearfix');
304 305 this.content.find('#help_buttons0').buttonset();
305 306 this.content.find('#help_buttons1').buttonset();
306 307 this.content.find('#help_buttons2').buttonset();
307 308 this.content.find('#python_help').attr('title', "Open the online Python documentation in a new tab");
308 309 this.content.find('#ipython_help').attr('title', "Open the online IPython documentation in a new tab");
309 310 this.content.find('#numpy_help').attr('title', "Open the online NumPy documentation in a new tab");
310 311 this.content.find('#scipy_help').attr('title', "Open the online SciPy documentation in a new tab");
311 312 this.content.find('#matplotlib_help').attr('title', "Open the online Matplotlib documentation in a new tab");
312 313 this.content.find('#sympy_help').attr('title', "Open the online SymPy documentation in a new tab");
313 314 };
314 315
315 316
316 317 HelpSection.prototype.bind_events = function () {
317 318 PanelSection.prototype.bind_events.apply(this);
318 319 };
319 320
320 321
321 322 // Set module variables
322 323
323 324 IPython.PanelSection = PanelSection;
324 325 IPython.NotebookSection = NotebookSection;
325 326 IPython.CellSection = CellSection;
326 327 IPython.ConfigSection = ConfigSection;
327 328 IPython.KernelSection = KernelSection;
328 329 IPython.HelpSection = HelpSection;
329 330
330 331 return IPython;
331 332
332 333 }(IPython));
333 334
@@ -1,327 +1,328 b''
1 1 <!DOCTYPE HTML>
2 2 <html>
3 3
4 4 <head>
5 5 <meta charset="utf-8">
6 6
7 7 <title>IPython Notebook</title>
8 8
9 9 <!-- <script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML" charset="utf-8"></script> -->
10 10 <script type='text/javascript' src='static/mathjax/MathJax.js?config=TeX-AMS_HTML' charset='utf-8'></script>
11 11 <script type="text/javascript">
12 12 function CheckMathJax(){
13 13 var div=document.getElementById("MathJaxFetchingWarning")
14 14 if(window.MathJax){
15 15 document.body.removeChild(div)
16 16 }
17 17 else{
18 18 div.style.display = "block";
19 19 }
20 20 }
21 21 if (typeof MathJax == 'undefined') {
22 22 console.log("No local MathJax, loading from CDN");
23 23 document.write(unescape("%3Cscript type='text/javascript' src='http://cdn.mathjax.org/mathjax/latest/MathJax.js%3Fconfig=TeX-AMS_HTML' charset='utf-8'%3E%3C/script%3E"));
24 24 }else{
25 25 console.log("Using local MathJax");
26 26 }
27 27 </script>
28 28
29 29 <link rel="stylesheet" href="static/jquery/css/themes/aristo/jquery-wijmo.css" type="text/css" />
30 30 <link rel="stylesheet" href="static/codemirror/lib/codemirror.css">
31 31 <link rel="stylesheet" href="static/codemirror/mode/markdown/markdown.css">
32 32 <link rel="stylesheet" href="static/codemirror/mode/rst/rst.css">
33 33 <link rel="stylesheet" href="static/codemirror/theme/ipython.css">
34 34 <link rel="stylesheet" href="static/codemirror/theme/default.css">
35 35
36 36 <link rel="stylesheet" href="static/prettify/prettify.css"/>
37 37
38 38 <link rel="stylesheet" href="static/css/boilerplate.css" type="text/css" />
39 39 <link rel="stylesheet" href="static/css/layout.css" type="text/css" />
40 40 <link rel="stylesheet" href="static/css/base.css" type="text/css" />
41 41 <link rel="stylesheet" href="static/css/notebook.css" type="text/css" />
42 42 <link rel="stylesheet" href="static/css/renderedhtml.css" type="text/css" />
43 43
44 44 <meta name="read_only" content="{{read_only}}"/>
45 45
46 46 </head>
47 47
48 48 <body onload='CheckMathJax();'
49 49 data-project={{project}} data-notebook-id={{notebook_id}}
50 50 data-base-project-url={{base_project_url}} data-base-kernel-url={{base_kernel_url}}
51 51 >
52 52
53 53 <div id="header">
54 54 <span id="ipython_notebook"><h1>IPython Notebook</h1></span>
55 55 <span id="save_widget">
56 56 <input type="text" id="notebook_name" size="20"></textarea>
57 57 <button id="save_notebook"><u>S</u>ave</button>
58 58 </span>
59 59 <span id="quick_help_area">
60 60 <button id="quick_help">Quick<u>H</u>elp</button>
61 61 </span>
62 62
63 63 <span id="login_widget">
64 64 {% comment This is a temporary workaround to hide the logout button %}
65 65 {% comment when appropriate until notebook.html is templated %}
66 66 {% if current_user and current_user != 'anonymous' %}
67 67 <button id="logout">Logout</button>
68 68 {% end %}
69 69 </span>
70 70
71 71 <span id="kernel_status">Idle</span>
72 72 </div>
73 73
74 74 <div id="MathJaxFetchingWarning"
75 75 style="width:80%; margin:auto;padding-top:20%;text-align: justify; display:none">
76 76 <p style="font-size:26px;">There was an issue trying to fetch MathJax.js
77 77 from the internet.</p>
78 78
79 79 <p style="padding:0.2em"> With a working internet connection, you can run
80 80 the following at a Python or IPython prompt, which will install a local
81 81 copy of MathJax:</p>
82 82
83 83 <pre style="background-color:lightblue;border:thin silver solid;padding:0.4em">
84 84 from IPython.external import mathjax; mathjax.install_mathjax()
85 85 </pre>
86 86 This will try to install MathJax into the directory where you installed
87 87 IPython. If you installed IPython to a location that requires
88 88 administrative privileges to write, you will need to make this call as
89 89 an administrator. On OSX/Linux/Unix, this can be done at the
90 90 command-line via:
91 91 <pre style="background-color:lightblue;border:thin silver solid;padding:0.4em">
92 92 sudo python -c "from IPython.external import mathjax; mathjax.install_mathjax()"
93 93 </pre>
94 94 </p>
95 95 </div>
96 96
97 97 <div id="main_app">
98 98
99 99 <div id="left_panel">
100 100
101 101 <div id="notebook_section">
102 102 <div class="section_header">
103 103 <h3>Notebook</h3>
104 104 </div>
105 105 <div class="section_content">
106 106 <div class="section_row">
107 107 <span id="new_open" class="section_row_buttons">
108 108 <button id="new_notebook">New</button>
109 109 <button id="open_notebook">Open</button>
110 110 </span>
111 111 <span class="section_row_header">Actions</span>
112 112 </div>
113 113 <div class="section_row">
114 114 <span>
115 115 <select id="download_format">
116 116 <option value="json">ipynb</option>
117 117 <option value="py">py</option>
118 118 </select>
119 119 </span>
120 120 <span class="section_row_buttons">
121 121 <button id="download_notebook">Download</button>
122 122 </span>
123 123 </div>
124 124 <div class="section_row">
125 125 <span class="section_row_buttons">
126 126 <span id="print_widget">
127 127 <button id="print_notebook">Print</button>
128 128 </span>
129 129 </span>
130 130 </div>
131 131 </div>
132 132 </div>
133 133
134 134 <div id="cell_section">
135 135 <div class="section_header">
136 136 <h3>Cell</h3>
137 137 </div>
138 138 <div class="section_content">
139 139 <div class="section_row">
140 140 <span class="section_row_buttons">
141 141 <button id="delete_cell"><u>D</u>elete</button>
142 142 </span>
143 143 <span class="section_row_header">Actions</span>
144 144 </div>
145 145 <div class="section_row">
146 146 <span id="cell_type" class="section_row_buttons">
147 147 <button id="to_code"><u>C</u>ode</button>
148 148 <!-- <button id="to_html">HTML</button>-->
149 149 <button id="to_markdown"><u>M</u>arkdown</button>
150 150 </span>
151 151 <span class="button_label">Format</span>
152 152 </div>
153 153 <div class="section_row">
154 154 <span id="cell_output" class="section_row_buttons">
155 155 <button id="toggle_output"><u>T</u>oggle</button>
156 156 <button id="clear_all_output">ClearAll</button>
157 157 </span>
158 158 <span class="button_label">Output</span>
159 159 </div>
160 160 <div class="section_row">
161 161 <span id="insert" class="section_row_buttons">
162 162 <button id="insert_cell_above"><u>A</u>bove</button>
163 163 <button id="insert_cell_below"><u>B</u>elow</button>
164 164 </span>
165 165 <span class="button_label">Insert</span>
166 166 </div>
167 167 <div class="section_row">
168 168 <span id="move" class="section_row_buttons">
169 169 <button id="move_cell_up">Up</button>
170 170 <button id="move_cell_down">Down</button>
171 171 </span>
172 172 <span class="button_label">Move</span>
173 173 </div>
174 174 <div class="section_row">
175 175 <span id="run_cells" class="section_row_buttons">
176 176 <button id="run_selected_cell">Selected</button>
177 177 <button id="run_all_cells">All</button>
178 178 </span>
179 179 <span class="button_label">Run</span>
180 180 </div>
181 181 <div class="section_row">
182 182 <span id="autoindent_span">
183 183 <input type="checkbox" id="autoindent" checked="true"></input>
184 184 </span>
185 185 <span class="checkbox_label" id="autoindent_label">Autoindent:</span>
186 186 </div>
187 187 </div>
188 188 </div>
189 189
190 190 <div id="kernel_section">
191 191 <div class="section_header">
192 192 <h3>Kernel</h3>
193 193 </div>
194 194 <div class="section_content">
195 195 <div class="section_row">
196 196 <span id="int_restart" class="section_row_buttons">
197 197 <button id="int_kernel"><u>I</u>nterrupt</button>
198 198 <button id="restart_kernel">Restart</button>
199 199 </span>
200 200 <span class="section_row_header">Actions</span>
201 201 </div>
202 202 <div class="section_row">
203 203 <span id="kernel_persist">
204 204 {% if kill_kernel %}
205 205 <input type="checkbox" id="kill_kernel" checked="true"></input>
206 206 {% else %}
207 207 <input type="checkbox" id="kill_kernel"></input>
208 208 {% end %}
209 209 </span>
210 210 <span class="checkbox_label" id="kill_kernel_label">Kill kernel upon exit:</span>
211 211 </div>
212 212 </div>
213 213 </div>
214 214
215 215 <div id="help_section">
216 216 <div class="section_header">
217 217 <h3>Help</h3>
218 218 </div>
219 219 <div class="section_content">
220 220 <div class="section_row">
221 221 <span id="help_buttons0" class="section_row_buttons">
222 222 <a id="python_help" href="http://docs.python.org" target="_blank">Python</a>
223 223 <a id="ipython_help" href="http://ipython.org/documentation.html" target="_blank">IPython</a>
224 224 </span>
225 225 <span class="section_row_header">Links</span>
226 226 </div>
227 227 <div class="section_row">
228 228 <span id="help_buttons1" class="section_row_buttons">
229 229 <a id="numpy_help" href="http://docs.scipy.org/doc/numpy/reference/" target="_blank">NumPy</a>
230 230 <a id="scipy_help" href="http://docs.scipy.org/doc/scipy/reference/" target="_blank">SciPy</a>
231 231 </span>
232 232 </div>
233 233 <div class="section_row">
234 234 <span id="help_buttons2" class="section_row_buttons">
235 235 <a id="matplotlib_help" href="http://matplotlib.sourceforge.net/" target="_blank">MPL</a>
236 236 <a id="sympy_help" href="http://docs.sympy.org/dev/index.html" target="_blank">SymPy</a>
237 237 </span>
238 238 </div>
239 239 <div class="section_row">
240 240 <span class="help_string">run selected cell</span>
241 241 <span class="help_string_label">Shift-Enter :</span>
242 242 </div>
243 243 <div class="section_row">
244 244 <span class="help_string">run selected cell in-place</span>
245 245 <span class="help_string_label">Ctrl-Enter :</span>
246 246 </div>
247 247 <div class="section_row">
248 248 <span class="help_string">show keyboard shortcuts</span>
249 249 <span class="help_string_label">Ctrl-m h :</span>
250 250 </div>
251 251 </div>
252 252 </div>
253 253
254 254 <div id="config_section">
255 255 <div class="section_header">
256 <h3>Config</h3>
256 <h3>Configuration</h3>
257 257 </div>
258 258 <div class="section_content">
259 259 <div class="section_row">
260 260 <span id="tooltipontab_span">
261 261 <input type="checkbox" id="tooltipontab" checked="true"></input>
262 262 </span>
263 263 <span class="checkbox_label" id="tooltipontab_label">Tooltip on tab:</span>
264 264 </div>
265 265 <div class="section_row">
266 266 <span id="smartcompleter_span">
267 267 <input type="checkbox" id="smartcompleter" checked="true"></input>
268 268 </span>
269 269 <span class="checkbox_label" id="smartcompleter_label">Smart completer:</span>
270 270 </div>
271 271 <div class="section_row">
272 <span class="numeric_input_label" id="timebeforetooltip_label">Time before tooltip : </span>
272 273 <span id="timebeforetooltip_span">
273 <input type="text" id="timebeforetooltip" value="1200"></input>
274 <input type="text" id="timebeforetooltip" value="1200" size='6'></input>
275 <span class="numeric_input_label" id="timebeforetooltip_unit">milliseconds</span>
274 276 </span>
275 <span class="numeric_input_label" id="timebeforetooltip_label">Time before tooltip : </span>
276 277 </div>
277 278 </div>
278 279 </div>
279 280
280 281 </div>
281 282 <div id="left_panel_splitter"></div>
282 283 <div id="notebook_panel">
283 284 <div id="notebook"></div>
284 285 <div id="pager_splitter"></div>
285 286 <div id="pager"></div>
286 287 </div>
287 288
288 289 </div>
289 290
290 291 <script src="static/jquery/js/jquery-1.6.2.min.js" type="text/javascript" charset="utf-8"></script>
291 292 <script src="static/jquery/js/jquery-ui-1.8.14.custom.min.js" type="text/javascript" charset="utf-8"></script>
292 293 <script src="static/jquery/js/jquery.autogrow.js" type="text/javascript" charset="utf-8"></script>
293 294
294 295 <script src="static/codemirror/lib/codemirror.js" charset="utf-8"></script>
295 296 <script src="static/codemirror/mode/python/python.js" charset="utf-8"></script>
296 297 <script src="static/codemirror/mode/htmlmixed/htmlmixed.js" charset="utf-8"></script>
297 298 <script src="static/codemirror/mode/xml/xml.js" charset="utf-8"></script>
298 299 <script src="static/codemirror/mode/javascript/javascript.js" charset="utf-8"></script>
299 300 <script src="static/codemirror/mode/css/css.js" charset="utf-8"></script>
300 301 <script src="static/codemirror/mode/rst/rst.js" charset="utf-8"></script>
301 302 <script src="static/codemirror/mode/markdown/markdown.js" charset="utf-8"></script>
302 303
303 304 <script src="static/pagedown/Markdown.Converter.js" charset="utf-8"></script>
304 305
305 306 <script src="static/prettify/prettify.js" charset="utf-8"></script>
306 307
307 308 <script src="static/js/namespace.js" type="text/javascript" charset="utf-8"></script>
308 309 <script src="static/js/utils.js" type="text/javascript" charset="utf-8"></script>
309 310 <script src="static/js/cell.js" type="text/javascript" charset="utf-8"></script>
310 311 <script src="static/js/codecell.js" type="text/javascript" charset="utf-8"></script>
311 312 <script src="static/js/textcell.js" type="text/javascript" charset="utf-8"></script>
312 313 <script src="static/js/kernel.js" type="text/javascript" charset="utf-8"></script>
313 314 <script src="static/js/kernelstatus.js" type="text/javascript" charset="utf-8"></script>
314 315 <script src="static/js/layout.js" type="text/javascript" charset="utf-8"></script>
315 316 <script src="static/js/savewidget.js" type="text/javascript" charset="utf-8"></script>
316 317 <script src="static/js/quickhelp.js" type="text/javascript" charset="utf-8"></script>
317 318 <script src="static/js/loginwidget.js" type="text/javascript" charset="utf-8"></script>
318 319 <script src="static/js/pager.js" type="text/javascript" charset="utf-8"></script>
319 320 <script src="static/js/panelsection.js" type="text/javascript" charset="utf-8"></script>
320 321 <script src="static/js/printwidget.js" type="text/javascript" charset="utf-8"></script>
321 322 <script src="static/js/leftpanel.js" type="text/javascript" charset="utf-8"></script>
322 323 <script src="static/js/notebook.js" type="text/javascript" charset="utf-8"></script>
323 324 <script src="static/js/notebookmain.js" type="text/javascript" charset="utf-8"></script>
324 325
325 326 </body>
326 327
327 328 </html>
General Comments 0
You need to be logged in to leave comments. Login now