Show More
@@ -1,297 +1,307 b'' | |||||
1 |
|
1 | |||
2 | /** |
|
2 | /** | |
3 | * Primary styles |
|
3 | * Primary styles | |
4 | * |
|
4 | * | |
5 | * Author: IPython Development Team |
|
5 | * Author: IPython Development Team | |
6 | */ |
|
6 | */ | |
7 |
|
7 | |||
8 |
|
8 | |||
9 | body { |
|
9 | body { | |
10 | background-color: white; |
|
10 | background-color: white; | |
11 | /* This makes sure that the body covers the entire window and needs to |
|
11 | /* This makes sure that the body covers the entire window and needs to | |
12 | be in a different element than the display: box in wrapper below */ |
|
12 | be in a different element than the display: box in wrapper below */ | |
13 | position: absolute; |
|
13 | position: absolute; | |
14 | left: 0px; |
|
14 | left: 0px; | |
15 | right: 0px; |
|
15 | right: 0px; | |
16 | top: 0px; |
|
16 | top: 0px; | |
17 | bottom: 0px; |
|
17 | bottom: 0px; | |
18 | overflow: hidden; |
|
18 | overflow: hidden; | |
19 | } |
|
19 | } | |
20 |
|
20 | |||
21 | span#save_widget { |
|
21 | span#save_widget { | |
22 | position: absolute; |
|
22 | position: absolute; | |
23 | left: 0px; |
|
23 | left: 0px; | |
24 | padding: 5px 0px; |
|
24 | padding: 5px 0px; | |
25 | margin: 0px 0px 0px 0px; |
|
25 | margin: 0px 0px 0px 0px; | |
26 | } |
|
26 | } | |
27 |
|
27 | |||
28 | input#notebook_name { |
|
28 | input#notebook_name { | |
29 | height: 1em; |
|
29 | height: 1em; | |
30 | line-height: 1em; |
|
30 | line-height: 1em; | |
31 | padding: 5px; |
|
31 | padding: 5px; | |
32 | } |
|
32 | } | |
33 |
|
33 | |||
34 | span#kernel_status { |
|
34 | span#kernel_status { | |
35 | position: absolute; |
|
35 | position: absolute; | |
36 | padding: 8px 5px 5px 5px; |
|
36 | padding: 8px 5px 5px 5px; | |
37 | right: 10px; |
|
37 | right: 10px; | |
38 | font-weight: bold; |
|
38 | font-weight: bold; | |
39 | } |
|
39 | } | |
40 |
|
40 | |||
41 | .status_idle { |
|
41 | .status_idle { | |
42 | color: gray; |
|
42 | color: gray; | |
43 | } |
|
43 | } | |
44 |
|
44 | |||
45 | .status_busy { |
|
45 | .status_busy { | |
46 | color: red; |
|
46 | color: red; | |
47 | } |
|
47 | } | |
48 |
|
48 | |||
49 | .status_restarting { |
|
49 | .status_restarting { | |
50 | color: black; |
|
50 | color: black; | |
51 | } |
|
51 | } | |
52 |
|
52 | |||
53 | div#left_panel { |
|
53 | div#left_panel { | |
54 | overflow-y: auto; |
|
54 | overflow-y: auto; | |
55 | top: 0px; |
|
55 | top: 0px; | |
56 | left: 0px; |
|
56 | left: 0px; | |
57 | margin: 0px; |
|
57 | margin: 0px; | |
58 | padding: 0px; |
|
58 | padding: 0px; | |
59 | position: absolute; |
|
59 | position: absolute; | |
60 | } |
|
60 | } | |
61 |
|
61 | |||
62 | h3.section_header { |
|
62 | h3.section_header { | |
63 | padding: 5px; |
|
63 | padding: 5px; | |
64 | } |
|
64 | } | |
65 |
|
65 | |||
66 | div.section_content { |
|
66 | div.section_content { | |
67 | padding: 5px; |
|
67 | padding: 5px; | |
68 | } |
|
68 | } | |
69 |
|
69 | |||
70 | span.section_row_buttons > button { |
|
70 | span.section_row_buttons > button { | |
71 | width: 70px; |
|
71 | width: 70px; | |
72 | } |
|
72 | } | |
73 |
|
73 | |||
74 | .section_row { |
|
74 | .section_row { | |
75 | margin: 5px 0px; |
|
75 | margin: 5px 0px; | |
76 | } |
|
76 | } | |
77 |
|
77 | |||
78 | .section_row_buttons { |
|
78 | .section_row_buttons { | |
79 | float: right; |
|
79 | float: right; | |
80 | } |
|
80 | } | |
81 |
|
81 | |||
82 | #kernel_persist { |
|
82 | #kernel_persist { | |
83 | float: right; |
|
83 | float: right; | |
84 | } |
|
84 | } | |
85 |
|
85 | |||
86 | .help_string { |
|
86 | .help_string { | |
87 | float: right; |
|
87 | float: right; | |
88 | width: 170px; |
|
88 | width: 170px; | |
89 | padding: 0px 5px; |
|
89 | padding: 0px 5px; | |
90 | text-align: center; |
|
90 | text-align: center; | |
91 | } |
|
91 | } | |
92 |
|
92 | |||
93 | .help_string_label { |
|
93 | .help_string_label { | |
94 | float: right; |
|
94 | float: right; | |
95 | } |
|
95 | } | |
96 |
|
96 | |||
97 | #autoindent_span { |
|
97 | #autoindent_span { | |
98 | float: right; |
|
98 | float: right; | |
99 | } |
|
99 | } | |
100 |
|
100 | |||
101 | .checkbox_label { |
|
101 | .checkbox_label { | |
102 | font-size: 85%; |
|
102 | font-size: 85%; | |
103 | float: right; |
|
103 | float: right; | |
104 | padding: 0.3em; |
|
104 | padding: 0.3em; | |
105 | } |
|
105 | } | |
106 |
|
106 | |||
107 | .section_row_header { |
|
107 | .section_row_header { | |
108 | float: left; |
|
108 | float: left; | |
109 | font-size: 85%; |
|
109 | font-size: 85%; | |
110 | padding: 0.4em 0em; |
|
110 | padding: 0.4em 0em; | |
111 | font-weight: bold; |
|
111 | font-weight: bold; | |
112 | } |
|
112 | } | |
113 |
|
113 | |||
114 | span.button_label { |
|
114 | span.button_label { | |
115 | padding: 0.2em 1em; |
|
115 | padding: 0.2em 1em; | |
116 | font-size: 77%; |
|
116 | font-size: 77%; | |
117 | float: right; |
|
117 | float: right; | |
118 | } |
|
118 | } | |
119 |
|
119 | |||
120 | /* This is needed because FF was adding a 2px margin top and bottom. */ |
|
120 | /* This is needed because FF was adding a 2px margin top and bottom. */ | |
121 | .section_row .ui-button { |
|
121 | .section_row .ui-button { | |
122 | margin-top: 0px; |
|
122 | margin-top: 0px; | |
123 | margin-bottom: 0px; |
|
123 | margin-bottom: 0px; | |
124 | } |
|
124 | } | |
125 |
|
125 | |||
126 | #download_format { |
|
126 | #download_format { | |
127 | float: right; |
|
127 | float: right; | |
128 | font-size: 85%; |
|
128 | font-size: 85%; | |
129 | width: 62px; |
|
129 | width: 62px; | |
130 | margin: 1px 5px; |
|
130 | margin: 1px 5px; | |
131 | } |
|
131 | } | |
132 |
|
132 | |||
133 | div#left_panel_splitter { |
|
133 | div#left_panel_splitter { | |
134 | width: 8px; |
|
134 | width: 8px; | |
135 | top: 0px; |
|
135 | top: 0px; | |
136 | left: 202px; |
|
136 | left: 202px; | |
137 | margin: 0px; |
|
137 | margin: 0px; | |
138 | padding: 0px; |
|
138 | padding: 0px; | |
139 | position: absolute; |
|
139 | position: absolute; | |
140 | } |
|
140 | } | |
141 |
|
141 | |||
142 | div#notebook_panel { |
|
142 | div#notebook_panel { | |
143 | /* The L margin will be set in the Javascript code*/ |
|
143 | /* The L margin will be set in the Javascript code*/ | |
144 | margin: 0px 0px 0px 0px; |
|
144 | margin: 0px 0px 0px 0px; | |
145 | padding: 0px; |
|
145 | padding: 0px; | |
146 | } |
|
146 | } | |
147 |
|
147 | |||
148 | div#notebook { |
|
148 | div#notebook { | |
149 | overflow-y: scroll; |
|
149 | overflow-y: scroll; | |
150 | overflow-x: auto; |
|
150 | overflow-x: auto; | |
151 | width: 100%; |
|
151 | width: 100%; | |
152 | /* This spaces the cell away from the edge of the notebook area */ |
|
152 | /* This spaces the cell away from the edge of the notebook area */ | |
153 | padding: 15px 15px 15px 15px; |
|
153 | padding: 15px 15px 15px 15px; | |
154 | margin: 0px |
|
154 | margin: 0px | |
155 | background-color: white; |
|
155 | background-color: white; | |
156 | } |
|
156 | } | |
157 |
|
157 | |||
158 | div#pager_splitter { |
|
158 | div#pager_splitter { | |
159 | height: 8px; |
|
159 | height: 8px; | |
160 | } |
|
160 | } | |
161 |
|
161 | |||
162 | div#pager { |
|
162 | div#pager { | |
163 | padding: 15px; |
|
163 | padding: 15px; | |
164 | overflow: auto; |
|
164 | overflow: auto; | |
165 | } |
|
165 | } | |
166 |
|
166 | |||
167 | div.cell { |
|
167 | div.cell { | |
168 | width: 100%; |
|
168 | width: 100%; | |
169 | padding: 5px; |
|
169 | padding: 5px; | |
170 | /* This acts as a spacer between cells, that is outside the border */ |
|
170 | /* This acts as a spacer between cells, that is outside the border */ | |
171 | margin: 5px 0px 5px 0px; |
|
171 | margin: 5px 0px 5px 0px; | |
172 | } |
|
172 | } | |
173 |
|
173 | |||
174 | div.code_cell { |
|
174 | div.code_cell { | |
175 | background-color: white; |
|
175 | background-color: white; | |
176 | } |
|
176 | } | |
177 |
|
177 | |||
178 | div.prompt { |
|
178 | div.prompt { | |
179 | /* No width is used so the prompt area can expand as the prompt number |
|
179 | /* No width is used so the prompt area can expand as the prompt number | |
180 | increases in width */ |
|
180 | increases in width */ | |
181 | /* This 0.4em is tuned to match the padding on the CodeMirror editor. */ |
|
181 | /* This 0.4em is tuned to match the padding on the CodeMirror editor. */ | |
182 | padding: 0.4em; |
|
182 | padding: 0.4em; | |
183 | margin: 0px; |
|
183 | margin: 0px; | |
184 | font-family: monospace; |
|
184 | font-family: monospace; | |
185 | } |
|
185 | } | |
186 |
|
186 | |||
|
187 | div.input { | |||
|
188 | page-break-inside: avoid; | |||
|
189 | } | |||
|
190 | ||||
187 | div.input_area { |
|
191 | div.input_area { | |
188 | color: black; |
|
192 | color: black; | |
189 | } |
|
193 | } | |
190 |
|
194 | |||
191 | div.input_prompt { |
|
195 | div.input_prompt { | |
192 | color: navy; |
|
196 | color: navy; | |
193 | } |
|
197 | } | |
194 |
|
198 | |||
195 | div.output { |
|
199 | div.output { | |
196 | /* This is a spacer between the input and output of each cell */ |
|
200 | /* This is a spacer between the input and output of each cell */ | |
197 | margin-top: 5px; |
|
201 | margin-top: 5px; | |
198 | } |
|
202 | } | |
199 |
|
203 | |||
200 | div.output_prompt { |
|
204 | div.output_prompt { | |
201 | color: darkred; |
|
205 | color: darkred; | |
202 | } |
|
206 | } | |
203 |
|
207 | |||
204 | /* This class is applied to all types of output (pyout, pyerr, stream, display_data) */ |
|
208 | /* This class is applied to all types of output (pyout, pyerr, stream, display_data) */ | |
205 | div.output_area { |
|
209 | div.output_area { | |
206 | padding: 0px 0.4em |
|
210 | padding: 0px 0.4em; | |
|
211 | page-break-inside: avoid; | |||
207 | } |
|
212 | } | |
208 |
|
213 | |||
209 | /* This is the output area after the Out[] prompt of type pyout */ |
|
214 | /* This is the output area after the Out[] prompt of type pyout */ | |
210 | div.pyout_area { |
|
215 | div.pyout_area { | |
211 | padding: 0.4em; |
|
216 | padding: 0.4em; | |
212 | } |
|
217 | } | |
213 |
|
218 | |||
214 | /* The rest of the output_* classes are for special styling of the different |
|
219 | /* The rest of the output_* classes are for special styling of the different | |
215 | output types */ |
|
220 | output types */ | |
216 |
|
221 | |||
217 | div.output_pyout { |
|
222 | div.output_pyout { | |
218 | padding: 0px; |
|
223 | padding: 0px; | |
219 | } |
|
224 | } | |
220 |
|
225 | |||
221 | div.output_stream { |
|
226 | div.output_stream { | |
222 | text-align: left; |
|
227 | text-align: left; | |
223 | color: black; |
|
228 | color: black; | |
224 | font-family: monospace; |
|
229 | font-family: monospace; | |
225 | } |
|
230 | } | |
226 |
|
231 | |||
227 | div.output_latex { |
|
232 | div.output_latex { | |
228 | text-align: left; |
|
233 | text-align: left; | |
229 | color: black; |
|
234 | color: black; | |
230 | } |
|
235 | } | |
231 |
|
236 | |||
232 | div.output_html { |
|
237 | div.output_html { | |
233 | } |
|
238 | } | |
234 |
|
239 | |||
235 | div.output_png { |
|
240 | div.output_png { | |
236 | } |
|
241 | } | |
237 |
|
242 | |||
238 | div.output_jpeg { |
|
243 | div.output_jpeg { | |
239 | } |
|
244 | } | |
240 |
|
245 | |||
241 | div.text_cell { |
|
246 | div.text_cell { | |
242 | background-color: white; |
|
247 | background-color: white; | |
243 | } |
|
248 | } | |
244 |
|
249 | |||
245 | div.text_cell_input { |
|
250 | div.text_cell_input { | |
246 | color: black; |
|
251 | color: black; | |
247 | } |
|
252 | } | |
248 |
|
253 | |||
249 | div.text_cell_render { |
|
254 | div.text_cell_render { | |
250 | font-family: "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif; |
|
255 | font-family: "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif; | |
251 | outline: none; |
|
256 | outline: none; | |
252 | resize: none; |
|
257 | resize: none; | |
253 | width: inherit; |
|
258 | width: inherit; | |
254 | border-style: none; |
|
259 | border-style: none; | |
255 | padding: 5px; |
|
260 | padding: 5px; | |
256 | color: black; |
|
261 | color: black; | |
257 | } |
|
262 | } | |
258 |
|
263 | |||
259 | .CodeMirror { |
|
264 | .CodeMirror { | |
260 | line-height: 1.231; /* Changed from 1em to our global default */ |
|
265 | line-height: 1.231; /* Changed from 1em to our global default */ | |
261 | } |
|
266 | } | |
262 |
|
267 | |||
263 | .CodeMirror-scroll { |
|
268 | .CodeMirror-scroll { | |
264 | height: auto; /* Changed to auto to autogrow */ |
|
269 | height: auto; /* Changed to auto to autogrow */ | |
265 | overflow-y: visible; /* Changed from auto to remove scrollbar */ |
|
270 | overflow-y: visible; /* Changed from auto to remove scrollbar */ | |
266 | overflow-x: auto; /* Changed from auto to remove scrollbar */ |
|
271 | overflow-x: auto; /* Changed from auto to remove scrollbar */ | |
267 | } |
|
272 | } | |
268 |
|
273 | |||
269 | /* CSS font colors for translated ANSI colors. */ |
|
274 | /* CSS font colors for translated ANSI colors. */ | |
270 |
|
275 | |||
271 |
|
276 | |||
272 | .ansiblack {color: black;} |
|
277 | .ansiblack {color: black;} | |
273 | .ansired {color: darkred;} |
|
278 | .ansired {color: darkred;} | |
274 | .ansigreen {color: darkgreen;} |
|
279 | .ansigreen {color: darkgreen;} | |
275 | .ansiyellow {color: brown;} |
|
280 | .ansiyellow {color: brown;} | |
276 | .ansiblue {color: darkblue;} |
|
281 | .ansiblue {color: darkblue;} | |
277 | .ansipurple {color: darkviolet;} |
|
282 | .ansipurple {color: darkviolet;} | |
278 | .ansicyan {color: steelblue;} |
|
283 | .ansicyan {color: steelblue;} | |
279 | .ansigrey {color: grey;} |
|
284 | .ansigrey {color: grey;} | |
280 | .ansibold {font-weight: bold;} |
|
285 | .ansibold {font-weight: bold;} | |
281 |
|
286 | |||
282 | .completions { |
|
287 | .completions { | |
283 | position: absolute; |
|
288 | position: absolute; | |
284 | z-index: 10; |
|
289 | z-index: 10; | |
285 | overflow: auto; |
|
290 | overflow: auto; | |
286 | border: 1px solid black; |
|
291 | border: 1px solid black; | |
287 | } |
|
292 | } | |
288 |
|
293 | |||
289 | .completions select { |
|
294 | .completions select { | |
290 | background: white; |
|
295 | background: white; | |
291 | outline: none; |
|
296 | outline: none; | |
292 | border: none; |
|
297 | border: none; | |
293 | padding: 0px; |
|
298 | padding: 0px; | |
294 | margin: 0px; |
|
299 | margin: 0px; | |
295 | font-family: monospace; |
|
300 | font-family: monospace; | |
296 | } |
|
301 | } | |
297 |
|
302 | |||
|
303 | @media print { | |||
|
304 | body { overflow: visible !important; } | |||
|
305 | .ui-widget-content { border: 0px; } | |||
|
306 | } | |||
|
307 |
@@ -1,439 +1,439 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 | // CodeCell |
|
9 | // CodeCell | |
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 | var CodeCell = function (notebook) { |
|
16 | var CodeCell = function (notebook) { | |
17 | this.code_mirror = null; |
|
17 | this.code_mirror = null; | |
18 | this.input_prompt_number = ' '; |
|
18 | this.input_prompt_number = ' '; | |
19 | this.is_completing = false; |
|
19 | this.is_completing = false; | |
20 | this.completion_cursor = null; |
|
20 | this.completion_cursor = null; | |
21 | this.outputs = []; |
|
21 | this.outputs = []; | |
22 | this.collapsed = false; |
|
22 | this.collapsed = false; | |
23 | IPython.Cell.apply(this, arguments); |
|
23 | IPython.Cell.apply(this, arguments); | |
24 | }; |
|
24 | }; | |
25 |
|
25 | |||
26 |
|
26 | |||
27 | CodeCell.prototype = new IPython.Cell(); |
|
27 | CodeCell.prototype = new IPython.Cell(); | |
28 |
|
28 | |||
29 |
|
29 | |||
30 | CodeCell.prototype.create_element = function () { |
|
30 | CodeCell.prototype.create_element = function () { | |
31 | var cell = $('<div></div>').addClass('cell border-box-sizing code_cell vbox'); |
|
31 | var cell = $('<div></div>').addClass('cell border-box-sizing code_cell vbox'); | |
32 | var input = $('<div></div>').addClass('input hbox'); |
|
32 | var input = $('<div></div>').addClass('input hbox'); | |
33 | input.append($('<div/>').addClass('prompt input_prompt')); |
|
33 | input.append($('<div/>').addClass('prompt input_prompt')); | |
34 | var input_area = $('<div/>').addClass('input_area box-flex1'); |
|
34 | var input_area = $('<div/>').addClass('input_area box-flex1'); | |
35 | this.code_mirror = CodeMirror(input_area.get(0), { |
|
35 | this.code_mirror = CodeMirror(input_area.get(0), { | |
36 | indentUnit : 4, |
|
36 | indentUnit : 4, | |
37 | mode: 'python', |
|
37 | mode: 'python', | |
38 | theme: 'ipython', |
|
38 | theme: 'ipython', | |
39 | onKeyEvent: $.proxy(this.handle_codemirror_keyevent,this) |
|
39 | onKeyEvent: $.proxy(this.handle_codemirror_keyevent,this) | |
40 | }); |
|
40 | }); | |
41 | input.append(input_area); |
|
41 | input.append(input_area); | |
42 | var output = $('<div></div>').addClass('output vbox'); |
|
42 | var output = $('<div></div>').addClass('output vbox'); | |
43 | cell.append(input).append(output); |
|
43 | cell.append(input).append(output); | |
44 | this.element = cell; |
|
44 | this.element = cell; | |
45 | this.collapse() |
|
45 | this.collapse() | |
46 | }; |
|
46 | }; | |
47 |
|
47 | |||
48 |
|
48 | |||
49 | CodeCell.prototype.handle_codemirror_keyevent = function (editor, event) { |
|
49 | CodeCell.prototype.handle_codemirror_keyevent = function (editor, event) { | |
50 | // This method gets called in CodeMirror's onKeyDown/onKeyPress handlers and |
|
50 | // This method gets called in CodeMirror's onKeyDown/onKeyPress handlers and | |
51 | // is used to provide custom key handling. Its return value is used to determine |
|
51 | // is used to provide custom key handling. Its return value is used to determine | |
52 | // if CodeMirror should ignore the event: true = ignore, false = don't ignore. |
|
52 | // if CodeMirror should ignore the event: true = ignore, false = don't ignore. | |
53 | if (event.keyCode === 13 && event.shiftKey) { |
|
53 | if (event.keyCode === 13 && event.shiftKey) { | |
54 | // Always ignore shift-enter in CodeMirror as we handle it. |
|
54 | // Always ignore shift-enter in CodeMirror as we handle it. | |
55 | return true; |
|
55 | return true; | |
56 | } else if (event.keyCode === 9 && event.type == 'keydown') { |
|
56 | } else if (event.keyCode === 9 && event.type == 'keydown') { | |
57 | // Tab completion. |
|
57 | // Tab completion. | |
58 | var cur = editor.getCursor(); |
|
58 | var cur = editor.getCursor(); | |
59 | var pre_cursor = editor.getRange({line:cur.line,ch:0},cur).trim(); |
|
59 | var pre_cursor = editor.getRange({line:cur.line,ch:0},cur).trim(); | |
60 | if (pre_cursor === "") { |
|
60 | if (pre_cursor === "") { | |
61 | // Don't autocomplete if the part of the line before the cursor is empty. |
|
61 | // Don't autocomplete if the part of the line before the cursor is empty. | |
62 | // In this case, let CodeMirror handle indentation. |
|
62 | // In this case, let CodeMirror handle indentation. | |
63 | return false; |
|
63 | return false; | |
64 | } else { |
|
64 | } else { | |
65 | // Autocomplete the current line. |
|
65 | // Autocomplete the current line. | |
66 | event.stop(); |
|
66 | event.stop(); | |
67 | var line = editor.getLine(cur.line); |
|
67 | var line = editor.getLine(cur.line); | |
68 | this.is_completing = true; |
|
68 | this.is_completing = true; | |
69 | this.completion_cursor = cur; |
|
69 | this.completion_cursor = cur; | |
70 | IPython.notebook.complete_cell(this, line, cur.ch); |
|
70 | IPython.notebook.complete_cell(this, line, cur.ch); | |
71 | return true; |
|
71 | return true; | |
72 | } |
|
72 | } | |
73 | } else if (event.keyCode === 8 && event.type == 'keydown') { |
|
73 | } else if (event.keyCode === 8 && event.type == 'keydown') { | |
74 | // If backspace and the line ends with 4 spaces, remove them. |
|
74 | // If backspace and the line ends with 4 spaces, remove them. | |
75 | var cur = editor.getCursor(); |
|
75 | var cur = editor.getCursor(); | |
76 | var line = editor.getLine(cur.line); |
|
76 | var line = editor.getLine(cur.line); | |
77 | var ending = line.slice(-4); |
|
77 | var ending = line.slice(-4); | |
78 | if (ending === ' ') { |
|
78 | if (ending === ' ') { | |
79 | editor.replaceRange('', |
|
79 | editor.replaceRange('', | |
80 | {line: cur.line, ch: cur.ch-4}, |
|
80 | {line: cur.line, ch: cur.ch-4}, | |
81 | {line: cur.line, ch: cur.ch} |
|
81 | {line: cur.line, ch: cur.ch} | |
82 | ); |
|
82 | ); | |
83 | event.stop(); |
|
83 | event.stop(); | |
84 | return true; |
|
84 | return true; | |
85 | } else { |
|
85 | } else { | |
86 | return false; |
|
86 | return false; | |
87 | }; |
|
87 | }; | |
88 | } else { |
|
88 | } else { | |
89 | // keypress/keyup also trigger on TAB press, and we don't want to use those |
|
89 | // keypress/keyup also trigger on TAB press, and we don't want to use those | |
90 | // to disable tab completion. |
|
90 | // to disable tab completion. | |
91 | if (this.is_completing && event.keyCode !== 9) { |
|
91 | if (this.is_completing && event.keyCode !== 9) { | |
92 | var ed_cur = editor.getCursor(); |
|
92 | var ed_cur = editor.getCursor(); | |
93 | var cc_cur = this.completion_cursor; |
|
93 | var cc_cur = this.completion_cursor; | |
94 | if (ed_cur.line !== cc_cur.line || ed_cur.ch !== cc_cur.ch) { |
|
94 | if (ed_cur.line !== cc_cur.line || ed_cur.ch !== cc_cur.ch) { | |
95 | this.is_completing = false; |
|
95 | this.is_completing = false; | |
96 | this.completion_cursor = null; |
|
96 | this.completion_cursor = null; | |
97 | }; |
|
97 | }; | |
98 | }; |
|
98 | }; | |
99 | return false; |
|
99 | return false; | |
100 | }; |
|
100 | }; | |
101 | }; |
|
101 | }; | |
102 |
|
102 | |||
103 |
|
103 | |||
104 | CodeCell.prototype.finish_completing = function (matched_text, matches) { |
|
104 | CodeCell.prototype.finish_completing = function (matched_text, matches) { | |
105 | // console.log("Got matches", matched_text, matches); |
|
105 | // console.log("Got matches", matched_text, matches); | |
106 | if (!this.is_completing || matches.length === 0) {return;} |
|
106 | if (!this.is_completing || matches.length === 0) {return;} | |
107 |
|
107 | |||
108 | var that = this; |
|
108 | var that = this; | |
109 | var cur = this.completion_cursor; |
|
109 | var cur = this.completion_cursor; | |
110 |
|
110 | |||
111 | var insert = function (selected_text) { |
|
111 | var insert = function (selected_text) { | |
112 | that.code_mirror.replaceRange( |
|
112 | that.code_mirror.replaceRange( | |
113 | selected_text, |
|
113 | selected_text, | |
114 | {line: cur.line, ch: (cur.ch-matched_text.length)}, |
|
114 | {line: cur.line, ch: (cur.ch-matched_text.length)}, | |
115 | {line: cur.line, ch: cur.ch} |
|
115 | {line: cur.line, ch: cur.ch} | |
116 | ); |
|
116 | ); | |
117 | }; |
|
117 | }; | |
118 |
|
118 | |||
119 | if (matches.length === 1) { |
|
119 | if (matches.length === 1) { | |
120 | insert(matches[0]); |
|
120 | insert(matches[0]); | |
121 | setTimeout(function(){that.code_mirror.focus();}, 50); |
|
121 | setTimeout(function(){that.code_mirror.focus();}, 50); | |
122 | return; |
|
122 | return; | |
123 | }; |
|
123 | }; | |
124 |
|
124 | |||
125 | var complete = $('<div/>').addClass('completions'); |
|
125 | var complete = $('<div/>').addClass('completions'); | |
126 | var select = $('<select/>').attr('multiple','true'); |
|
126 | var select = $('<select/>').attr('multiple','true'); | |
127 | for (var i=0; i<matches.length; ++i) { |
|
127 | for (var i=0; i<matches.length; ++i) { | |
128 | select.append($('<option/>').text(matches[i])); |
|
128 | select.append($('<option/>').text(matches[i])); | |
129 | } |
|
129 | } | |
130 | select.children().first().attr('selected','true'); |
|
130 | select.children().first().attr('selected','true'); | |
131 | select.attr('size',Math.min(10,matches.length)); |
|
131 | select.attr('size',Math.min(10,matches.length)); | |
132 | var pos = this.code_mirror.cursorCoords(); |
|
132 | var pos = this.code_mirror.cursorCoords(); | |
133 | complete.css('left',pos.x+'px'); |
|
133 | complete.css('left',pos.x+'px'); | |
134 | complete.css('top',pos.yBot+'px'); |
|
134 | complete.css('top',pos.yBot+'px'); | |
135 | complete.append(select); |
|
135 | complete.append(select); | |
136 |
|
136 | |||
137 | $('body').append(complete); |
|
137 | $('body').append(complete); | |
138 | var done = false; |
|
138 | var done = false; | |
139 |
|
139 | |||
140 | var close = function () { |
|
140 | var close = function () { | |
141 | if (done) return; |
|
141 | if (done) return; | |
142 | done = true; |
|
142 | done = true; | |
143 | complete.remove(); |
|
143 | complete.remove(); | |
144 | that.is_completing = false; |
|
144 | that.is_completing = false; | |
145 | that.completion_cursor = null; |
|
145 | that.completion_cursor = null; | |
146 | }; |
|
146 | }; | |
147 |
|
147 | |||
148 | var pick = function () { |
|
148 | var pick = function () { | |
149 | insert(select.val()[0]); |
|
149 | insert(select.val()[0]); | |
150 | close(); |
|
150 | close(); | |
151 | setTimeout(function(){that.code_mirror.focus();}, 50); |
|
151 | setTimeout(function(){that.code_mirror.focus();}, 50); | |
152 | }; |
|
152 | }; | |
153 |
|
153 | |||
154 | select.blur(close); |
|
154 | select.blur(close); | |
155 | select.keydown(function (event) { |
|
155 | select.keydown(function (event) { | |
156 | var code = event.which; |
|
156 | var code = event.which; | |
157 | if (code === 13 || code === 32) { |
|
157 | if (code === 13 || code === 32) { | |
158 | // Pressing SPACE or ENTER will cause a pick |
|
158 | // Pressing SPACE or ENTER will cause a pick | |
159 | event.stopPropagation(); |
|
159 | event.stopPropagation(); | |
160 | event.preventDefault(); |
|
160 | event.preventDefault(); | |
161 | pick(); |
|
161 | pick(); | |
162 | } else if (code === 38 || code === 40) { |
|
162 | } else if (code === 38 || code === 40) { | |
163 | // We don't want the document keydown handler to handle UP/DOWN, |
|
163 | // We don't want the document keydown handler to handle UP/DOWN, | |
164 | // but we want the default action. |
|
164 | // but we want the default action. | |
165 | event.stopPropagation(); |
|
165 | event.stopPropagation(); | |
166 | } else { |
|
166 | } else { | |
167 | // All other key presses exit completion. |
|
167 | // All other key presses exit completion. | |
168 | event.stopPropagation(); |
|
168 | event.stopPropagation(); | |
169 | event.preventDefault(); |
|
169 | event.preventDefault(); | |
170 | close(); |
|
170 | close(); | |
171 | that.code_mirror.focus(); |
|
171 | that.code_mirror.focus(); | |
172 | } |
|
172 | } | |
173 | }); |
|
173 | }); | |
174 | // Double click also causes a pick. |
|
174 | // Double click also causes a pick. | |
175 | select.dblclick(pick); |
|
175 | select.dblclick(pick); | |
176 | select.focus(); |
|
176 | select.focus(); | |
177 | }; |
|
177 | }; | |
178 |
|
178 | |||
179 |
|
179 | |||
180 | CodeCell.prototype.select = function () { |
|
180 | CodeCell.prototype.select = function () { | |
181 | IPython.Cell.prototype.select.apply(this); |
|
181 | IPython.Cell.prototype.select.apply(this); | |
182 | // Todo: this dance is needed because as of CodeMirror 2.12, focus is |
|
182 | // Todo: this dance is needed because as of CodeMirror 2.12, focus is | |
183 | // not causing the cursor to blink if the editor is empty initially. |
|
183 | // not causing the cursor to blink if the editor is empty initially. | |
184 | // While this seems to fix the issue, this should be fixed |
|
184 | // While this seems to fix the issue, this should be fixed | |
185 | // in CodeMirror proper. |
|
185 | // in CodeMirror proper. | |
186 | var s = this.code_mirror.getValue(); |
|
186 | var s = this.code_mirror.getValue(); | |
187 | this.code_mirror.focus(); |
|
187 | this.code_mirror.focus(); | |
188 | if (s === '') this.code_mirror.setValue(''); |
|
188 | if (s === '') this.code_mirror.setValue(''); | |
189 | }; |
|
189 | }; | |
190 |
|
190 | |||
191 |
|
191 | |||
192 | CodeCell.prototype.append_output = function (json) { |
|
192 | CodeCell.prototype.append_output = function (json) { | |
193 | this.expand(); |
|
193 | this.expand(); | |
194 | if (json.output_type === 'pyout') { |
|
194 | if (json.output_type === 'pyout') { | |
195 | this.append_pyout(json); |
|
195 | this.append_pyout(json); | |
196 | } else if (json.output_type === 'pyerr') { |
|
196 | } else if (json.output_type === 'pyerr') { | |
197 | this.append_pyerr(json); |
|
197 | this.append_pyerr(json); | |
198 | } else if (json.output_type === 'display_data') { |
|
198 | } else if (json.output_type === 'display_data') { | |
199 | this.append_display_data(json); |
|
199 | this.append_display_data(json); | |
200 | } else if (json.output_type === 'stream') { |
|
200 | } else if (json.output_type === 'stream') { | |
201 | this.append_stream(json); |
|
201 | this.append_stream(json); | |
202 | }; |
|
202 | }; | |
203 | this.outputs.push(json); |
|
203 | this.outputs.push(json); | |
204 | }; |
|
204 | }; | |
205 |
|
205 | |||
206 |
|
206 | |||
207 | CodeCell.prototype.append_pyout = function (json) { |
|
207 | CodeCell.prototype.append_pyout = function (json) { | |
208 | n = json.prompt_number || ' '; |
|
208 | n = json.prompt_number || ' '; | |
209 | var toinsert = $("<div/>").addClass("output_pyout hbox"); |
|
209 | var toinsert = $("<div/>").addClass("output_pyout hbox output_area"); | |
210 | toinsert.append($('<div/>'). |
|
210 | toinsert.append($('<div/>'). | |
211 | addClass('prompt output_prompt'). |
|
211 | addClass('prompt output_prompt'). | |
212 | html('Out[' + n + ']:') |
|
212 | html('Out[' + n + ']:') | |
213 | ); |
|
213 | ); | |
214 |
this.append_mime_type(json, toinsert) |
|
214 | this.append_mime_type(json, toinsert); | |
215 | toinsert.children().last().addClass("box_flex1 pyout_area"); |
|
215 | toinsert.children().last().addClass("box_flex1 pyout_area"); | |
216 | this.element.find("div.output").append(toinsert); |
|
216 | this.element.find("div.output").append(toinsert); | |
217 | // If we just output latex, typeset it. |
|
217 | // If we just output latex, typeset it. | |
218 | if (json.latex !== undefined) { |
|
218 | if (json.latex !== undefined) { | |
219 | MathJax.Hub.Queue(["Typeset",MathJax.Hub]); |
|
219 | MathJax.Hub.Queue(["Typeset",MathJax.Hub]); | |
220 | }; |
|
220 | }; | |
221 | }; |
|
221 | }; | |
222 |
|
222 | |||
223 |
|
223 | |||
224 | CodeCell.prototype.append_pyerr = function (json) { |
|
224 | CodeCell.prototype.append_pyerr = function (json) { | |
225 | var tb = json.traceback; |
|
225 | var tb = json.traceback; | |
226 | if (tb !== undefined && tb.length > 0) { |
|
226 | if (tb !== undefined && tb.length > 0) { | |
227 | var s = ''; |
|
227 | var s = ''; | |
228 | var len = tb.length; |
|
228 | var len = tb.length; | |
229 | for (var i=0; i<len; i++) { |
|
229 | for (var i=0; i<len; i++) { | |
230 | s = s + tb[i] + '\n'; |
|
230 | s = s + tb[i] + '\n'; | |
231 | } |
|
231 | } | |
232 | s = s + '\n'; |
|
232 | s = s + '\n'; | |
233 | this.append_text(s).addClass('output_area'); |
|
233 | this.append_text(s).addClass('output_area'); | |
234 | }; |
|
234 | }; | |
235 | }; |
|
235 | }; | |
236 |
|
236 | |||
237 |
|
237 | |||
238 | CodeCell.prototype.append_stream = function (json) { |
|
238 | CodeCell.prototype.append_stream = function (json) { | |
239 | this.append_text(json.text).addClass('output_area'); |
|
239 | this.append_text(json.text).addClass('output_area'); | |
240 | }; |
|
240 | }; | |
241 |
|
241 | |||
242 |
|
242 | |||
243 | CodeCell.prototype.append_display_data = function (json) { |
|
243 | CodeCell.prototype.append_display_data = function (json) { | |
244 | this.append_mime_type(json).addClass('output_area'); |
|
244 | this.append_mime_type(json).addClass('output_area'); | |
245 | // If we just output latex, typeset it. |
|
245 | // If we just output latex, typeset it. | |
246 | if (json.latex !== undefined) { |
|
246 | if (json.latex !== undefined) { | |
247 | MathJax.Hub.Queue(["Typeset",MathJax.Hub]); |
|
247 | MathJax.Hub.Queue(["Typeset",MathJax.Hub]); | |
248 | }; |
|
248 | }; | |
249 | }; |
|
249 | }; | |
250 |
|
250 | |||
251 |
|
251 | |||
252 | CodeCell.prototype.append_mime_type = function (json, element) { |
|
252 | CodeCell.prototype.append_mime_type = function (json, element) { | |
253 | element = element || this.element.find("div.output"); |
|
253 | element = element || this.element.find("div.output"); | |
254 | if (json.html !== undefined) { |
|
254 | if (json.html !== undefined) { | |
255 | this.append_html(json.html, element); |
|
255 | inserted = this.append_html(json.html, element); | |
256 | } else if (json.latex !== undefined) { |
|
256 | } else if (json.latex !== undefined) { | |
257 | this.append_latex(json.latex, element); |
|
257 | inserted = this.append_latex(json.latex, element); | |
258 | } else if (json.svg !== undefined) { |
|
258 | } else if (json.svg !== undefined) { | |
259 | this.append_svg(json.svg, element); |
|
259 | inserted = this.append_svg(json.svg, element); | |
260 | } else if (json.png !== undefined) { |
|
260 | } else if (json.png !== undefined) { | |
261 | this.append_png(json.png, element); |
|
261 | inserted = this.append_png(json.png, element); | |
262 | } else if (json.jpeg !== undefined) { |
|
262 | } else if (json.jpeg !== undefined) { | |
263 | this.append_jpeg(json.jpeg, element); |
|
263 | inserted = this.append_jpeg(json.jpeg, element); | |
264 | } else if (json.text !== undefined) { |
|
264 | } else if (json.text !== undefined) { | |
265 | this.append_text(json.text, element); |
|
265 | inserted = this.append_text(json.text, element); | |
266 | }; |
|
266 | }; | |
267 |
return |
|
267 | return inserted; | |
268 | }; |
|
268 | }; | |
269 |
|
269 | |||
270 |
|
270 | |||
271 | CodeCell.prototype.append_html = function (html, element) { |
|
271 | CodeCell.prototype.append_html = function (html, element) { | |
272 | element = element || this.element.find("div.output"); |
|
272 | element = element || this.element.find("div.output"); | |
273 | var toinsert = $("<div/>").addClass("output_html rendered_html"); |
|
273 | var toinsert = $("<div/>").addClass("output_html rendered_html"); | |
274 | toinsert.append(html); |
|
274 | toinsert.append(html); | |
275 | element.append(toinsert); |
|
275 | element.append(toinsert); | |
276 |
return |
|
276 | return toinsert; | |
277 | } |
|
277 | } | |
278 |
|
278 | |||
279 |
|
279 | |||
280 | CodeCell.prototype.append_text = function (data, element) { |
|
280 | CodeCell.prototype.append_text = function (data, element) { | |
281 | element = element || this.element.find("div.output"); |
|
281 | element = element || this.element.find("div.output"); | |
282 | var toinsert = $("<div/>").addClass("output_stream"); |
|
282 | var toinsert = $("<div/>").addClass("output_stream"); | |
283 | toinsert.append($("<pre/>").html(data)); |
|
283 | toinsert.append($("<pre/>").html(data)); | |
284 | element.append(toinsert); |
|
284 | element.append(toinsert); | |
285 |
return |
|
285 | return toinsert; | |
286 | }; |
|
286 | }; | |
287 |
|
287 | |||
288 |
|
288 | |||
289 | CodeCell.prototype.append_svg = function (svg, element) { |
|
289 | CodeCell.prototype.append_svg = function (svg, element) { | |
290 | element = element || this.element.find("div.output"); |
|
290 | element = element || this.element.find("div.output"); | |
291 | var toinsert = $("<div/>").addClass("output_svg"); |
|
291 | var toinsert = $("<div/>").addClass("output_svg"); | |
292 | toinsert.append(svg); |
|
292 | toinsert.append(svg); | |
293 | element.append(toinsert); |
|
293 | element.append(toinsert); | |
294 |
return |
|
294 | return toinsert; | |
295 | }; |
|
295 | }; | |
296 |
|
296 | |||
297 |
|
297 | |||
298 | CodeCell.prototype.append_png = function (png, element) { |
|
298 | CodeCell.prototype.append_png = function (png, element) { | |
299 | element = element || this.element.find("div.output"); |
|
299 | element = element || this.element.find("div.output"); | |
300 | var toinsert = $("<div/>").addClass("output_png"); |
|
300 | var toinsert = $("<div/>").addClass("output_png"); | |
301 | toinsert.append($("<img/>").attr('src','data:image/png;base64,'+png)); |
|
301 | toinsert.append($("<img/>").attr('src','data:image/png;base64,'+png)); | |
302 | element.append(toinsert); |
|
302 | element.append(toinsert); | |
303 |
return |
|
303 | return toinsert; | |
304 | }; |
|
304 | }; | |
305 |
|
305 | |||
306 |
|
306 | |||
307 | CodeCell.prototype.append_jpeg = function (jpeg, element) { |
|
307 | CodeCell.prototype.append_jpeg = function (jpeg, element) { | |
308 | element = element || this.element.find("div.output"); |
|
308 | element = element || this.element.find("div.output"); | |
309 | var toinsert = $("<div/>").addClass("output_jpeg"); |
|
309 | var toinsert = $("<div/>").addClass("output_jpeg"); | |
310 | toinsert.append($("<img/>").attr('src','data:image/jpeg;base64,'+jpeg)); |
|
310 | toinsert.append($("<img/>").attr('src','data:image/jpeg;base64,'+jpeg)); | |
311 | element.append(toinsert); |
|
311 | element.append(toinsert); | |
312 |
return |
|
312 | return toinsert; | |
313 | }; |
|
313 | }; | |
314 |
|
314 | |||
315 |
|
315 | |||
316 | CodeCell.prototype.append_latex = function (latex, element) { |
|
316 | CodeCell.prototype.append_latex = function (latex, element) { | |
317 | // This method cannot do the typesetting because the latex first has to |
|
317 | // This method cannot do the typesetting because the latex first has to | |
318 | // be on the page. |
|
318 | // be on the page. | |
319 | element = element || this.element.find("div.output"); |
|
319 | element = element || this.element.find("div.output"); | |
320 | var toinsert = $("<div/>").addClass("output_latex"); |
|
320 | var toinsert = $("<div/>").addClass("output_latex"); | |
321 | toinsert.append(latex); |
|
321 | toinsert.append(latex); | |
322 | element.append(toinsert); |
|
322 | element.append(toinsert); | |
323 |
return |
|
323 | return toinsert; | |
324 | } |
|
324 | } | |
325 |
|
325 | |||
326 |
|
326 | |||
327 | CodeCell.prototype.clear_output = function () { |
|
327 | CodeCell.prototype.clear_output = function () { | |
328 | this.element.find("div.output").html(""); |
|
328 | this.element.find("div.output").html(""); | |
329 | this.outputs = []; |
|
329 | this.outputs = []; | |
330 | }; |
|
330 | }; | |
331 |
|
331 | |||
332 |
|
332 | |||
333 | CodeCell.prototype.clear_input = function () { |
|
333 | CodeCell.prototype.clear_input = function () { | |
334 | this.code_mirror.setValue(''); |
|
334 | this.code_mirror.setValue(''); | |
335 | }; |
|
335 | }; | |
336 |
|
336 | |||
337 |
|
337 | |||
338 | CodeCell.prototype.collapse = function () { |
|
338 | CodeCell.prototype.collapse = function () { | |
339 | if (!this.collapsed) { |
|
339 | if (!this.collapsed) { | |
340 | this.element.find('div.output').hide(); |
|
340 | this.element.find('div.output').hide(); | |
341 | this.collapsed = true; |
|
341 | this.collapsed = true; | |
342 | }; |
|
342 | }; | |
343 | }; |
|
343 | }; | |
344 |
|
344 | |||
345 |
|
345 | |||
346 | CodeCell.prototype.expand = function () { |
|
346 | CodeCell.prototype.expand = function () { | |
347 | if (this.collapsed) { |
|
347 | if (this.collapsed) { | |
348 | this.element.find('div.output').show(); |
|
348 | this.element.find('div.output').show(); | |
349 | this.collapsed = false; |
|
349 | this.collapsed = false; | |
350 | }; |
|
350 | }; | |
351 | }; |
|
351 | }; | |
352 |
|
352 | |||
353 |
|
353 | |||
354 | CodeCell.prototype.set_input_prompt = function (number) { |
|
354 | CodeCell.prototype.set_input_prompt = function (number) { | |
355 | var n = number || ' '; |
|
355 | var n = number || ' '; | |
356 | this.input_prompt_number = n |
|
356 | this.input_prompt_number = n | |
357 | this.element.find('div.input_prompt').html('In [' + n + ']:'); |
|
357 | this.element.find('div.input_prompt').html('In [' + n + ']:'); | |
358 | }; |
|
358 | }; | |
359 |
|
359 | |||
360 |
|
360 | |||
361 | CodeCell.prototype.get_code = function () { |
|
361 | CodeCell.prototype.get_code = function () { | |
362 | return this.code_mirror.getValue(); |
|
362 | return this.code_mirror.getValue(); | |
363 | }; |
|
363 | }; | |
364 |
|
364 | |||
365 |
|
365 | |||
366 | CodeCell.prototype.set_code = function (code) { |
|
366 | CodeCell.prototype.set_code = function (code) { | |
367 | return this.code_mirror.setValue(code); |
|
367 | return this.code_mirror.setValue(code); | |
368 | }; |
|
368 | }; | |
369 |
|
369 | |||
370 |
|
370 | |||
371 | CodeCell.prototype.at_top = function () { |
|
371 | CodeCell.prototype.at_top = function () { | |
372 | var cursor = this.code_mirror.getCursor(); |
|
372 | var cursor = this.code_mirror.getCursor(); | |
373 | if (cursor.line === 0) { |
|
373 | if (cursor.line === 0) { | |
374 | return true; |
|
374 | return true; | |
375 | } else { |
|
375 | } else { | |
376 | return false; |
|
376 | return false; | |
377 | } |
|
377 | } | |
378 | }; |
|
378 | }; | |
379 |
|
379 | |||
380 |
|
380 | |||
381 | CodeCell.prototype.at_bottom = function () { |
|
381 | CodeCell.prototype.at_bottom = function () { | |
382 | var cursor = this.code_mirror.getCursor(); |
|
382 | var cursor = this.code_mirror.getCursor(); | |
383 | if (cursor.line === (this.code_mirror.lineCount()-1)) { |
|
383 | if (cursor.line === (this.code_mirror.lineCount()-1)) { | |
384 | return true; |
|
384 | return true; | |
385 | } else { |
|
385 | } else { | |
386 | return false; |
|
386 | return false; | |
387 | } |
|
387 | } | |
388 | }; |
|
388 | }; | |
389 |
|
389 | |||
390 |
|
390 | |||
391 | CodeCell.prototype.fromJSON = function (data) { |
|
391 | CodeCell.prototype.fromJSON = function (data) { | |
392 | // console.log('Import from JSON:', data); |
|
392 | // console.log('Import from JSON:', data); | |
393 | if (data.cell_type === 'code') { |
|
393 | if (data.cell_type === 'code') { | |
394 | if (data.input !== undefined) { |
|
394 | if (data.input !== undefined) { | |
395 | this.set_code(data.input); |
|
395 | this.set_code(data.input); | |
396 | } |
|
396 | } | |
397 | if (data.prompt_number !== undefined) { |
|
397 | if (data.prompt_number !== undefined) { | |
398 | this.set_input_prompt(data.prompt_number); |
|
398 | this.set_input_prompt(data.prompt_number); | |
399 | } else { |
|
399 | } else { | |
400 | this.set_input_prompt(); |
|
400 | this.set_input_prompt(); | |
401 | }; |
|
401 | }; | |
402 | var len = data.outputs.length; |
|
402 | var len = data.outputs.length; | |
403 | for (var i=0; i<len; i++) { |
|
403 | for (var i=0; i<len; i++) { | |
404 | this.append_output(data.outputs[i]); |
|
404 | this.append_output(data.outputs[i]); | |
405 | }; |
|
405 | }; | |
406 | if (data.collapsed !== undefined) { |
|
406 | if (data.collapsed !== undefined) { | |
407 | if (data.collapsed) { |
|
407 | if (data.collapsed) { | |
408 | this.collapse(); |
|
408 | this.collapse(); | |
409 | }; |
|
409 | }; | |
410 | }; |
|
410 | }; | |
411 | }; |
|
411 | }; | |
412 | }; |
|
412 | }; | |
413 |
|
413 | |||
414 |
|
414 | |||
415 | CodeCell.prototype.toJSON = function () { |
|
415 | CodeCell.prototype.toJSON = function () { | |
416 | var data = {}; |
|
416 | var data = {}; | |
417 | data.input = this.get_code(); |
|
417 | data.input = this.get_code(); | |
418 | data.cell_type = 'code'; |
|
418 | data.cell_type = 'code'; | |
419 | if (this.input_prompt_number !== ' ') { |
|
419 | if (this.input_prompt_number !== ' ') { | |
420 | data.prompt_number = this.input_prompt_number |
|
420 | data.prompt_number = this.input_prompt_number | |
421 | }; |
|
421 | }; | |
422 | var outputs = []; |
|
422 | var outputs = []; | |
423 | var len = this.outputs.length; |
|
423 | var len = this.outputs.length; | |
424 | for (var i=0; i<len; i++) { |
|
424 | for (var i=0; i<len; i++) { | |
425 | outputs[i] = this.outputs[i]; |
|
425 | outputs[i] = this.outputs[i]; | |
426 | }; |
|
426 | }; | |
427 | data.outputs = outputs; |
|
427 | data.outputs = outputs; | |
428 | data.language = 'python'; |
|
428 | data.language = 'python'; | |
429 | data.collapsed = this.collapsed; |
|
429 | data.collapsed = this.collapsed; | |
430 | // console.log('Export to JSON:',data); |
|
430 | // console.log('Export to JSON:',data); | |
431 | return data; |
|
431 | return data; | |
432 | }; |
|
432 | }; | |
433 |
|
433 | |||
434 |
|
434 | |||
435 | IPython.CodeCell = CodeCell; |
|
435 | IPython.CodeCell = CodeCell; | |
436 |
|
436 | |||
437 | return IPython; |
|
437 | return IPython; | |
438 | }(IPython)); |
|
438 | }(IPython)); | |
439 |
|
439 |
1 | NO CONTENT: modified file |
|
NO CONTENT: modified file |
@@ -1,229 +1,229 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 | <link rel="stylesheet" href="static/jquery/css/themes/aristo/jquery-wijmo.css" type="text/css" /> |
|
9 | <link rel="stylesheet" href="static/jquery/css/themes/aristo/jquery-wijmo.css" type="text/css" /> | |
10 | <!-- <link rel="stylesheet" href="static/jquery/css/themes/rocket/jquery-wijmo.css" type="text/css" /> --> |
|
10 | <!-- <link rel="stylesheet" href="static/jquery/css/themes/rocket/jquery-wijmo.css" type="text/css" /> --> | |
11 | <!-- <link rel="stylesheet" href="static/jquery/css/themes/smoothness/jquery-ui-1.8.14.custom.css" type="text/css" />--> |
|
11 | <!-- <link rel="stylesheet" href="static/jquery/css/themes/smoothness/jquery-ui-1.8.14.custom.css" type="text/css" />--> | |
12 |
|
12 | |||
13 | <script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML" charset="utf-8"></script> |
|
13 | <script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML" charset="utf-8"></script> | |
14 | <!-- <script type='text/javascript' src='static/mathjax/MathJax.js?config=TeX-AMS_HTML' charset='utf-8'></script> --> |
|
14 | <!-- <script type='text/javascript' src='static/mathjax/MathJax.js?config=TeX-AMS_HTML' charset='utf-8'></script> --> | |
15 | <script type="text/javascript"> |
|
15 | <script type="text/javascript"> | |
16 | if (typeof MathJax == 'undefined') { |
|
16 | if (typeof MathJax == 'undefined') { | |
17 | console.log("Trying to load local copy of MathJax"); |
|
17 | console.log("Trying to load local copy of MathJax"); | |
18 | document.write(unescape("%3Cscript type='text/javascript' src='static/mathjax/MathJax.js%3Fconfig=TeX-AMS_HTML' charset='utf-8'%3E%3C/script%3E")); |
|
18 | document.write(unescape("%3Cscript type='text/javascript' src='static/mathjax/MathJax.js%3Fconfig=TeX-AMS_HTML' charset='utf-8'%3E%3C/script%3E")); | |
19 | } |
|
19 | } | |
20 | </script> |
|
20 | </script> | |
21 |
|
21 | |||
22 | <link rel="stylesheet" href="static/codemirror-2.12/lib/codemirror.css"> |
|
22 | <link rel="stylesheet" href="static/codemirror-2.12/lib/codemirror.css"> | |
23 | <link rel="stylesheet" href="static/codemirror-2.12/mode/rst/rst.css"> |
|
23 | <link rel="stylesheet" href="static/codemirror-2.12/mode/rst/rst.css"> | |
24 | <link rel="stylesheet" href="static/codemirror-2.12/theme/ipython.css"> |
|
24 | <link rel="stylesheet" href="static/codemirror-2.12/theme/ipython.css"> | |
25 | <link rel="stylesheet" href="static/codemirror-2.12/theme/default.css"> |
|
25 | <link rel="stylesheet" href="static/codemirror-2.12/theme/default.css"> | |
26 |
|
26 | |||
27 | <link rel="stylesheet" href="static/css/boilerplate.css" type="text/css" /> |
|
27 | <link rel="stylesheet" href="static/css/boilerplate.css" type="text/css" /> | |
28 | <link rel="stylesheet" href="static/css/layout.css" type="text/css" /> |
|
28 | <link rel="stylesheet" href="static/css/layout.css" type="text/css" /> | |
29 | <link rel="stylesheet" href="static/css/base.css" type="text/css" /> |
|
29 | <link rel="stylesheet" href="static/css/base.css" type="text/css" /> | |
30 | <link rel="stylesheet" href="static/css/notebook.css" type="text/css" /> |
|
30 | <link rel="stylesheet" href="static/css/notebook.css" type="text/css" /> | |
31 | <link rel="stylesheet" href="static/css/renderedhtml.css" type="text/css" /> |
|
31 | <link rel="stylesheet" href="static/css/renderedhtml.css" type="text/css" /> | |
32 |
|
32 | |||
33 |
|
33 | |||
34 | </head> |
|
34 | </head> | |
35 |
|
35 | |||
36 | <body> |
|
36 | <body> | |
37 |
|
37 | |||
38 | <div id="header"> |
|
38 | <div id="header"> | |
39 | <span id="ipython_notebook"><h1>IPython Notebook</h1></span> |
|
39 | <span id="ipython_notebook"><h1>IPython Notebook</h1></span> | |
40 | <span id="save_widget"> |
|
40 | <span id="save_widget"> | |
41 | <input type="text" id="notebook_name" size="20"></textarea> |
|
41 | <input type="text" id="notebook_name" size="20"></textarea> | |
42 | <span id="notebook_id" style="display:none">{{notebook_id}}</span> |
|
42 | <span id="notebook_id" style="display:none">{{notebook_id}}</span> | |
43 | <button id="save_notebook">Save</button> |
|
43 | <button id="save_notebook">Save</button> | |
44 | </span> |
|
44 | </span> | |
45 | <span id="kernel_status">Idle</span> |
|
45 | <span id="kernel_status">Idle</span> | |
46 | </div> |
|
46 | </div> | |
47 |
|
47 | |||
48 | <div id="main_app"> |
|
48 | <div id="main_app"> | |
49 |
|
49 | |||
50 | <div id="left_panel"> |
|
50 | <div id="left_panel"> | |
51 |
|
51 | |||
52 | <div id="notebook_section"> |
|
52 | <div id="notebook_section"> | |
53 | <h3 class="section_header">Notebook</h3> |
|
53 | <h3 class="section_header">Notebook</h3> | |
54 | <div class="section_content"> |
|
54 | <div class="section_content"> | |
55 | <div class="section_row"> |
|
55 | <div class="section_row"> | |
56 | <span id="new_open" class="section_row_buttons"> |
|
56 | <span id="new_open" class="section_row_buttons"> | |
57 | <button id="new_notebook">New</button> |
|
57 | <button id="new_notebook">New</button> | |
58 | <button id="open_notebook">Open</button> |
|
58 | <button id="open_notebook">Open</button> | |
59 | </span> |
|
59 | </span> | |
60 | <span class="section_row_header">Actions</span> |
|
60 | <span class="section_row_header">Actions</span> | |
61 | </div> |
|
61 | </div> | |
62 | <div class="section_row"> |
|
62 | <div class="section_row"> | |
63 | <span> |
|
63 | <span> | |
64 | <select id="download_format"> |
|
64 | <select id="download_format"> | |
65 | <option value="xml">xml</option> |
|
65 | <option value="xml">xml</option> | |
66 | <option value="json">json</option> |
|
66 | <option value="json">json</option> | |
67 | <option value="py">py</option> |
|
67 | <option value="py">py</option> | |
68 | </select> |
|
68 | </select> | |
69 | </span> |
|
69 | </span> | |
70 | <span class="section_row_buttons"> |
|
70 | <span class="section_row_buttons"> | |
71 | <span id="print_widget"> |
|
71 | <span id="print_widget"> | |
72 |
<button id="print_notebook">Print |
|
72 | <button id="print_notebook">Print</button> | |
73 | </span> |
|
73 | </span> | |
74 |
|
74 | |||
75 | <button id="download_notebook">Export</button> |
|
75 | <button id="download_notebook">Export</button> | |
76 | </span> |
|
76 | </span> | |
77 | </div> |
|
77 | </div> | |
78 | </div> |
|
78 | </div> | |
79 | </div> |
|
79 | </div> | |
80 |
|
80 | |||
81 | <div id="cell_section"> |
|
81 | <div id="cell_section"> | |
82 | <h3 class="section_header">Cell</h3> |
|
82 | <h3 class="section_header">Cell</h3> | |
83 | <div class="section_content"> |
|
83 | <div class="section_content"> | |
84 | <div class="section_row"> |
|
84 | <div class="section_row"> | |
85 | <span class="section_row_buttons"> |
|
85 | <span class="section_row_buttons"> | |
86 | <button id="delete_cell">Delete</button> |
|
86 | <button id="delete_cell">Delete</button> | |
87 | </span> |
|
87 | </span> | |
88 | <span class="section_row_header">Actions</span> |
|
88 | <span class="section_row_header">Actions</span> | |
89 | </div> |
|
89 | </div> | |
90 | <div class="section_row"> |
|
90 | <div class="section_row"> | |
91 | <span id="cell_type" class="section_row_buttons"> |
|
91 | <span id="cell_type" class="section_row_buttons"> | |
92 | <button id="to_code">Code</button> |
|
92 | <button id="to_code">Code</button> | |
93 | <!-- <button id="to_html">HTML</button>--> |
|
93 | <!-- <button id="to_html">HTML</button>--> | |
94 | <button id="to_markdown">Markdown</button> |
|
94 | <button id="to_markdown">Markdown</button> | |
95 | </span> |
|
95 | </span> | |
96 | <span class="button_label">Format</span> |
|
96 | <span class="button_label">Format</span> | |
97 | </div> |
|
97 | </div> | |
98 | <div class="section_row"> |
|
98 | <div class="section_row"> | |
99 | <span id="toggle_output" class="section_row_buttons"> |
|
99 | <span id="toggle_output" class="section_row_buttons"> | |
100 | <button id="collapse_cell">Collapse</button> |
|
100 | <button id="collapse_cell">Collapse</button> | |
101 | <button id="expand_cell">Expand</button> |
|
101 | <button id="expand_cell">Expand</button> | |
102 | <button id="clear_all_output">ClearAll</button> |
|
102 | <button id="clear_all_output">ClearAll</button> | |
103 | </span> |
|
103 | </span> | |
104 | <span class="button_label">Output</span> |
|
104 | <span class="button_label">Output</span> | |
105 | </div> |
|
105 | </div> | |
106 | <div class="section_row"> |
|
106 | <div class="section_row"> | |
107 | <span id="insert" class="section_row_buttons"> |
|
107 | <span id="insert" class="section_row_buttons"> | |
108 | <button id="insert_cell_above">Above</button> |
|
108 | <button id="insert_cell_above">Above</button> | |
109 | <button id="insert_cell_below">Below</button> |
|
109 | <button id="insert_cell_below">Below</button> | |
110 | </span> |
|
110 | </span> | |
111 | <span class="button_label">Insert</span> |
|
111 | <span class="button_label">Insert</span> | |
112 | </div> |
|
112 | </div> | |
113 | <div class="section_row"> |
|
113 | <div class="section_row"> | |
114 | <span id="move" class="section_row_buttons"> |
|
114 | <span id="move" class="section_row_buttons"> | |
115 | <button id="move_cell_up">Up</button> |
|
115 | <button id="move_cell_up">Up</button> | |
116 | <button id="move_cell_down">Down</button> |
|
116 | <button id="move_cell_down">Down</button> | |
117 | </span> |
|
117 | </span> | |
118 | <span class="button_label">Move</span> |
|
118 | <span class="button_label">Move</span> | |
119 | </div> |
|
119 | </div> | |
120 | <div class="section_row"> |
|
120 | <div class="section_row"> | |
121 | <span id="run_cells" class="section_row_buttons"> |
|
121 | <span id="run_cells" class="section_row_buttons"> | |
122 | <button id="run_selected_cell">Selected</button> |
|
122 | <button id="run_selected_cell">Selected</button> | |
123 | <button id="run_all_cells">All</button> |
|
123 | <button id="run_all_cells">All</button> | |
124 | </span> |
|
124 | </span> | |
125 | <span class="button_label">Run</span> |
|
125 | <span class="button_label">Run</span> | |
126 | </div> |
|
126 | </div> | |
127 | <div class="section_row"> |
|
127 | <div class="section_row"> | |
128 | <span id="autoindent_span"> |
|
128 | <span id="autoindent_span"> | |
129 | <input type="checkbox" id="autoindent" checked="true"></input> |
|
129 | <input type="checkbox" id="autoindent" checked="true"></input> | |
130 | </span> |
|
130 | </span> | |
131 | <span class="checkbox_label">Autoindent:</span> |
|
131 | <span class="checkbox_label">Autoindent:</span> | |
132 | </div> |
|
132 | </div> | |
133 | </div> |
|
133 | </div> | |
134 | </div> |
|
134 | </div> | |
135 |
|
135 | |||
136 | <div id="kernel_section"> |
|
136 | <div id="kernel_section"> | |
137 | <h3 class="section_header">Kernel</h3> |
|
137 | <h3 class="section_header">Kernel</h3> | |
138 | <div class="section_content"> |
|
138 | <div class="section_content"> | |
139 | <div class="section_row"> |
|
139 | <div class="section_row"> | |
140 | <span id="int_restart" class="section_row_buttons"> |
|
140 | <span id="int_restart" class="section_row_buttons"> | |
141 | <button id="int_kernel">Interrupt</button> |
|
141 | <button id="int_kernel">Interrupt</button> | |
142 | <button id="restart_kernel">Restart</button> |
|
142 | <button id="restart_kernel">Restart</button> | |
143 | </span> |
|
143 | </span> | |
144 | <span class="section_row_header">Actions</span> |
|
144 | <span class="section_row_header">Actions</span> | |
145 | </div> |
|
145 | </div> | |
146 | <div class="section_row"> |
|
146 | <div class="section_row"> | |
147 | <span id="kernel_persist"> |
|
147 | <span id="kernel_persist"> | |
148 | <input type="checkbox" id="kill_kernel"></input> |
|
148 | <input type="checkbox" id="kill_kernel"></input> | |
149 | </span> |
|
149 | </span> | |
150 | <span class="checkbox_label">Kill kernel upon exit:</span> |
|
150 | <span class="checkbox_label">Kill kernel upon exit:</span> | |
151 | </div> |
|
151 | </div> | |
152 | </div> |
|
152 | </div> | |
153 | </div> |
|
153 | </div> | |
154 |
|
154 | |||
155 | <div id="help_section"> |
|
155 | <div id="help_section"> | |
156 | <h3 class="section_header">Help</h3> |
|
156 | <h3 class="section_header">Help</h3> | |
157 | <div class="section_content"> |
|
157 | <div class="section_content"> | |
158 | <div class="section_row"> |
|
158 | <div class="section_row"> | |
159 | <span id="help_buttons0" class="section_row_buttons"> |
|
159 | <span id="help_buttons0" class="section_row_buttons"> | |
160 | <button id="python_help"><a href="http://docs.python.org" target="_blank">Python</a></button> |
|
160 | <button id="python_help"><a href="http://docs.python.org" target="_blank">Python</a></button> | |
161 | <button id="ipython_help"><a href="http://ipython.org/documentation.html" target="_blank">IPython</a></button> |
|
161 | <button id="ipython_help"><a href="http://ipython.org/documentation.html" target="_blank">IPython</a></button> | |
162 | <button id="numpy_help"><a href="http://docs.scipy.org/doc/numpy/reference/" target="_blank">NumPy</a></button> |
|
162 | <button id="numpy_help"><a href="http://docs.scipy.org/doc/numpy/reference/" target="_blank">NumPy</a></button> | |
163 | </span> |
|
163 | </span> | |
164 | <span class="section_row_header">Links</span> |
|
164 | <span class="section_row_header">Links</span> | |
165 | </div> |
|
165 | </div> | |
166 | <div class="section_row"> |
|
166 | <div class="section_row"> | |
167 | <span id="help_buttons1" class="section_row_buttons"> |
|
167 | <span id="help_buttons1" class="section_row_buttons"> | |
168 | <button id="matplotlib_help"><a href="http://matplotlib.sourceforge.net/" target="_blank">MPL</a></button> |
|
168 | <button id="matplotlib_help"><a href="http://matplotlib.sourceforge.net/" target="_blank">MPL</a></button> | |
169 | <button id="scipy_help"><a href="http://docs.scipy.org/doc/scipy/reference/" target="_blank">SciPy</a></button> |
|
169 | <button id="scipy_help"><a href="http://docs.scipy.org/doc/scipy/reference/" target="_blank">SciPy</a></button> | |
170 | <button id="sympy_help"><a href="http://docs.sympy.org/dev/index.html" target="_blank">SymPy</a></button> |
|
170 | <button id="sympy_help"><a href="http://docs.sympy.org/dev/index.html" target="_blank">SymPy</a></button> | |
171 | </span> |
|
171 | </span> | |
172 | </div> |
|
172 | </div> | |
173 | <div class="section_row"> |
|
173 | <div class="section_row"> | |
174 | <span class="help_string">run selected cell</span> |
|
174 | <span class="help_string">run selected cell</span> | |
175 | <span class="help_string_label">Shift-Enter |</span> |
|
175 | <span class="help_string_label">Shift-Enter |</span> | |
176 | </div> |
|
176 | </div> | |
177 | <div class="section_row"> |
|
177 | <div class="section_row"> | |
178 | <span class="help_string">run in terminal mode</span> |
|
178 | <span class="help_string">run in terminal mode</span> | |
179 | <span class="help_string_label">Ctrl-Enter |</span> |
|
179 | <span class="help_string_label">Ctrl-Enter |</span> | |
180 | </div> |
|
180 | </div> | |
181 | </div> |
|
181 | </div> | |
182 | </div> |
|
182 | </div> | |
183 |
|
183 | |||
184 | </div> |
|
184 | </div> | |
185 | <div id="left_panel_splitter"></div> |
|
185 | <div id="left_panel_splitter"></div> | |
186 | <div id="notebook_panel"> |
|
186 | <div id="notebook_panel"> | |
187 | <div id="notebook"></div> |
|
187 | <div id="notebook"></div> | |
188 | <div id="pager_splitter"></div> |
|
188 | <div id="pager_splitter"></div> | |
189 | <div id="pager"></div> |
|
189 | <div id="pager"></div> | |
190 | </div> |
|
190 | </div> | |
191 |
|
191 | |||
192 | </div> |
|
192 | </div> | |
193 |
|
193 | |||
194 | <script src="static/jquery/js/jquery-1.6.2.min.js" type="text/javascript" charset="utf-8"></script> |
|
194 | <script src="static/jquery/js/jquery-1.6.2.min.js" type="text/javascript" charset="utf-8"></script> | |
195 | <script src="static/jquery/js/jquery-ui-1.8.14.custom.min.js" type="text/javascript" charset="utf-8"></script> |
|
195 | <script src="static/jquery/js/jquery-ui-1.8.14.custom.min.js" type="text/javascript" charset="utf-8"></script> | |
196 | <script src="static/jquery/js/jquery.autogrow.js" type="text/javascript" charset="utf-8"></script> |
|
196 | <script src="static/jquery/js/jquery.autogrow.js" type="text/javascript" charset="utf-8"></script> | |
197 |
|
197 | |||
198 | <script src="static/codemirror-2.12/lib/codemirror.js" charset="utf-8"></script> |
|
198 | <script src="static/codemirror-2.12/lib/codemirror.js" charset="utf-8"></script> | |
199 | <script src="static/codemirror-2.12/mode/python/python.js" charset="utf-8"></script> |
|
199 | <script src="static/codemirror-2.12/mode/python/python.js" charset="utf-8"></script> | |
200 | <script src="static/codemirror-2.12/mode/htmlmixed/htmlmixed.js" charset="utf-8"></script> |
|
200 | <script src="static/codemirror-2.12/mode/htmlmixed/htmlmixed.js" charset="utf-8"></script> | |
201 | <script src="static/codemirror-2.12/mode/xml/xml.js" charset="utf-8"></script> |
|
201 | <script src="static/codemirror-2.12/mode/xml/xml.js" charset="utf-8"></script> | |
202 | <script src="static/codemirror-2.12/mode/javascript/javascript.js" charset="utf-8"></script> |
|
202 | <script src="static/codemirror-2.12/mode/javascript/javascript.js" charset="utf-8"></script> | |
203 | <script src="static/codemirror-2.12/mode/css/css.js" charset="utf-8"></script> |
|
203 | <script src="static/codemirror-2.12/mode/css/css.js" charset="utf-8"></script> | |
204 | <script src="static/codemirror-2.12/mode/rst/rst.js" charset="utf-8"></script> |
|
204 | <script src="static/codemirror-2.12/mode/rst/rst.js" charset="utf-8"></script> | |
205 |
|
205 | |||
206 | <script src="static/pagedown/Markdown.Converter.js" charset="utf-8"></script> |
|
206 | <script src="static/pagedown/Markdown.Converter.js" charset="utf-8"></script> | |
207 |
|
207 | |||
208 | <script src="static/js/namespace.js" type="text/javascript" charset="utf-8"></script> |
|
208 | <script src="static/js/namespace.js" type="text/javascript" charset="utf-8"></script> | |
209 | <script src="static/js/utils.js" type="text/javascript" charset="utf-8"></script> |
|
209 | <script src="static/js/utils.js" type="text/javascript" charset="utf-8"></script> | |
210 | <script src="static/js/cell.js" type="text/javascript" charset="utf-8"></script> |
|
210 | <script src="static/js/cell.js" type="text/javascript" charset="utf-8"></script> | |
211 | <script src="static/js/codecell.js" type="text/javascript" charset="utf-8"></script> |
|
211 | <script src="static/js/codecell.js" type="text/javascript" charset="utf-8"></script> | |
212 | <script src="static/js/textcell.js" type="text/javascript" charset="utf-8"></script> |
|
212 | <script src="static/js/textcell.js" type="text/javascript" charset="utf-8"></script> | |
213 | <script src="static/js/kernel.js" type="text/javascript" charset="utf-8"></script> |
|
213 | <script src="static/js/kernel.js" type="text/javascript" charset="utf-8"></script> | |
214 | <script src="static/js/kernelstatus.js" type="text/javascript" charset="utf-8"></script> |
|
214 | <script src="static/js/kernelstatus.js" type="text/javascript" charset="utf-8"></script> | |
215 | <script src="static/js/layout.js" type="text/javascript" charset="utf-8"></script> |
|
215 | <script src="static/js/layout.js" type="text/javascript" charset="utf-8"></script> | |
216 | <script src="static/js/savewidget.js" type="text/javascript" charset="utf-8"></script> |
|
216 | <script src="static/js/savewidget.js" type="text/javascript" charset="utf-8"></script> | |
217 | <script src="static/js/pager.js" type="text/javascript" charset="utf-8"></script> |
|
217 | <script src="static/js/pager.js" type="text/javascript" charset="utf-8"></script> | |
218 | <script src="static/js/panelsection.js" type="text/javascript" charset="utf-8"></script> |
|
218 | <script src="static/js/panelsection.js" type="text/javascript" charset="utf-8"></script> | |
219 | <script src="static/js/printwidget.js" type="text/javascript" charset="utf-8"></script> |
|
219 | <script src="static/js/printwidget.js" type="text/javascript" charset="utf-8"></script> | |
220 | <script src="static/js/leftpanel.js" type="text/javascript" charset="utf-8"></script> |
|
220 | <script src="static/js/leftpanel.js" type="text/javascript" charset="utf-8"></script> | |
221 | <script src="static/js/notebook.js" type="text/javascript" charset="utf-8"></script> |
|
221 | <script src="static/js/notebook.js" type="text/javascript" charset="utf-8"></script> | |
222 | <script src="static/js/notebook_main.js" type="text/javascript" charset="utf-8"></script> |
|
222 | <script src="static/js/notebook_main.js" type="text/javascript" charset="utf-8"></script> | |
223 |
|
223 | |||
224 |
|
224 | |||
225 | </body> |
|
225 | </body> | |
226 |
|
226 | |||
227 | </html> |
|
227 | </html> | |
228 |
|
228 | |||
229 |
|
229 |
General Comments 0
You need to be logged in to leave comments.
Login now