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