Show More
@@ -0,0 +1,37 | |||||
|
1 | ||||
|
2 | //============================================================================ | |||
|
3 | // Cell | |||
|
4 | //============================================================================ | |||
|
5 | ||||
|
6 | var IPython = (function (IPython) { | |||
|
7 | ||||
|
8 | var utils = IPython.utils; | |||
|
9 | ||||
|
10 | var SaveWidget = function (selector) { | |||
|
11 | this.element = $(selector); | |||
|
12 | this.create_element(); | |||
|
13 | if (this.element !== undefined) { | |||
|
14 | this.element.data("cell", this); | |||
|
15 | this.bind_events(); | |||
|
16 | } | |||
|
17 | }; | |||
|
18 | ||||
|
19 | ||||
|
20 | SaveWidget.prototype.bind_events = function () { | |||
|
21 | var that = this; | |||
|
22 | }; | |||
|
23 | ||||
|
24 | ||||
|
25 | // Subclasses must implement create_element. | |||
|
26 | SaveWidget.prototype.create_element = function () { | |||
|
27 | this.element. | |||
|
28 | append($('textarea')). | |||
|
29 | append($('<button>Save</button>').button()); | |||
|
30 | }; | |||
|
31 | ||||
|
32 | IPython.SaveWidget = SaveWidget; | |||
|
33 | ||||
|
34 | return IPython; | |||
|
35 | ||||
|
36 | }(IPython)); | |||
|
37 |
@@ -1,296 +1,303 | |||||
1 | /** |
|
1 | /** | |
2 | * HTML5 ✰ Boilerplate |
|
2 | * HTML5 ✰ Boilerplate | |
3 | * |
|
3 | * | |
4 | * style.css contains a reset, font normalization and some base styles. |
|
4 | * style.css contains a reset, font normalization and some base styles. | |
5 | * |
|
5 | * | |
6 | * Credit is left where credit is due. |
|
6 | * Credit is left where credit is due. | |
7 | * Much inspiration was taken from these projects: |
|
7 | * Much inspiration was taken from these projects: | |
8 | * - yui.yahooapis.com/2.8.1/build/base/base.css |
|
8 | * - yui.yahooapis.com/2.8.1/build/base/base.css | |
9 | * - camendesign.com/design/ |
|
9 | * - camendesign.com/design/ | |
10 | * - praegnanz.de/weblog/htmlcssjs-kickstart |
|
10 | * - praegnanz.de/weblog/htmlcssjs-kickstart | |
11 | */ |
|
11 | */ | |
12 |
|
12 | |||
13 |
|
13 | |||
14 | /** |
|
14 | /** | |
15 | * html5doctor.com Reset Stylesheet (Eric Meyer's Reset Reloaded + HTML5 baseline) |
|
15 | * html5doctor.com Reset Stylesheet (Eric Meyer's Reset Reloaded + HTML5 baseline) | |
16 | * v1.6.1 2010-09-17 | Authors: Eric Meyer & Richard Clark |
|
16 | * v1.6.1 2010-09-17 | Authors: Eric Meyer & Richard Clark | |
17 | * html5doctor.com/html-5-reset-stylesheet/ |
|
17 | * html5doctor.com/html-5-reset-stylesheet/ | |
18 | */ |
|
18 | */ | |
19 |
|
19 | |||
20 | html, body, div, span, object, iframe, |
|
20 | html, body, div, span, object, iframe, | |
21 | h1, h2, h3, h4, h5, h6, p, blockquote, pre, |
|
21 | h1, h2, h3, h4, h5, h6, p, blockquote, pre, | |
22 | abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp, |
|
22 | abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp, | |
23 | small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li, |
|
23 | small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li, | |
24 | fieldset, form, label, legend, |
|
24 | fieldset, form, label, legend, | |
25 | table, caption, tbody, tfoot, thead, tr, th, td, |
|
25 | table, caption, tbody, tfoot, thead, tr, th, td, | |
26 | article, aside, canvas, details, figcaption, figure, |
|
26 | article, aside, canvas, details, figcaption, figure, | |
27 | footer, header, hgroup, menu, nav, section, summary, |
|
27 | footer, header, hgroup, menu, nav, section, summary, | |
28 | time, mark, audio, video { |
|
28 | time, mark, audio, video { | |
29 | margin: 0; |
|
29 | margin: 0; | |
30 | padding: 0; |
|
30 | padding: 0; | |
31 | border: 0; |
|
31 | border: 0; | |
32 | /* font-size: 100%;*/ |
|
32 | /* font-size: 100%;*/ | |
33 | font: inherit; |
|
33 | font: inherit; | |
34 | vertical-align: baseline; |
|
34 | vertical-align: baseline; | |
35 | } |
|
35 | } | |
36 |
|
36 | |||
37 | article, aside, details, figcaption, figure, |
|
37 | article, aside, details, figcaption, figure, | |
38 | footer, header, hgroup, menu, nav, section { |
|
38 | footer, header, hgroup, menu, nav, section { | |
39 | display: block; |
|
39 | display: block; | |
40 | } |
|
40 | } | |
41 |
|
41 | |||
42 | blockquote, q { quotes: none; } |
|
42 | blockquote, q { quotes: none; } | |
43 |
|
43 | |||
44 | blockquote:before, blockquote:after, |
|
44 | blockquote:before, blockquote:after, | |
45 | q:before, q:after { content: ""; content: none; } |
|
45 | q:before, q:after { content: ""; content: none; } | |
46 |
|
46 | |||
47 | ins { background-color: #ff9; color: #000; text-decoration: none; } |
|
47 | ins { background-color: #ff9; color: #000; text-decoration: none; } | |
48 |
|
48 | |||
49 | mark { background-color: #ff9; color: #000; font-style: italic; font-weight: bold; } |
|
49 | mark { background-color: #ff9; color: #000; font-style: italic; font-weight: bold; } | |
50 |
|
50 | |||
51 | del { text-decoration: line-through; } |
|
51 | del { text-decoration: line-through; } | |
52 |
|
52 | |||
53 | abbr[title], dfn[title] { border-bottom: 1px dotted; cursor: help; } |
|
53 | abbr[title], dfn[title] { border-bottom: 1px dotted; cursor: help; } | |
54 |
|
54 | |||
55 | table { border-collapse: collapse; border-spacing: 0; } |
|
55 | table { border-collapse: collapse; border-spacing: 0; } | |
56 |
|
56 | |||
57 | hr { display: block; height: 1px; border: 0; border-top: 1px solid #ccc; margin: 1em 0; padding: 0; } |
|
57 | hr { display: block; height: 1px; border: 0; border-top: 1px solid #ccc; margin: 1em 0; padding: 0; } | |
58 |
|
58 | |||
59 | input, select { vertical-align: middle; } |
|
59 | input, select { vertical-align: middle; } | |
60 |
|
60 | |||
61 | body { |
|
61 | body { | |
62 | background-color: white; |
|
62 | background-color: white; | |
63 | /* This won't propagate to all children so we also set it below */ |
|
63 | /* This won't propagate to all children so we also set it below */ | |
64 | font-size: 11pt; |
|
64 | font-size: 11pt; | |
65 | /* This makes sure that the body covers the entire window and needs to |
|
65 | /* This makes sure that the body covers the entire window and needs to | |
66 | be in a different element than the display: box in wrapper below */ |
|
66 | be in a different element than the display: box in wrapper below */ | |
67 | position: absolute; |
|
67 | position: absolute; | |
68 | left: 0px; |
|
68 | left: 0px; | |
69 | right: 0px; |
|
69 | right: 0px; | |
70 | top: 0px; |
|
70 | top: 0px; | |
71 | bottom: 0px; |
|
71 | bottom: 0px; | |
72 | overflow: hidden; |
|
72 | overflow: hidden; | |
73 | } |
|
73 | } | |
74 |
|
74 | |||
75 |
|
75 | |||
76 | span#ipython_notebook h1 { |
|
76 | div#header { | |
77 | font-family: Verdana, "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif; |
|
|||
78 | font-size: 22pt; |
|
|||
79 | height: 35px; |
|
77 | height: 35px; | |
80 | padding: 5px; |
|
78 | padding: 5px; | |
81 | margin: 0px; |
|
79 | margin: 0px; | |
|
80 | width: 100% | |||
|
81 | } | |||
82 |
|
82 | |||
|
83 | span#ipython_notebook { | |||
|
84 | } | |||
|
85 | ||||
|
86 | span#ipython_notebook h1 { | |||
|
87 | font-family: Verdana, "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif; | |||
|
88 | font-size: 22pt; | |||
83 | } |
|
89 | } | |
84 |
|
90 | |||
85 | span#kernel_status { |
|
91 | span#kernel_status { | |
86 | position: absolute; |
|
92 | position: absolute; | |
87 | top: 12%; |
|
93 | top: 12%; | |
88 | right: 10px; |
|
94 | right: 10px; | |
89 | font-weight: bold; |
|
95 | font-weight: bold; | |
90 | } |
|
96 | } | |
91 |
|
97 | |||
92 | .status_idle { |
|
98 | .status_idle { | |
93 | color: gray; |
|
99 | color: gray; | |
94 | } |
|
100 | } | |
95 |
|
101 | |||
96 | .status_busy { |
|
102 | .status_busy { | |
97 | color: red; |
|
103 | color: red; | |
98 | } |
|
104 | } | |
99 |
|
105 | |||
100 | .status_restarting { |
|
106 | .status_restarting { | |
101 | color: black; |
|
107 | color: black; | |
102 | } |
|
108 | } | |
103 |
|
109 | |||
104 | div#notebook_app { |
|
110 | div#notebook_app { | |
105 | width: 100%; |
|
111 | width: 100%; | |
106 | position: relative; |
|
112 | position: relative; | |
107 | } |
|
113 | } | |
108 |
|
114 | |||
109 | div#left_panel { |
|
115 | div#left_panel { | |
110 | overflow-y: auto; |
|
116 | overflow-y: auto; | |
111 | top: 0px; |
|
117 | top: 0px; | |
112 | left: 0px; |
|
118 | left: 0px; | |
113 | margin: 0px; |
|
119 | margin: 0px; | |
114 | padding: 0px; |
|
120 | padding: 0px; | |
115 | position: absolute; |
|
121 | position: absolute; | |
116 | } |
|
122 | } | |
117 |
|
123 | |||
118 | h3.section_header { |
|
124 | h3.section_header { | |
119 | padding: 5px; |
|
125 | padding: 5px; | |
120 | } |
|
126 | } | |
121 |
|
127 | |||
122 | div.section_content { |
|
128 | div.section_content { | |
123 | padding: 5px; |
|
129 | padding: 5px; | |
124 | } |
|
130 | } | |
125 |
|
131 | |||
126 | #expand_cell, #collapse_cell, #insert_cell_above, #insert_cell_below, |
|
132 | #expand_cell, #collapse_cell, #insert_cell_above, #insert_cell_below, | |
127 | #move_cell_up, #move_cell_down, #to_code, #to_text, #run_selected_cell, |
|
133 | #move_cell_up, #move_cell_down, #to_code, #to_text, #run_selected_cell, | |
128 | #run_all_cells { |
|
134 | #run_all_cells, #int_kernel, #restart_kernel, #python_help, #ipython_help, | |
|
135 | #numpy_help, #matplotlib_help, #scipy_help, #sympy_help { | |||
129 | width: 65px; |
|
136 | width: 65px; | |
130 | } |
|
137 | } | |
131 |
|
138 | |||
132 | .cell_section_row { |
|
139 | .cell_section_row { | |
133 | margin: 5px 0px; |
|
140 | margin: 5px 0px; | |
134 | } |
|
141 | } | |
135 |
|
142 | |||
136 | .cell_section_row_buttons { |
|
143 | .cell_section_row_buttons { | |
137 | float: right; |
|
144 | float: right; | |
138 | } |
|
145 | } | |
139 |
|
146 | |||
140 | .cell_section_row_header { |
|
147 | .cell_section_row_header { | |
141 | float: left; |
|
148 | float: left; | |
142 | font-size: 0.8em; |
|
149 | font-size: 0.8em; | |
143 | padding: 0.2em 0em; |
|
150 | padding: 0.2em 0em; | |
144 | font-weight: bold; |
|
151 | font-weight: bold; | |
145 | } |
|
152 | } | |
146 |
|
153 | |||
147 | span.button_label { |
|
154 | span.button_label { | |
148 | padding: 0.2em 1em; |
|
155 | padding: 0.2em 1em; | |
149 | font-size: 0.8em; |
|
156 | font-size: 0.8em; | |
150 | float: right; |
|
157 | float: right; | |
151 | } |
|
158 | } | |
152 |
|
159 | |||
153 | /* This is needed because FF was adding a 2px margin top and bottom. */ |
|
160 | /* This is needed because FF was adding a 2px margin top and bottom. */ | |
154 | .cell_section_row .ui-button { |
|
161 | .cell_section_row .ui-button { | |
155 | margin-top: 0px; |
|
162 | margin-top: 0px; | |
156 | margin-bottom: 0px; |
|
163 | margin-bottom: 0px; | |
157 | } |
|
164 | } | |
158 |
|
165 | |||
159 |
|
166 | |||
160 | .ui-button .ui-button-text { |
|
167 | .ui-button .ui-button-text { | |
161 | padding: 0.2em 0.8em; |
|
168 | padding: 0.2em 0.8em; | |
162 | font-size: 0.7em; |
|
169 | font-size: 0.7em; | |
163 | } |
|
170 | } | |
164 |
|
171 | |||
165 | div#left_panel_splitter { |
|
172 | div#left_panel_splitter { | |
166 | width: 8px; |
|
173 | width: 8px; | |
167 | top: 0px; |
|
174 | top: 0px; | |
168 | left: 202px; |
|
175 | left: 202px; | |
169 | margin: 0px; |
|
176 | margin: 0px; | |
170 | padding: 0px; |
|
177 | padding: 0px; | |
171 | position: absolute; |
|
178 | position: absolute; | |
172 | } |
|
179 | } | |
173 |
|
180 | |||
174 | div#notebook_panel { |
|
181 | div#notebook_panel { | |
175 | /* The L margin will be set in the Javascript code*/ |
|
182 | /* The L margin will be set in the Javascript code*/ | |
176 | margin: 0px 0px 0px 0px; |
|
183 | margin: 0px 0px 0px 0px; | |
177 | padding: 0px; |
|
184 | padding: 0px; | |
178 | } |
|
185 | } | |
179 |
|
186 | |||
180 | div#notebook { |
|
187 | div#notebook { | |
181 | overflow-y: scroll; |
|
188 | overflow-y: scroll; | |
182 | overflow-x: auto; |
|
189 | overflow-x: auto; | |
183 | width: 100%; |
|
190 | width: 100%; | |
184 | padding: 0px 15px 0px 15px; |
|
191 | padding: 0px 15px 0px 15px; | |
185 | margin: 0px |
|
192 | margin: 0px | |
186 | background-color: white; |
|
193 | background-color: white; | |
187 | font-size: 11pt; |
|
194 | font-size: 11pt; | |
188 | } |
|
195 | } | |
189 |
|
196 | |||
190 | div#pager_splitter { |
|
197 | div#pager_splitter { | |
191 | height: 8px; |
|
198 | height: 8px; | |
192 | } |
|
199 | } | |
193 |
|
200 | |||
194 | div#pager { |
|
201 | div#pager { | |
195 | padding: 15px; |
|
202 | padding: 15px; | |
196 | overflow: auto; |
|
203 | overflow: auto; | |
197 | } |
|
204 | } | |
198 |
|
205 | |||
199 | .monospace-font { |
|
206 | .monospace-font { | |
200 | font-family: monospace; |
|
207 | font-family: monospace; | |
201 | font-size: 11pt; |
|
208 | font-size: 11pt; | |
202 | } |
|
209 | } | |
203 |
|
210 | |||
204 | div.cell { |
|
211 | div.cell { | |
205 | width: 100%; |
|
212 | width: 100%; | |
206 | padding: 5px; |
|
213 | padding: 5px; | |
207 | /* This acts as a spacer between cells, that is outside the border */ |
|
214 | /* This acts as a spacer between cells, that is outside the border */ | |
208 | margin: 15px 0px 15px 0px; |
|
215 | margin: 15px 0px 15px 0px; | |
209 | } |
|
216 | } | |
210 |
|
217 | |||
211 | div.code_cell { |
|
218 | div.code_cell { | |
212 | background-color: white; |
|
219 | background-color: white; | |
213 | } |
|
220 | } | |
214 |
|
221 | |||
215 | div.prompt { |
|
222 | div.prompt { | |
216 | width: 90px; |
|
223 | width: 90px; | |
217 | padding: 0.4em; |
|
224 | padding: 0.4em; | |
218 | margin: 0px; |
|
225 | margin: 0px; | |
219 | line-height: 1em; |
|
226 | line-height: 1em; | |
220 | } |
|
227 | } | |
221 |
|
228 | |||
222 | div.input_prompt { |
|
229 | div.input_prompt { | |
223 | color: navy; |
|
230 | color: navy; | |
224 | } |
|
231 | } | |
225 |
|
232 | |||
226 | div.output { |
|
233 | div.output { | |
227 | /* This is a spacer between the input and output of each cell */ |
|
234 | /* This is a spacer between the input and output of each cell */ | |
228 | margin-top: 15px; |
|
235 | margin-top: 15px; | |
229 | } |
|
236 | } | |
230 |
|
237 | |||
231 | div.output_prompt { |
|
238 | div.output_prompt { | |
232 | color: darkred; |
|
239 | color: darkred; | |
233 | } |
|
240 | } | |
234 |
|
241 | |||
235 | div.output_area { |
|
242 | div.output_area { | |
236 | text-align: left; |
|
243 | text-align: left; | |
237 | color: black; |
|
244 | color: black; | |
238 | } |
|
245 | } | |
239 |
|
246 | |||
240 | div.output_latex { |
|
247 | div.output_latex { | |
241 | /* Slightly bigger than the rest of the notebook */ |
|
248 | /* Slightly bigger than the rest of the notebook */ | |
242 | font-size: 12pt; |
|
249 | font-size: 12pt; | |
243 | } |
|
250 | } | |
244 |
|
251 | |||
245 | div.output_png { |
|
252 | div.output_png { | |
246 | } |
|
253 | } | |
247 |
|
254 | |||
248 | div.text_cell { |
|
255 | div.text_cell { | |
249 | background-color: white; |
|
256 | background-color: white; | |
250 | } |
|
257 | } | |
251 |
|
258 | |||
252 | textarea.text_cell_input { |
|
259 | textarea.text_cell_input { | |
253 | /* Slightly bigger than the rest of the notebook */ |
|
260 | /* Slightly bigger than the rest of the notebook */ | |
254 | font-size: 12pt; |
|
261 | font-size: 12pt; | |
255 | outline: none; |
|
262 | outline: none; | |
256 | resize: none; |
|
263 | resize: none; | |
257 | width: inherit; |
|
264 | width: inherit; | |
258 | border-style: none; |
|
265 | border-style: none; | |
259 | padding: 0px; |
|
266 | padding: 0px; | |
260 | margin: 0px; |
|
267 | margin: 0px; | |
261 | color: black; |
|
268 | color: black; | |
262 | } |
|
269 | } | |
263 |
|
270 | |||
264 | div.text_cell_render { |
|
271 | div.text_cell_render { | |
265 | font-family: "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif; |
|
272 | font-family: "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif; | |
266 | /* Slightly bigger than the rest of the notebook */ |
|
273 | /* Slightly bigger than the rest of the notebook */ | |
267 | font-size: 12pt; |
|
274 | font-size: 12pt; | |
268 | outline: none; |
|
275 | outline: none; | |
269 | resize: none; |
|
276 | resize: none; | |
270 | width: inherit; |
|
277 | width: inherit; | |
271 | border-style: none; |
|
278 | border-style: none; | |
272 | padding: 5px; |
|
279 | padding: 5px; | |
273 | color: black; |
|
280 | color: black; | |
274 | } |
|
281 | } | |
275 |
|
282 | |||
276 | div.text_cell_render em {font-style: italic;} |
|
283 | div.text_cell_render em {font-style: italic;} | |
277 | div.text_cell_render strong {font-weight: bold;} |
|
284 | div.text_cell_render strong {font-weight: bold;} | |
278 | div.text_cell_render u {text-decoration: underline;} |
|
285 | div.text_cell_render u {text-decoration: underline;} | |
279 | div.text_cell_render :link { text-decoration: underline } |
|
286 | div.text_cell_render :link { text-decoration: underline } | |
280 | div.text_cell_render :visited { text-decoration: underline } |
|
287 | div.text_cell_render :visited { text-decoration: underline } | |
281 | div.text_cell_render h1 {font-size: 2.0em; margin: .67em 0; font-weight: bold;} |
|
288 | div.text_cell_render h1 {font-size: 2.0em; margin: .67em 0; font-weight: bold;} | |
282 | div.text_cell_render h2 {font-size: 1.5em; margin: .75em 0; font-weight: bold;} |
|
289 | div.text_cell_render h2 {font-size: 1.5em; margin: .75em 0; font-weight: bold;} | |
283 | div.text_cell_render h3 {font-size: 1.17em; margin: .83em 0; font-weight: bold;} |
|
290 | div.text_cell_render h3 {font-size: 1.17em; margin: .83em 0; font-weight: bold;} | |
284 | div.text_cell_render h4 {margin: 1.12em 0; font-weight: bold;} |
|
291 | div.text_cell_render h4 {margin: 1.12em 0; font-weight: bold;} | |
285 | div.text_cell_render h5 {font-size: .83em; margin: 1.5em 0; font-weight: bold;} |
|
292 | div.text_cell_render h5 {font-size: .83em; margin: 1.5em 0; font-weight: bold;} | |
286 | div.text_cell_render h6 {font-size: .75em; margin: 1.67em 0; font-weight: bold;} |
|
293 | div.text_cell_render h6 {font-size: .75em; margin: 1.67em 0; font-weight: bold;} | |
287 | div.text_cell_render ul {list-style:disc; margin-left: 40px;} |
|
294 | div.text_cell_render ul {list-style:disc; margin-left: 40px;} | |
288 | div.text_cell_render ul ul {list-style:square; margin-left: 40px;} |
|
295 | div.text_cell_render ul ul {list-style:square; margin-left: 40px;} | |
289 | div.text_cell_render ul ul ul {list-style:circle; margin-left: 40px;} |
|
296 | div.text_cell_render ul ul ul {list-style:circle; margin-left: 40px;} | |
290 | div.text_cell_render ol {list-style:upper-roman; margin-left: 40px;} |
|
297 | div.text_cell_render ol {list-style:upper-roman; margin-left: 40px;} | |
291 | div.text_cell_render ol ol {list-style:upper-alpha;} |
|
298 | div.text_cell_render ol ol {list-style:upper-alpha;} | |
292 | div.text_cell_render ol ol ol {list-style:decimal;} |
|
299 | div.text_cell_render ol ol ol {list-style:decimal;} | |
293 | div.text_cell_render ol ol ol ol {list-style:lower-alpha;} |
|
300 | div.text_cell_render ol ol ol ol {list-style:lower-alpha;} | |
294 | div.text_cell_render ol ol ol ol ol {list-style:lower-roman;} |
|
301 | div.text_cell_render ol ol ol ol ol {list-style:lower-roman;} | |
295 |
|
302 | |||
296 |
|
303 |
@@ -1,32 +1,33 | |||||
1 |
|
1 | |||
2 | //============================================================================ |
|
2 | //============================================================================ | |
3 | // On document ready |
|
3 | // On document ready | |
4 | //============================================================================ |
|
4 | //============================================================================ | |
5 |
|
5 | |||
6 |
|
6 | |||
7 | $(document).ready(function () { |
|
7 | $(document).ready(function () { | |
8 |
|
8 | |||
9 | MathJax.Hub.Config({ |
|
9 | MathJax.Hub.Config({ | |
10 | tex2jax: { |
|
10 | tex2jax: { | |
11 | inlineMath: [ ['$','$'], ["\\(","\\)"] ], |
|
11 | inlineMath: [ ['$','$'], ["\\(","\\)"] ], | |
12 | displayMath: [ ['$$','$$'], ["\\[","\\]"] ], |
|
12 | displayMath: [ ['$$','$$'], ["\\[","\\]"] ], | |
13 | }, |
|
13 | }, | |
14 | displayAlign: 'left', // Change this to 'center' to center equations. |
|
14 | displayAlign: 'left', // Change this to 'center' to center equations. | |
15 | "HTML-CSS": { |
|
15 | "HTML-CSS": { | |
16 | styles: {'.MathJax_Display': {"margin": 0}} |
|
16 | styles: {'.MathJax_Display': {"margin": 0}} | |
17 | } |
|
17 | } | |
18 | }); |
|
18 | }); | |
19 |
|
19 | |||
20 | $('div#notebook_app').addClass('border-box-sizing ui-widget ui-widget-content'); |
|
20 | $('div#notebook_app').addClass('border-box-sizing ui-widget ui-widget-content'); | |
21 | $('div#notebook_panel').addClass('border-box-sizing ui-widget'); |
|
21 | $('div#notebook_panel').addClass('border-box-sizing ui-widget'); | |
22 |
|
22 | |||
23 | IPython.layout_manager = new IPython.LayoutManager(); |
|
23 | IPython.layout_manager = new IPython.LayoutManager(); | |
|
24 | // IPython.save_widget = new IPython.SaveWidget('span#save_widget'); | |||
24 | IPython.pager = new IPython.Pager('div#pager', 'div#pager_splitter'); |
|
25 | IPython.pager = new IPython.Pager('div#pager', 'div#pager_splitter'); | |
25 | IPython.left_panel = new IPython.LeftPanel('div#left_panel', 'div#left_panel_splitter'); |
|
26 | IPython.left_panel = new IPython.LeftPanel('div#left_panel', 'div#left_panel_splitter'); | |
26 | IPython.notebook = new IPython.Notebook('div#notebook'); |
|
27 | IPython.notebook = new IPython.Notebook('div#notebook'); | |
27 |
|
28 | |||
28 | IPython.notebook.insert_code_cell_after(); |
|
29 | IPython.notebook.insert_code_cell_after(); | |
29 | IPython.layout_manager.do_resize(); |
|
30 | IPython.layout_manager.do_resize(); | |
30 | IPython.pager.collapse(); |
|
31 | IPython.pager.collapse(); | |
31 | }); |
|
32 | }); | |
32 |
|
33 |
@@ -1,285 +1,285 | |||||
1 |
|
1 | |||
2 | //============================================================================ |
|
2 | //============================================================================ | |
3 | // Cell |
|
3 | // Cell | |
4 | //============================================================================ |
|
4 | //============================================================================ | |
5 |
|
5 | |||
6 | var IPython = (function (IPython) { |
|
6 | var IPython = (function (IPython) { | |
7 |
|
7 | |||
8 | var utils = IPython.utils; |
|
8 | var utils = IPython.utils; | |
9 |
|
9 | |||
10 | // Base PanelSection class |
|
10 | // Base PanelSection class | |
11 |
|
11 | |||
12 | var PanelSection = function () { |
|
12 | var PanelSection = function () { | |
13 | if (this.section_name === undefined) { |
|
13 | if (this.section_name === undefined) { | |
14 | this.section_name = 'section'; |
|
14 | this.section_name = 'section'; | |
15 | }; |
|
15 | }; | |
16 | this.create_element(); |
|
16 | this.create_element(); | |
17 | if (this.element !== undefined) { |
|
17 | if (this.element !== undefined) { | |
18 | this.bind_events(); |
|
18 | this.bind_events(); | |
19 | } |
|
19 | } | |
20 | this.expanded = true; |
|
20 | this.expanded = true; | |
21 | }; |
|
21 | }; | |
22 |
|
22 | |||
23 |
|
23 | |||
24 | PanelSection.prototype.bind_events = function () { |
|
24 | PanelSection.prototype.bind_events = function () { | |
25 | var that = this; |
|
25 | var that = this; | |
26 | this.header.click(function () { |
|
26 | this.header.click(function () { | |
27 | that.toggle(); |
|
27 | that.toggle(); | |
28 | }); |
|
28 | }); | |
29 | this.header.hover(function () { |
|
29 | this.header.hover(function () { | |
30 | that.header.toggleClass('ui-state-hover'); |
|
30 | that.header.toggleClass('ui-state-hover'); | |
31 | }); |
|
31 | }); | |
32 | }; |
|
32 | }; | |
33 |
|
33 | |||
34 |
|
34 | |||
35 | PanelSection.prototype.create_element = function () { |
|
35 | PanelSection.prototype.create_element = function () { | |
36 | this.element = $('<div/>').attr('id',this.id()); |
|
36 | this.element = $('<div/>').attr('id',this.id()); | |
37 | this.header = $('<h3>'+this.section_name+'</h3>'). |
|
37 | this.header = $('<h3>'+this.section_name+'</h3>'). | |
38 | addClass('ui-widget ui-state-default section_header'); |
|
38 | addClass('ui-widget ui-state-default section_header'); | |
39 | this.content = $('<div/>'). |
|
39 | this.content = $('<div/>'). | |
40 | addClass('ui-widget section_content'); |
|
40 | addClass('ui-widget section_content'); | |
41 | this.element.append(this.header).append(this.content); |
|
41 | this.element.append(this.header).append(this.content); | |
42 | this.create_children(); |
|
42 | this.create_children(); | |
43 | }; |
|
43 | }; | |
44 |
|
44 | |||
45 |
|
45 | |||
46 | PanelSection.prototype.id = function () { |
|
46 | PanelSection.prototype.id = function () { | |
47 | return this.section_name.toLowerCase() + "_section"; |
|
47 | return this.section_name.toLowerCase() + "_section"; | |
48 | }; |
|
48 | }; | |
49 |
|
49 | |||
50 |
|
50 | |||
51 | PanelSection.prototype.expand = function () { |
|
51 | PanelSection.prototype.expand = function () { | |
52 | if (!this.expanded) { |
|
52 | if (!this.expanded) { | |
53 | this.content.slideDown('fast'); |
|
53 | this.content.slideDown('fast'); | |
54 | // this.header.addClass('ui-state-active'); |
|
54 | // this.header.addClass('ui-state-active'); | |
55 | // this.header.removeClass('ui-state-default'); |
|
55 | // this.header.removeClass('ui-state-default'); | |
56 | this.expanded = true; |
|
56 | this.expanded = true; | |
57 | }; |
|
57 | }; | |
58 | }; |
|
58 | }; | |
59 |
|
59 | |||
60 |
|
60 | |||
61 | PanelSection.prototype.collapse = function () { |
|
61 | PanelSection.prototype.collapse = function () { | |
62 | if (this.expanded) { |
|
62 | if (this.expanded) { | |
63 | this.content.slideUp('fast'); |
|
63 | this.content.slideUp('fast'); | |
64 | // this.header.removeClass('ui-state-active'); |
|
64 | // this.header.removeClass('ui-state-active'); | |
65 | // this.header.addClass('ui-state-default'); |
|
65 | // this.header.addClass('ui-state-default'); | |
66 | this.expanded = false; |
|
66 | this.expanded = false; | |
67 | }; |
|
67 | }; | |
68 | }; |
|
68 | }; | |
69 |
|
69 | |||
70 |
|
70 | |||
71 | PanelSection.prototype.toggle = function () { |
|
71 | PanelSection.prototype.toggle = function () { | |
72 | if (this.expanded === true) { |
|
72 | if (this.expanded === true) { | |
73 | this.collapse(); |
|
73 | this.collapse(); | |
74 | } else { |
|
74 | } else { | |
75 | this.expand(); |
|
75 | this.expand(); | |
76 | }; |
|
76 | }; | |
77 | }; |
|
77 | }; | |
78 |
|
78 | |||
79 |
|
79 | |||
80 | PanelSection.prototype.create_children = function () {}; |
|
80 | PanelSection.prototype.create_children = function () {}; | |
81 |
|
81 | |||
82 |
|
82 | |||
83 | // NotebookSection |
|
83 | // NotebookSection | |
84 |
|
84 | |||
85 | var NotebookSection = function () { |
|
85 | var NotebookSection = function () { | |
86 | this.section_name = "Notebook"; |
|
86 | this.section_name = "Notebook"; | |
87 | PanelSection.apply(this, arguments); |
|
87 | PanelSection.apply(this, arguments); | |
88 | }; |
|
88 | }; | |
89 |
|
89 | |||
90 |
|
90 | |||
91 | NotebookSection.prototype = new PanelSection(); |
|
91 | NotebookSection.prototype = new PanelSection(); | |
92 |
|
92 | |||
93 |
|
93 | |||
94 | // CellSection |
|
94 | // CellSection | |
95 |
|
95 | |||
96 | var CellSection = function () { |
|
96 | var CellSection = function () { | |
97 | this.section_name = "Cell"; |
|
97 | this.section_name = "Cell"; | |
98 | PanelSection.apply(this, arguments); |
|
98 | PanelSection.apply(this, arguments); | |
99 | }; |
|
99 | }; | |
100 |
|
100 | |||
101 |
|
101 | |||
102 | CellSection.prototype = new PanelSection(); |
|
102 | CellSection.prototype = new PanelSection(); | |
103 |
|
103 | |||
104 |
|
104 | |||
105 | CellSection.prototype.bind_events = function () { |
|
105 | CellSection.prototype.bind_events = function () { | |
106 | PanelSection.prototype.bind_events.apply(this); |
|
106 | PanelSection.prototype.bind_events.apply(this); | |
107 | this.content.find('#collapse_cell').click(function () { |
|
107 | this.content.find('#collapse_cell').click(function () { | |
108 | IPython.notebook.collapse(); |
|
108 | IPython.notebook.collapse(); | |
109 | }); |
|
109 | }); | |
110 | this.content.find('#expand_cell').click(function () { |
|
110 | this.content.find('#expand_cell').click(function () { | |
111 | IPython.notebook.expand(); |
|
111 | IPython.notebook.expand(); | |
112 | }); |
|
112 | }); | |
113 | this.content.find('#delete_cell').click(function () { |
|
113 | this.content.find('#delete_cell').click(function () { | |
114 | IPython.notebook.delete_cell(); |
|
114 | IPython.notebook.delete_cell(); | |
115 | }); |
|
115 | }); | |
116 | this.content.find('#insert_cell_above').click(function () { |
|
116 | this.content.find('#insert_cell_above').click(function () { | |
117 | IPython.notebook.insert_code_cell_before(); |
|
117 | IPython.notebook.insert_code_cell_before(); | |
118 | }); |
|
118 | }); | |
119 | this.content.find('#insert_cell_below').click(function () { |
|
119 | this.content.find('#insert_cell_below').click(function () { | |
120 | IPython.notebook.insert_code_cell_after(); |
|
120 | IPython.notebook.insert_code_cell_after(); | |
121 | }); |
|
121 | }); | |
122 | this.content.find('#move_cell_up').click(function () { |
|
122 | this.content.find('#move_cell_up').click(function () { | |
123 | IPython.notebook.move_cell_up(); |
|
123 | IPython.notebook.move_cell_up(); | |
124 | }); |
|
124 | }); | |
125 | this.content.find('#move_cell_down').click(function () { |
|
125 | this.content.find('#move_cell_down').click(function () { | |
126 | IPython.notebook.move_cell_down(); |
|
126 | IPython.notebook.move_cell_down(); | |
127 | }); |
|
127 | }); | |
128 | this.content.find('#to_code').click(function () { |
|
128 | this.content.find('#to_code').click(function () { | |
129 | IPython.notebook.text_to_code(); |
|
129 | IPython.notebook.text_to_code(); | |
130 | }); |
|
130 | }); | |
131 | this.content.find('#to_text').click(function () { |
|
131 | this.content.find('#to_text').click(function () { | |
132 | IPython.notebook.code_to_text(); |
|
132 | IPython.notebook.code_to_text(); | |
133 | }); |
|
133 | }); | |
134 | this.content.find('#run_selected_cell').click(function () { |
|
134 | this.content.find('#run_selected_cell').click(function () { | |
135 | alert("Not Implemented"); |
|
135 | alert("Not Implemented"); | |
136 | }); |
|
136 | }); | |
137 | this.content.find('#run_all_cells').click(function () { |
|
137 | this.content.find('#run_all_cells').click(function () { | |
138 | alert("Not Implemented"); |
|
138 | alert("Not Implemented"); | |
139 | }); |
|
139 | }); | |
140 | }; |
|
140 | }; | |
141 |
|
141 | |||
142 |
|
142 | |||
143 | CellSection.prototype.create_children = function () { |
|
143 | CellSection.prototype.create_children = function () { | |
144 |
|
144 | |||
145 | this.content.addClass('ui-helper-clearfix'); |
|
145 | this.content.addClass('ui-helper-clearfix'); | |
146 |
|
146 | |||
147 | var row0 = $('<div>').addClass('cell_section_row ui-helper-clearfix'). |
|
147 | var row0 = $('<div>').addClass('cell_section_row ui-helper-clearfix'). | |
148 | append($('<span/>').addClass('cell_section_row_buttons'). |
|
148 | append($('<span/>').addClass('cell_section_row_buttons'). | |
149 | append($('<button>X</button>').attr('id','delete_cell'))). |
|
149 | append($('<button>X</button>').attr('id','delete_cell'))). | |
150 | append($('<span/>').html('Actions').addClass('cell_section_row_header')); |
|
150 | append($('<span/>').html('Actions').addClass('cell_section_row_header')); | |
151 | row0.find('#delete_cell').button(); |
|
151 | row0.find('#delete_cell').button(); | |
152 | this.content.append(row0); |
|
152 | this.content.append(row0); | |
153 |
|
153 | |||
154 | var row1 = $('<div>').addClass('cell_section_row ui-helper-clearfix'). |
|
154 | var row1 = $('<div>').addClass('cell_section_row ui-helper-clearfix'). | |
155 | append($('<span/>').attr('id','insert').addClass('cell_section_row_buttons'). |
|
155 | append($('<span/>').attr('id','insert').addClass('cell_section_row_buttons'). | |
156 | append( $('<button>Above</button>').attr('id','insert_cell_above') ). |
|
156 | append( $('<button>Above</button>').attr('id','insert_cell_above') ). | |
157 | append( $('<button>Below</button>').attr('id','insert_cell_below') )). |
|
157 | append( $('<button>Below</button>').attr('id','insert_cell_below') )). | |
158 | append($('<span/>').html('Insert').addClass('button_label')); |
|
158 | append($('<span/>').html('Insert').addClass('button_label')); | |
159 | row1.find('#insert').buttonset(); |
|
159 | row1.find('#insert').buttonset(); | |
160 | this.content.append(row1); |
|
160 | this.content.append(row1); | |
161 |
|
161 | |||
162 | var row2 = $('<div>').addClass('cell_section_row ui-helper-clearfix'). |
|
162 | var row2 = $('<div>').addClass('cell_section_row ui-helper-clearfix'). | |
163 | append($('<span/>').attr('id','move').addClass('cell_section_row_buttons'). |
|
163 | append($('<span/>').attr('id','move').addClass('cell_section_row_buttons'). | |
164 | append( $('<button>Up</button>').attr('id','move_cell_up') ). |
|
164 | append( $('<button>Up</button>').attr('id','move_cell_up') ). | |
165 | append( $('<button>Down</button>').attr('id','move_cell_down') ) ). |
|
165 | append( $('<button>Down</button>').attr('id','move_cell_down') ) ). | |
166 | append($('<span/>').html('Move').addClass('button_label')); |
|
166 | append($('<span/>').html('Move').addClass('button_label')); | |
167 | row2.find('#move').buttonset(); |
|
167 | row2.find('#move').buttonset(); | |
168 | this.content.append(row2); |
|
168 | this.content.append(row2); | |
169 |
|
169 | |||
170 | var row3 = $('<div>').addClass('cell_section_row ui-helper-clearfix'). |
|
170 | var row3 = $('<div>').addClass('cell_section_row ui-helper-clearfix'). | |
171 | append($('<span/>').attr('id','cell_type').addClass('cell_section_row_buttons'). |
|
171 | append($('<span/>').attr('id','cell_type').addClass('cell_section_row_buttons'). | |
172 | append( $('<button>Code</button>').attr('id','to_code') ). |
|
172 | append( $('<button>Code</button>').attr('id','to_code') ). | |
173 | append( $('<button>Text</button>').attr('id','to_text') ) ). |
|
173 | append( $('<button>Text</button>').attr('id','to_text') ) ). | |
174 | append($('<span/>').html('Cell Type').addClass('button_label')); |
|
174 | append($('<span/>').html('Cell Type').addClass('button_label')); | |
175 | row3.find('#cell_type').buttonset(); |
|
175 | row3.find('#cell_type').buttonset(); | |
176 | this.content.append(row3); |
|
176 | this.content.append(row3); | |
177 |
|
177 | |||
178 | var row1 = $('<div>').addClass('cell_section_row ui-helper-clearfix'). |
|
178 | var row1 = $('<div>').addClass('cell_section_row ui-helper-clearfix'). | |
179 | append($('<span/>').attr('id','toggle_output').addClass('cell_section_row_buttons'). |
|
179 | append($('<span/>').attr('id','toggle_output').addClass('cell_section_row_buttons'). | |
180 | append( $('<button>Collapse</button>').attr('id','collapse_cell') ). |
|
180 | append( $('<button>Collapse</button>').attr('id','collapse_cell') ). | |
181 | append( $('<button>Expand</button>').attr('id','expand_cell') ) ). |
|
181 | append( $('<button>Expand</button>').attr('id','expand_cell') ) ). | |
182 | append($('<span/>').html('Output').addClass('button_label')); |
|
182 | append($('<span/>').html('Output').addClass('button_label')); | |
183 | row1.find('#toggle_output').buttonset(); |
|
183 | row1.find('#toggle_output').buttonset(); | |
184 | this.content.append(row1); |
|
184 | this.content.append(row1); | |
185 |
|
185 | |||
186 | var row0 = $('<div>').addClass('cell_section_row'). |
|
186 | var row0 = $('<div>').addClass('cell_section_row'). | |
187 | append($('<span/>').attr('id','run_cells').addClass('cell_section_row_buttons'). |
|
187 | append($('<span/>').attr('id','run_cells').addClass('cell_section_row_buttons'). | |
188 | append( $('<button>Selected</button>').attr('id','run_selected_cell') ). |
|
188 | append( $('<button>Selected</button>').attr('id','run_selected_cell') ). | |
189 | append( $('<button>All</button>').attr('id','run_all_cells') ) ). |
|
189 | append( $('<button>All</button>').attr('id','run_all_cells') ) ). | |
190 | append($('<span/>').html('Run').addClass('button_label')); |
|
190 | append($('<span/>').html('Run').addClass('button_label')); | |
191 | row0.find('#run_cells').buttonset(); |
|
191 | row0.find('#run_cells').buttonset(); | |
192 | this.content.append(row0); |
|
192 | this.content.append(row0); | |
193 | }; |
|
193 | }; | |
194 |
|
194 | |||
195 |
|
195 | |||
196 | // KernelSection |
|
196 | // KernelSection | |
197 |
|
197 | |||
198 | var KernelSection = function () { |
|
198 | var KernelSection = function () { | |
199 | this.section_name = "Kernel"; |
|
199 | this.section_name = "Kernel"; | |
200 | PanelSection.apply(this, arguments); |
|
200 | PanelSection.apply(this, arguments); | |
201 | }; |
|
201 | }; | |
202 |
|
202 | |||
203 |
|
203 | |||
204 | KernelSection.prototype = new PanelSection(); |
|
204 | KernelSection.prototype = new PanelSection(); | |
205 |
|
205 | |||
206 |
|
206 | |||
207 | KernelSection.prototype.bind_events = function () { |
|
207 | KernelSection.prototype.bind_events = function () { | |
208 | PanelSection.prototype.bind_events.apply(this); |
|
208 | PanelSection.prototype.bind_events.apply(this); | |
209 | this.content.find('#restart_kernel').click(function () { |
|
209 | this.content.find('#restart_kernel').click(function () { | |
210 | IPython.notebook.kernel.restart(); |
|
210 | IPython.notebook.kernel.restart(); | |
211 | }); |
|
211 | }); | |
212 | this.content.find('#int_kernel').click(function () { |
|
212 | this.content.find('#int_kernel').click(function () { | |
213 | IPython.notebook.kernel.interrupt(); |
|
213 | IPython.notebook.kernel.interrupt(); | |
214 | }); |
|
214 | }); | |
215 | }; |
|
215 | }; | |
216 |
|
216 | |||
217 |
|
217 | |||
218 | KernelSection.prototype.create_children = function () { |
|
218 | KernelSection.prototype.create_children = function () { | |
219 |
|
219 | |||
220 | this.content.addClass('ui-helper-clearfix'); |
|
220 | this.content.addClass('ui-helper-clearfix'); | |
221 |
|
221 | |||
222 | var row0 = $('<div>').addClass('cell_section_row ui-helper-clearfix'). |
|
222 | var row0 = $('<div>').addClass('cell_section_row ui-helper-clearfix'). | |
223 | append($('<span/>').attr('id','int_restart').addClass('cell_section_row_buttons'). |
|
223 | append($('<span/>').attr('id','int_restart').addClass('cell_section_row_buttons'). | |
224 | append( $('<button>Interrupt</button>').attr('id','int_kernel') ). |
|
224 | append( $('<button>Interrupt</button>').attr('id','int_kernel') ). | |
225 | append( $('<button>Restart</button>').attr('id','restart_kernel') )). |
|
225 | append( $('<button>Restart</button>').attr('id','restart_kernel') )). | |
226 | append($('<span/>').html('Actions').addClass('cell_section_row_header')); |
|
226 | append($('<span/>').html('Actions').addClass('cell_section_row_header')); | |
227 | row0.find('#int_restart').buttonset(); |
|
227 | row0.find('#int_restart').buttonset(); | |
228 | this.content.append(row0); |
|
228 | this.content.append(row0); | |
229 | }; |
|
229 | }; | |
230 |
|
230 | |||
231 |
|
231 | |||
232 | // HelpSection |
|
232 | // HelpSection | |
233 |
|
233 | |||
234 | var HelpSection = function () { |
|
234 | var HelpSection = function () { | |
235 | this.section_name = "Help"; |
|
235 | this.section_name = "Help"; | |
236 | PanelSection.apply(this, arguments); |
|
236 | PanelSection.apply(this, arguments); | |
237 | }; |
|
237 | }; | |
238 |
|
238 | |||
239 |
|
239 | |||
240 | HelpSection.prototype = new PanelSection(); |
|
240 | HelpSection.prototype = new PanelSection(); | |
241 |
|
241 | |||
242 |
|
242 | |||
243 | HelpSection.prototype.bind_events = function () { |
|
243 | HelpSection.prototype.bind_events = function () { | |
244 | PanelSection.prototype.bind_events.apply(this); |
|
244 | PanelSection.prototype.bind_events.apply(this); | |
245 | }; |
|
245 | }; | |
246 |
|
246 | |||
247 |
|
247 | |||
248 | HelpSection.prototype.create_children = function () { |
|
248 | HelpSection.prototype.create_children = function () { | |
249 |
|
249 | |||
250 | this.content.addClass('ui-helper-clearfix'); |
|
250 | this.content.addClass('ui-helper-clearfix'); | |
251 |
|
251 | |||
252 | var row0 = $('<div>').addClass('cell_section_row ui-helper-clearfix'). |
|
252 | var row0 = $('<div>').addClass('cell_section_row ui-helper-clearfix'). | |
253 | append($('<span/>').attr('id','help_buttons0').addClass('cell_section_row_buttons'). |
|
253 | append($('<span/>').attr('id','help_buttons0').addClass('cell_section_row_buttons'). | |
254 | append( $('<button/>').attr('id','python_help'). |
|
254 | append( $('<button/>').attr('id','python_help'). | |
255 | append( $('<a>Python</a>').attr('href','http://docs.python.org').attr('target','_blank') )). |
|
255 | append( $('<a>Python</a>').attr('href','http://docs.python.org').attr('target','_blank') )). | |
256 | append( $('<button/>').attr('id','ipython_help'). |
|
256 | append( $('<button/>').attr('id','ipython_help'). | |
257 | append( $('<a>IPython</a>').attr('href','http://ipython.org/documentation.html').attr('target','_blank') )). |
|
257 | append( $('<a>IPython</a>').attr('href','http://ipython.org/documentation.html').attr('target','_blank') )). | |
258 | append( $('<button/>').attr('id','numpy_help'). |
|
258 | append( $('<button/>').attr('id','numpy_help'). | |
259 | append( $('<a>NumPy</a>').attr('href','http://docs.scipy.org/doc/numpy/reference/').attr('target','_blank') ))). |
|
259 | append( $('<a>NumPy</a>').attr('href','http://docs.scipy.org/doc/numpy/reference/').attr('target','_blank') ))). | |
260 | append($('<span/>').html('Links').addClass('cell_section_row_header')); |
|
260 | append($('<span/>').html('Links').addClass('cell_section_row_header')); | |
261 | row0.find('#help_buttons0').buttonset(); |
|
261 | row0.find('#help_buttons0').buttonset(); | |
262 | this.content.append(row0); |
|
262 | this.content.append(row0); | |
263 |
|
263 | |||
264 | var row1 = $('<div>').addClass('cell_section_row ui-helper-clearfix'). |
|
264 | var row1 = $('<div>').addClass('cell_section_row ui-helper-clearfix'). | |
265 | append($('<span/>').attr('id','help_buttons1').addClass('cell_section_row_buttons'). |
|
265 | append($('<span/>').attr('id','help_buttons1').addClass('cell_section_row_buttons'). | |
266 | append( $('<button/>').attr('id','matplotlib_help'). |
|
266 | append( $('<button/>').attr('id','matplotlib_help'). | |
267 |
append( $('<a>M |
|
267 | append( $('<a>MPL</a>').attr('href','http://matplotlib.sourceforge.net/').attr('target','_blank') )). | |
268 | append( $('<button/>').attr('id','scipy_help'). |
|
268 | append( $('<button/>').attr('id','scipy_help'). | |
269 | append( $('<a>SciPy</a>').attr('href','http://docs.scipy.org/doc/scipy/reference/').attr('target','_blank') )). |
|
269 | append( $('<a>SciPy</a>').attr('href','http://docs.scipy.org/doc/scipy/reference/').attr('target','_blank') )). | |
270 | append( $('<button/>').attr('id','sympy_help'). |
|
270 | append( $('<button/>').attr('id','sympy_help'). | |
271 | append( $('<a>SymPy</a>').attr('href','http://docs.sympy.org/dev/index.html').attr('target','_blank') ))); |
|
271 | append( $('<a>SymPy</a>').attr('href','http://docs.sympy.org/dev/index.html').attr('target','_blank') ))); | |
272 | row1.find('#help_buttons1').buttonset(); |
|
272 | row1.find('#help_buttons1').buttonset(); | |
273 | this.content.append(row1); |
|
273 | this.content.append(row1); | |
274 | }; |
|
274 | }; | |
275 |
|
275 | |||
276 | IPython.PanelSection = PanelSection; |
|
276 | IPython.PanelSection = PanelSection; | |
277 | IPython.NotebookSection = NotebookSection; |
|
277 | IPython.NotebookSection = NotebookSection; | |
278 | IPython.CellSection = CellSection; |
|
278 | IPython.CellSection = CellSection; | |
279 | IPython.KernelSection = KernelSection; |
|
279 | IPython.KernelSection = KernelSection; | |
280 | IPython.HelpSection = HelpSection; |
|
280 | IPython.HelpSection = HelpSection; | |
281 |
|
281 | |||
282 | return IPython; |
|
282 | return IPython; | |
283 |
|
283 | |||
284 | }(IPython)); |
|
284 | }(IPython)); | |
285 |
|
285 |
@@ -1,70 +1,72 | |||||
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 |
|
|
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/codemirror2/lib/codemirror.css"> |
|
22 | <link rel="stylesheet" href="static/codemirror2/lib/codemirror.css"> | |
23 | <link rel="stylesheet" href="static/codemirror2/mode/python/python.css"> |
|
23 | <link rel="stylesheet" href="static/codemirror2/mode/python/python.css"> | |
24 |
|
24 | |||
25 | <link rel="stylesheet" href="static/css/layout.css" type="text/css" /> |
|
25 | <link rel="stylesheet" href="static/css/layout.css" type="text/css" /> | |
26 | <link rel="stylesheet" href="static/css/notebook.css" type="text/css" /> |
|
26 | <link rel="stylesheet" href="static/css/notebook.css" type="text/css" /> | |
27 |
|
27 | |||
28 | </head> |
|
28 | </head> | |
29 |
|
29 | |||
30 | <body> |
|
30 | <body> | |
31 |
|
31 | |||
32 | <div id="header"> |
|
32 | <div id="header"> | |
33 | <span id="ipython_notebook"><h1>IPython Notebook</h1></span> |
|
33 | <span id="ipython_notebook"><h1>IPython Notebook</h1></span> | |
|
34 | <span id="save_widget"></span> | |||
34 | </div> |
|
35 | </div> | |
35 |
|
36 | |||
36 | <div id="notebook_app"> |
|
37 | <div id="notebook_app"> | |
37 |
|
38 | |||
38 | <div id="left_panel"></div> |
|
39 | <div id="left_panel"></div> | |
39 | <div id="left_panel_splitter"></div> |
|
40 | <div id="left_panel_splitter"></div> | |
40 | <div id="notebook_panel"> |
|
41 | <div id="notebook_panel"> | |
41 | <div id="notebook"></div> |
|
42 | <div id="notebook"></div> | |
42 | <div id="pager_splitter"></div> |
|
43 | <div id="pager_splitter"></div> | |
43 | <div id="pager"></div> |
|
44 | <div id="pager"></div> | |
44 | </div> |
|
45 | </div> | |
45 |
|
46 | |||
46 | </div> |
|
47 | </div> | |
47 |
|
48 | |||
48 | <script src="static/jquery/js/jquery-1.6.2.min.js" type="text/javascript" charset="utf-8"></script> |
|
49 | <script src="static/jquery/js/jquery-1.6.2.min.js" type="text/javascript" charset="utf-8"></script> | |
49 | <script src="static/jquery/js/jquery-ui-1.8.14.custom.min.js" type="text/javascript" charset="utf-8"></script> |
|
50 | <script src="static/jquery/js/jquery-ui-1.8.14.custom.min.js" type="text/javascript" charset="utf-8"></script> | |
50 | <script src="static/jquery/js/jquery.autogrow.js" type="text/javascript" charset="utf-8"></script> |
|
51 | <script src="static/jquery/js/jquery.autogrow.js" type="text/javascript" charset="utf-8"></script> | |
51 | <script src="static/js/namespace.js" type="text/javascript" charset="utf-8"></script> |
|
52 | <script src="static/js/namespace.js" type="text/javascript" charset="utf-8"></script> | |
52 | <script src="static/js/utils.js" type="text/javascript" charset="utf-8"></script> |
|
53 | <script src="static/js/utils.js" type="text/javascript" charset="utf-8"></script> | |
53 | <script src="static/js/cell.js" type="text/javascript" charset="utf-8"></script> |
|
54 | <script src="static/js/cell.js" type="text/javascript" charset="utf-8"></script> | |
54 | <script src="static/js/codecell.js" type="text/javascript" charset="utf-8"></script> |
|
55 | <script src="static/js/codecell.js" type="text/javascript" charset="utf-8"></script> | |
55 | <script src="static/js/textcell.js" type="text/javascript" charset="utf-8"></script> |
|
56 | <script src="static/js/textcell.js" type="text/javascript" charset="utf-8"></script> | |
56 | <script src="static/js/kernel.js" type="text/javascript" charset="utf-8"></script> |
|
57 | <script src="static/js/kernel.js" type="text/javascript" charset="utf-8"></script> | |
57 | <script src="static/js/layout.js" type="text/javascript" charset="utf-8"></script> |
|
58 | <script src="static/js/layout.js" type="text/javascript" charset="utf-8"></script> | |
|
59 | <script src="static/js/savewidget.js" type="text/javascript" charset="utf-8"></script> | |||
58 | <script src="static/js/pager.js" type="text/javascript" charset="utf-8"></script> |
|
60 | <script src="static/js/pager.js" type="text/javascript" charset="utf-8"></script> | |
59 | <script src="static/js/panelsection.js" type="text/javascript" charset="utf-8"></script> |
|
61 | <script src="static/js/panelsection.js" type="text/javascript" charset="utf-8"></script> | |
60 | <script src="static/js/leftpanel.js" type="text/javascript" charset="utf-8"></script> |
|
62 | <script src="static/js/leftpanel.js" type="text/javascript" charset="utf-8"></script> | |
61 | <script src="static/js/notebook.js" type="text/javascript" charset="utf-8"></script> |
|
63 | <script src="static/js/notebook.js" type="text/javascript" charset="utf-8"></script> | |
62 | <script src="static/js/notebook_main.js" type="text/javascript" charset="utf-8"></script> |
|
64 | <script src="static/js/notebook_main.js" type="text/javascript" charset="utf-8"></script> | |
63 | <script src="static/codemirror2/lib/codemirror.js"></script> |
|
65 | <script src="static/codemirror2/lib/codemirror.js"></script> | |
64 | <script src="static/codemirror2/mode/python/python.js"></script> |
|
66 | <script src="static/codemirror2/mode/python/python.js"></script> | |
65 |
|
67 | |||
66 | </body> |
|
68 | </body> | |
67 |
|
69 | |||
68 | </html> |
|
70 | </html> | |
69 |
|
71 | |||
70 |
|
72 |
General Comments 0
You need to be logged in to leave comments.
Login now