##// END OF EJS Templates
Allow toolbar construction in js...
Matthias BUSSONNIER -
Show More
@@ -1,390 +1,390 b''
1 1 /**
2 2 * Primary styles
3 3 *
4 4 * Author: IPython Development Team
5 5 */
6 6
7 7
8 8 body {
9 9 overflow: hidden;
10 10 }
11 11
12 12 span#save_widget {
13 13 padding: 5px;
14 14 margin: 0px 0px 0px 300px;
15 15 display:inline-block;
16 16 }
17 17
18 18 span#notebook_name {
19 19 height: 1em;
20 20 line-height: 1em;
21 21 padding: 3px;
22 22 border: none;
23 23 font-size: 146.5%;
24 24 }
25 25
26 26 .ui-menubar-item .ui-button .ui-button-text {
27 27 padding: 0.4em 1.0em;
28 28 font-size: 100%;
29 29 }
30 30
31 31 .ui-menu {
32 32 -moz-box-shadow: 0px 6px 10px -1px #adadad;
33 33 -webkit-box-shadow: 0px 6px 10px -1px #adadad;
34 34 box-shadow: 0px 6px 10px -1px #adadad;
35 35 }
36 36
37 37 .ui-menu .ui-menu-item a {
38 38 border: 1px solid transparent;
39 39 padding: 2px 1.6em;
40 40 }
41 41
42 42 .ui-menu .ui-menu-item a.ui-state-focus {
43 43 margin: 0;
44 44 }
45 45
46 46 .ui-menu hr {
47 47 margin: 0.3em 0;
48 48 }
49 49
50 50 #menubar_container {
51 51 position: relative;
52 52 }
53 53
54 54 #notification {
55 55 position: absolute;
56 56 right: 3px;
57 57 top: 3px;
58 58 height: 25px;
59 59 padding: 3px 6px;
60 60 z-index: 10;
61 61 }
62 62
63 #toolbar {
63 .toolbar {
64 64 padding: 3px 15px;
65 65 }
66 66
67 67 #cell_type {
68 68 font-size: 85%;
69 69 }
70 70
71 71
72 72 div#main_app {
73 73 width: 100%;
74 74 position: relative;
75 75 }
76 76
77 77 span#quick_help_area {
78 78 position: static;
79 79 padding: 5px 0px;
80 80 margin: 0px 0px 0px 0px;
81 81 }
82 82
83 83 .help_string {
84 84 float: right;
85 85 width: 170px;
86 86 padding: 0px 5px;
87 87 text-align: left;
88 88 font-size: 85%;
89 89 }
90 90
91 91 .help_string_label {
92 92 float: right;
93 93 font-size: 85%;
94 94 }
95 95
96 96 div#notebook_panel {
97 97 margin: 0px 0px 0px 0px;
98 98 padding: 0px;
99 99 }
100 100
101 101 div#notebook {
102 102 overflow-y: scroll;
103 103 overflow-x: auto;
104 104 width: 100%;
105 105 /* This spaces the cell away from the edge of the notebook area */
106 106 padding: 5px 5px 15px 5px;
107 107 margin: 0px;
108 108 background-color: white;
109 109 }
110 110
111 111 div#pager_splitter {
112 112 height: 8px;
113 113 }
114 114
115 115 div#pager {
116 116 padding: 15px;
117 117 overflow: auto;
118 118 display: none;
119 119 }
120 120
121 121 div.ui-widget-content {
122 122 border: 1px solid #aaa;
123 123 outline: none;
124 124 }
125 125
126 126 .cell {
127 127 border: 1px solid transparent;
128 128 }
129 129
130 130 div.cell {
131 131 width: 100%;
132 132 padding: 5px 5px 5px 0px;
133 133 /* This acts as a spacer between cells, that is outside the border */
134 134 margin: 2px 0px 2px 0px;
135 135 }
136 136
137 137 div.code_cell {
138 138 background-color: white;
139 139 }
140 140
141 141 /* any special styling for code cells that are currently running goes here */
142 142 div.code_cell.running {
143 143 }
144 144
145 145 div.prompt {
146 146 /* This needs to be wide enough for 3 digit prompt numbers: In[100]: */
147 147 width: 11ex;
148 148 /* This 0.4em is tuned to match the padding on the CodeMirror editor. */
149 149 padding: 0.4em;
150 150 margin: 0px;
151 151 font-family: monospace;
152 152 text-align:right;
153 153 }
154 154
155 155 div.input {
156 156 page-break-inside: avoid;
157 157 }
158 158
159 159 /* input_area and input_prompt must match in top border and margin for alignment */
160 160 div.input_area {
161 161 color: black;
162 162 border: 1px solid #ddd;
163 163 border-radius: 3px;
164 164 background: #f7f7f7;
165 165 }
166 166
167 167 div.input_prompt {
168 168 color: navy;
169 169 border-top: 1px solid transparent;
170 170 }
171 171
172 172 div.output_wrapper {
173 173 /* This is a spacer between the input and output of each cell */
174 174 margin-top: 5px;
175 175 margin-left: 5px;
176 176 /* FF needs explicit width to stretch */
177 177 width: 100%;
178 178 /* this position must be relative to enable descendents to be absolute within it */
179 179 position: relative;
180 180 }
181 181
182 182 /* class for the output area when it should be height-limited */
183 183 div.output_scroll {
184 184 /* ideally, this would be max-height, but FF barfs all over that */
185 185 height: 24em;
186 186 /* FF needs this *and the wrapper* to specify full width, or it will shrinkwrap */
187 187 width: 100%;
188 188
189 189 overflow: auto;
190 190 border-radius: 3px;
191 191 box-shadow: inset 0 2px 8px rgba(0, 0, 0, .8);
192 192 }
193 193
194 194 /* output div while it is collapsed */
195 195 div.output_collapsed {
196 196 margin-right: 5px;
197 197 }
198 198
199 199 div.out_prompt_overlay {
200 200 height: 100%;
201 201 padding: 0px;
202 202 position: absolute;
203 203 border-radius: 3px;
204 204 }
205 205
206 206 div.out_prompt_overlay:hover {
207 207 /* use inner shadow to get border that is computed the same on WebKit/FF */
208 208 box-shadow: inset 0 0 1px #000;
209 209 background: rgba(240, 240, 240, 0.5);
210 210 }
211 211
212 212 div.output_prompt {
213 213 color: darkred;
214 214 /* 5px right shift to account for margin in parent container */
215 215 margin: 0 5px 0 -5px;
216 216 }
217 217
218 218 /* This class is the outer container of all output sections. */
219 219 div.output_area {
220 220 padding: 0px;
221 221 page-break-inside: avoid;
222 222 }
223 223
224 224 /* This class is for the output subarea inside the output_area and after
225 225 the prompt div. */
226 226 div.output_subarea {
227 227 padding: 0.4em 0.4em 0.4em 0.4em;
228 228 }
229 229
230 230 /* The rest of the output_* classes are for special styling of the different
231 231 output types */
232 232
233 233 /* all text output has this class: */
234 234 div.output_text {
235 235 text-align: left;
236 236 color: black;
237 237 font-family: monospace;
238 238 }
239 239
240 240 /* stdout/stderr are 'text' as well as 'stream', but pyout/pyerr are *not* streams */
241 241 div.output_stream {
242 242 padding-top: 0.0em;
243 243 padding-bottom: 0.0em;
244 244 }
245 245 div.output_stdout {
246 246 }
247 247 div.output_stderr {
248 248 background: #fdd; /* very light red background for stderr */
249 249 }
250 250
251 251 div.output_latex {
252 252 text-align: left;
253 253 color: black;
254 254 }
255 255
256 256 div.output_html {
257 257 }
258 258
259 259 div.output_png {
260 260 }
261 261
262 262 div.output_jpeg {
263 263 }
264 264
265 265 div.text_cell {
266 266 background-color: white;
267 267 padding: 5px 5px 5px 5px;
268 268 }
269 269
270 270 div.text_cell_input {
271 271 color: black;
272 272 border: 1px solid #ddd;
273 273 border-radius: 3px;
274 274 background: #f7f7f7;
275 275 }
276 276
277 277 div.text_cell_render {
278 278 font-family: "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
279 279 outline: none;
280 280 resize: none;
281 281 width: inherit;
282 282 border-style: none;
283 283 padding: 5px;
284 284 color: black;
285 285 }
286 286
287 287 /* The following gets added to the <head> if it is detected that the user has a
288 288 * monospace font with inconsistent normal/bold/italic height. See
289 289 * notebookmain.js. Such fonts will have keywords vertically offset with
290 290 * respect to the rest of the text. The user should select a better font.
291 291 * See: https://github.com/ipython/ipython/issues/1503
292 292 *
293 293 * .CodeMirror span {
294 294 * vertical-align: bottom;
295 295 * }
296 296 */
297 297
298 298 .CodeMirror {
299 299 line-height: 1.231; /* Changed from 1em to our global default */
300 300 }
301 301
302 302 .CodeMirror-scroll {
303 303 height: auto; /* Changed to auto to autogrow */
304 304 /* The CodeMirror docs are a bit fuzzy on if overflow-y should be hidden or visible.*/
305 305 /* We have found that if it is visible, vertical scrollbars appear with font size changes.*/
306 306 overflow-y: hidden;
307 307 overflow-x: auto; /* Changed from auto to remove scrollbar */
308 308 }
309 309
310 310 /* CSS font colors for translated ANSI colors. */
311 311
312 312
313 313 .ansiblack {color: black;}
314 314 .ansired {color: darkred;}
315 315 .ansigreen {color: darkgreen;}
316 316 .ansiyellow {color: brown;}
317 317 .ansiblue {color: darkblue;}
318 318 .ansipurple {color: darkviolet;}
319 319 .ansicyan {color: steelblue;}
320 320 .ansigrey {color: grey;}
321 321 .ansibold {font-weight: bold;}
322 322
323 323 .completions {
324 324 position: absolute;
325 325 z-index: 10;
326 326 overflow: hidden;
327 327 border: 1px solid grey;
328 328 }
329 329
330 330 .completions select {
331 331 background: white;
332 332 outline: none;
333 333 border: none;
334 334 padding: 0px;
335 335 margin: 0px;
336 336 overflow: auto;
337 337 font-family: monospace;
338 338 }
339 339
340 340 option.context {
341 341 background-color: #DEF7FF;
342 342 }
343 343 option.introspection {
344 344 background-color: #EBF4EB;
345 345 }
346 346
347 347 /*fixed part of the completion*/
348 348 .completions p b {
349 349 font-weight:bold;
350 350 }
351 351
352 352 .completions p {
353 353 background: #DDF;
354 354 /*outline: none;
355 355 padding: 0px;*/
356 356 border-bottom: black solid 1px;
357 357 padding: 1px;
358 358 font-family: monospace;
359 359 }
360 360
361 361 pre.dialog {
362 362 background-color: #f7f7f7;
363 363 border: 1px solid #ddd;
364 364 border-radius: 3px;
365 365 padding: 0.4em;
366 366 padding-left: 2em;
367 367 }
368 368
369 369 p.dialog {
370 370 padding : 0.2em;
371 371 }
372 372
373 373 .shortcut_key {
374 374 display: inline-block;
375 375 width: 15ex;
376 376 text-align: right;
377 377 font-family: monospace;
378 378 }
379 379
380 380 .shortcut_descr {
381 381 }
382 382
383 383 /* Word-wrap output correctly. This is the CSS3 spelling, though Firefox seems
384 384 to not honor it correctly. Webkit browsers (Chrome, rekonq, Safari) do.
385 385 */
386 386 pre, code, kbd, samp { white-space: pre-wrap; }
387 387
388 388 #fonttest {
389 389 font-family: monospace;
390 390 }
@@ -1,152 +1,248 b''
1 1 //----------------------------------------------------------------------------
2 // Copyright (C) 2008-2011 The IPython Development Team
2 // Copyright (C) 2008 The IPython Development Team
3 3 //
4 4 // Distributed under the terms of the BSD License. The full license is in
5 5 // the file COPYING, distributed as part of this software.
6 6 //----------------------------------------------------------------------------
7 7
8 8 //============================================================================
9 9 // ToolBar
10 10 //============================================================================
11 11
12 12 var IPython = (function (IPython) {
13 13
14 14 var ToolBar = function (selector) {
15 15 this.selector = selector;
16 16 if (this.selector !== undefined) {
17 this.construct();
18 this.addDropDownList();
17 19 this.element = $(selector);
18 20 this.style();
19 21 this.bind_events();
20 22 }
21 23 };
22 24
25 // add a group of button into the current toolbar.
26 //
27 // First argument : Mandatory
28 // list of dict as argument, each dict should contain
29 // 3 mandatory keys and values :
30 // 'label' : string -- the text to show on hover
31 // 'icon' : string -- the jQuery-ui icon to add on this button
32 // 'callback' : function -- the callback to execute on a click
33 //
34 // and optionnaly an 'id' key that is assigned to the button element
35 //
36 // Second Argument, optionnal,
37 // string reprensenting the id to give to the button group.
38 //
39 // Example
40 //
41 // IPython.toolbar.addButtonsGroup([
42 // {'label':'my button',
43 // 'icon':'ui-icon-disk',
44 // 'callback':function(){alert('hoho'),
45 // 'id' : 'my_button_id', // this is optionnal
46 // }
47 // },
48 // {'label':'my second button',
49 // 'icon':'ui-icon-scissors',
50 // 'callback':function(){alert('be carefull I cut')}
51 // }
52 // ],
53 // "my_button_group_id"
54 // )
55 //
56 ToolBar.prototype.addButtonsGroup = function(list, group_id){
57 var span_group = $('<span/>');
58 if( group_id != undefined )
59 span_group.attr('id',group_id)
60 for(var el in list)
61 {
62 var button = $('<button/>').button({
63 icons : {primary: list[el]['icon']},
64 text : false,
65 label: list[el]['label'],
66 });
67 var id = list[el]['id'];
68 if( id != undefined )
69 button.attr('id',id);
70 var fun = list[el]['callback']
71 button.click(fun);
72 span_group.append(button);
73 }
74 span_group.buttonset();
75 $(this.selector).append(span_group)
76 }
23 77
24 78 ToolBar.prototype.style = function () {
25 79 this.element.addClass('border-box-sizing').
26 addClass('ui-widget ui-widget-content').
80 addClass('ui-widget ui-widget-content toolbar').
27 81 css('border-top-style','none').
28 82 css('border-left-style','none').
29 83 css('border-right-style','none');
30 this.element.find('#cell_type').addClass('ui-widget ui-widget-content');
31 this.element.find('#save_b').button({
32 icons : {primary: 'ui-icon-disk'},
33 text : false
34 });
35 this.element.find('#cut_b').button({
36 icons: {primary: 'ui-icon-scissors'},
37 text : false
38 });
39 this.element.find('#copy_b').button({
40 icons: {primary: 'ui-icon-copy'},
41 text : false
42 });
43 this.element.find('#paste_b').button({
44 icons: {primary: 'ui-icon-clipboard'},
45 text : false
46 });
47 this.element.find('#cut_copy_paste').buttonset();
48 this.element.find('#move_up_b').button({
49 icons: {primary: 'ui-icon-arrowthick-1-n'},
50 text : false
51 });
52 this.element.find('#move_down_b').button({
53 icons: {primary: 'ui-icon-arrowthick-1-s'},
54 text : false
55 });
56 this.element.find('#move_up_down').buttonset();
57 this.element.find('#insert_above_b').button({
58 icons: {primary: 'ui-icon-arrowthickstop-1-n'},
59 text : false
60 });
61 this.element.find('#insert_below_b').button({
62 icons: {primary: 'ui-icon-arrowthickstop-1-s'},
63 text : false
64 });
65 this.element.find('#insert_above_below').buttonset();
66 this.element.find('#run_b').button({
67 icons: {primary: 'ui-icon-play'},
68 text : false
69 });
70 this.element.find('#interrupt_b').button({
71 icons: {primary: 'ui-icon-stop'},
72 text : false
73 });
74 this.element.find('#run_int').buttonset();
75 84 };
76 85
86 ToolBar.prototype.addDropDownList = function()
87 {
88 var select = $(this.selector)
89 .append($('<select/>')
90 .attr('id','cell_type')
91 .addClass('ui-widget ui-widget-content')
92 .append($('<option/>').attr('value','code').text('Code'))
93 .append($('<option/>').attr('value','markdown').text('Markdown'))
94 .append($('<option/>').attr('value','raw').text('Raw Text'))
95 .append($('<option/>').attr('value','heading1').text('Heading 1'))
96 .append($('<option/>').attr('value','heading2').text('Heading 2'))
97 .append($('<option/>').attr('value','heading3').text('Heading 3'))
98 .append($('<option/>').attr('value','heading4').text('Heading 4'))
99 .append($('<option/>').attr('value','heading5').text('Heading 5'))
100 .append($('<option/>').attr('value','heading6').text('Heading 6'))
101 .append($('<option/>').attr('value','heading7').text('Heading 7'))
102 .append($('<option/>').attr('value','heading8').text('Heading 8'))
103 );
104 }
105
106 ToolBar.prototype.construct = function() {
107 this.addButtonsGroup([
108 {
109 'id':'save_b',
110 'label':'Save',
111 'icon':'ui-icon-disk',
112 'callback':function(){
113 IPython.notebook.save_notebook();
114 },
115 },
116 ]);
117 this.addButtonsGroup([
118 {
119 'id':'cut_b',
120 'label':'Cut Cell',
121 'icon':'ui-icon-scissors',
122 'callback':function(){
123 IPython.notebook.cut_cell();
124 },
125 },
126 {
127 'id':'copy_b',
128 'label':'Copy Cell',
129 'icon':'ui-icon-copy',
130 'callback':function(){
131 IPython.notebook.copy_cell();
132 },
133 },
134 {
135 'id':'paste_b',
136 'label':'Paste Cell',
137 'icon':'ui-icon-clipboard',
138 'callback':function(){
139 IPython.notebook.paste_cell();
140 },
141 },
142 ],'cut_copy_paste');
143
144 this.addButtonsGroup([
145 {
146 'id':'move_up_b',
147 'label':'Move Cell Up',
148 'icon':'ui-icon-arrowthick-1-n',
149 'callback':function(){
150 IPython.notebook.move_cell_up();
151 },
152 },
153 {
154 'id':'move_down_b',
155 'label':'Move Cell Down',
156 'icon':'ui-icon-arrowthick-1-s',
157 'callback':function(){
158 IPython.notebook.move_cell_down();
159 },
160 },
161 ],'move_up_down');
162
163 this.addButtonsGroup([
164 {
165 'id':'insert_above_b',
166 'label':'Insert Cell Above',
167 'icon':'ui-icon-arrowthickstop-1-n',
168 'callback':function(){
169 IPython.notebook.insert_cell_above('code');
170 },
171 },
172 {
173 'id':'insert_below_b',
174 'label':'Insert Cell Below',
175 'icon':'ui-icon-arrowthickstop-1-s',
176 'callback':function(){
177 IPython.notebook.insert_cell_below('code');
178 },
179 },
180 ],'insert_above_below');
77 181
182 this.addButtonsGroup([
183 {
184 'id':'run_b',
185 'label':'Run Cell',
186 'icon':'ui-icon-play',
187 'callback':function(){
188 IPython.notebook.execute_selected_cell();
189 },
190 },
191 {
192 'id':'interrupt_b',
193 'label':'Interrupt',
194 'icon':'ui-icon-stop',
195 'callback':function(){
196 IPython.notebook.kernel.interrupt();
197 },
198 },
199 ],'run_int');
200
201
202 }
78 203 ToolBar.prototype.bind_events = function () {
79 204 var that = this;
80 this.element.find('#save_b').click(function () {
81 IPython.notebook.save_notebook();
82 });
83 this.element.find('#cut_b').click(function () {
84 IPython.notebook.cut_cell();
85 });
86 this.element.find('#copy_b').click(function () {
87 IPython.notebook.copy_cell();
88 });
89 this.element.find('#paste_b').click(function () {
90 IPython.notebook.paste_cell();
91 });
92 this.element.find('#move_up_b').click(function () {
93 IPython.notebook.move_cell_up();
94 });
95 this.element.find('#move_down_b').click(function () {
96 IPython.notebook.move_cell_down();
97 });
98 this.element.find('#insert_above_b').click(function () {
99 IPython.notebook.insert_cell_above('code');
100 });
101 this.element.find('#insert_below_b').click(function () {
102 IPython.notebook.insert_cell_below('code');
103 });
104 this.element.find('#run_b').click(function () {
105 IPython.notebook.execute_selected_cell();
106 });
107 this.element.find('#interrupt_b').click(function () {
108 IPython.notebook.kernel.interrupt();
109 });
205
110 206 this.element.find('#cell_type').change(function () {
111 207 var cell_type = $(this).val();
112 208 if (cell_type === 'code') {
113 209 IPython.notebook.to_code();
114 210 } else if (cell_type === 'markdown') {
115 211 IPython.notebook.to_markdown();
116 212 } else if (cell_type === 'raw') {
117 213 IPython.notebook.to_raw();
118 214 } else if (cell_type === 'heading1') {
119 215 IPython.notebook.to_heading(undefined, 1);
120 216 } else if (cell_type === 'heading2') {
121 217 IPython.notebook.to_heading(undefined, 2);
122 218 } else if (cell_type === 'heading3') {
123 219 IPython.notebook.to_heading(undefined, 3);
124 220 } else if (cell_type === 'heading4') {
125 221 IPython.notebook.to_heading(undefined, 4);
126 222 } else if (cell_type === 'heading5') {
127 223 IPython.notebook.to_heading(undefined, 5);
128 224 } else if (cell_type === 'heading6') {
129 225 IPython.notebook.to_heading(undefined, 6);
130 226 };
131 227 });
132 228 $([IPython.events]).on('selected_cell_type_changed.Notebook', function (event, data) {
133 229 if (data.cell_type === 'heading') {
134 230 that.element.find('#cell_type').val(data.cell_type+data.level);
135 231 } else {
136 232 that.element.find('#cell_type').val(data.cell_type);
137 233 }
138 234 });
139 235 };
140 236
141 237
142 238 ToolBar.prototype.toggle = function () {
143 239 this.element.toggle();
144 240 IPython.layout_manager.do_resize();
145 241 };
146 242
147 243
148 244 IPython.ToolBar = ToolBar;
149 245
150 246 return IPython;
151 247
152 248 }(IPython));
@@ -1,248 +1,212 b''
1 1 {% extends page.html %}
2 2 {% block stylesheet %}
3 3
4 4 {% if mathjax_url %}
5 5 <script type="text/javascript" src="{{mathjax_url}}?config=TeX-AMS_HTML" charset="utf-8"></script>
6 6 {% end %}
7 7 <script type="text/javascript">
8 8 // MathJax disabled, set as null to distingish from *missing* MathJax,
9 9 // where it will be undefined, and should prompt a dialog later.
10 10 window.mathjax_url = "{{mathjax_url}}";
11 11 </script>
12 12
13 13 <link rel="stylesheet" href="{{ static_url("codemirror/lib/codemirror.css") }}">
14 14 <link rel="stylesheet" href="{{ static_url("codemirror/theme/ipython.css") }}">
15 15
16 16 <link rel="stylesheet" href="{{ static_url("prettify/prettify.css") }}"/>
17 17
18 18 <link rel="stylesheet" href="{{ static_url("css/notebook.css") }}" type="text/css" />
19 19 <link rel="stylesheet" href="{{ static_url("css/tooltip.css") }}" type="text/css" />
20 20 <link rel="stylesheet" href="{{ static_url("css/renderedhtml.css") }}" type="text/css" />
21 21
22 22 {% end %}
23 23
24 24
25 25 {% block params %}
26 26
27 27 data-project={{project}}
28 28 data-base-project-url={{base_project_url}}
29 29 data-base-kernel-url={{base_kernel_url}}
30 30 data-read-only={{read_only and not logged_in}}
31 31 data-notebook-id={{notebook_id}}
32 32
33 33 {% end %}
34 34
35 35
36 36 {% block header %}
37 37
38 38 <span id="save_widget">
39 39 <span id="notebook_name"></span>
40 40 <span id="save_status"></span>
41 41 </span>
42 42
43 43 {% end %}
44 44
45 45
46 46 {% block site %}
47 47
48 48 <div id="menubar_container">
49 49 <div id="menubar">
50 50 <ul id="menus">
51 51 <li><a href="#">File</a>
52 52 <ul>
53 53 <li id="new_notebook"><a href="#">New</a></li>
54 54 <li id="open_notebook"><a href="#">Open...</a></li>
55 55 <hr/>
56 56 <li id="copy_notebook"><a href="#">Make a Copy...</a></li>
57 57 <li id="rename_notebook"><a href="#">Rename...</a></li>
58 58 <li id="save_notebook"><a href="#">Save</a></li>
59 59 <hr/>
60 60 <li><a href="#">Download as</a>
61 61 <ul>
62 62 <li id="download_ipynb"><a href="#">IPython (.ipynb)</a></li>
63 63 <li id="download_py"><a href="#">Python (.py)</a></li>
64 64 </ul>
65 65 </li>
66 66 <hr/>
67 67 <li id="print_notebook"><a href="/{{notebook_id}}/print" target="_blank">Print View</a></li>
68 68 <hr/>
69 69 <li id="kill_and_exit"><a href="#" >Close and halt</a></li>
70 70 </ul>
71 71 </li>
72 72 <li><a href="#">Edit</a>
73 73 <ul>
74 74 <li id="cut_cell"><a href="#">Cut Cell</a></li>
75 75 <li id="copy_cell"><a href="#">Copy Cell</a></li>
76 76 <li id="paste_cell" class="ui-state-disabled"><a href="#">Paste Cell</a></li>
77 77 <li id="paste_cell_above" class="ui-state-disabled"><a href="#">Paste Cell Above</a></li>
78 78 <li id="paste_cell_below" class="ui-state-disabled"><a href="#">Paste Cell Below</a></li>
79 79 <li id="delete_cell"><a href="#">Delete</a></li>
80 80 <hr/>
81 81 <li id="split_cell"><a href="#">Split Cell</a></li>
82 82 <li id="merge_cell_above"><a href="#">Merge Cell Above</a></li>
83 83 <li id="merge_cell_below"><a href="#">Merge Cell Below</a></li>
84 84 <hr/>
85 85 <li id="move_cell_up"><a href="#">Move Cell Up</a></li>
86 86 <li id="move_cell_down"><a href="#">Move Cell Down</a></li>
87 87 <hr/>
88 88 <li id="select_previous"><a href="#">Select Previous Cell</a></li>
89 89 <li id="select_next"><a href="#">Select Next Cell</a></li>
90 90 </ul>
91 91 </li>
92 92 <li><a href="#">View</a>
93 93 <ul>
94 94 <li id="toggle_header"><a href="#">Toggle Header</a></li>
95 95 <li id="toggle_toolbar"><a href="#">Toggle Toolbar</a></li>
96 96 </ul>
97 97 </li>
98 98 <li><a href="#">Insert</a>
99 99 <ul>
100 100 <li id="insert_cell_above"><a href="#">Insert Cell Above</a></li>
101 101 <li id="insert_cell_below"><a href="#">Insert Cell Below</a></li>
102 102 </ul>
103 103 </li>
104 104 <li><a href="#">Cell</a>
105 105 <ul>
106 106 <li id="run_cell"><a href="#">Run</a></li>
107 107 <li id="run_cell_in_place"><a href="#">Run in Place</a></li>
108 108 <li id="run_all_cells"><a href="#">Run All</a></li>
109 109 <hr/>
110 110 <li id="to_code"><a href="#">Code</a></li>
111 111 <li id="to_markdown"><a href="#">Markdown </a></li>
112 112 <li id="to_raw"><a href="#">Raw Text</a></li>
113 113 <li id="to_heading1"><a href="#">Heading 1</a></li>
114 114 <li id="to_heading2"><a href="#">Heading 2</a></li>
115 115 <li id="to_heading3"><a href="#">Heading 3</a></li>
116 116 <li id="to_heading4"><a href="#">Heading 4</a></li>
117 117 <li id="to_heading5"><a href="#">Heading 5</a></li>
118 118 <li id="to_heading6"><a href="#">Heading 6</a></li>
119 119 <hr/>
120 120 <li id="toggle_output"><a href="#">Toggle Current Output</a></li>
121 121 <li id="all_outputs"><a href="#">All Output</a>
122 122 <ul>
123 123 <li id="expand_all_output"><a href="#">Expand</a></li>
124 124 <li id="scroll_all_output"><a href="#">Scroll Long</a></li>
125 125 <li id="collapse_all_output"><a href="#">Collapse</a></li>
126 126 <li id="clear_all_output"><a href="#">Clear</a></li>
127 127 </ul>
128 128 </li>
129 129 </ul>
130 130 </li>
131 131 <li><a href="#">Kernel</a>
132 132 <ul>
133 133 <li id="int_kernel"><a href="#">Interrupt</a></li>
134 134 <li id="restart_kernel"><a href="#">Restart</a></li>
135 135 </ul>
136 136 </li>
137 137 <li><a href="#">Help</a>
138 138 <ul>
139 139 <li><a href="http://ipython.org/documentation.html" target="_blank">IPython Help</a></li>
140 140 <li><a href="http://ipython.org/ipython-doc/stable/interactive/htmlnotebook.html" target="_blank">Notebook Help</a></li>
141 141 <li id="keyboard_shortcuts"><a href="#">Keyboard Shortcuts</a></li>
142 142 <hr/>
143 143 <li><a href="http://docs.python.org" target="_blank">Python</a></li>
144 144 <li><a href="http://docs.scipy.org/doc/numpy/reference/" target="_blank">NumPy</a></li>
145 145 <li><a href="http://docs.scipy.org/doc/scipy/reference/" target="_blank">SciPy</a></li>
146 146 <li><a href="http://docs.sympy.org/dev/index.html" target="_blank">SymPy</a></li>
147 147 <li><a href="http://matplotlib.sourceforge.net/" target="_blank">Matplotlib</a></li>
148 148 </ul>
149 149 </li>
150 150 </ul>
151 151
152 152 </div>
153 153 <div id="notification"></div>
154 154 </div>
155 155
156 156
157 <div id="toolbar">
158
159 <span>
160 <button id="save_b">Save</button>
161 </span>
162 <span id="cut_copy_paste">
163 <button id="cut_b" title="Cut Cell">Cut Cell</button>
164 <button id="copy_b" title="Copy Cell">Copy Cell</button>
165 <button id="paste_b" title="Paste Cell">Paste Cell</button>
166 </span>
167 <span id="move_up_down">
168 <button id="move_up_b" title="Move Cell Up">Move Cell Up</button>
169 <button id="move_down_b" title="Move Cell Down">Move Down</button>
170 </span>
171 <span id="insert_above_below">
172 <button id="insert_above_b" title="Insert Cell Above">Insert Cell Above</button>
173 <button id="insert_below_b" title="Insert Cell Below">Insert Cell Below</button>
174 </span>
175 <span id="run_int">
176 <button id="run_b" title="Run Cell">Run Cell</button>
177 <button id="interrupt_b" title="Interrupt">Interrupt</button>
178 </span>
179 <span>
180 <select id="cell_type">
181 <option value="code">Code</option>
182 <option value="markdown">Markdown</option>
183 <option value="raw">Raw Text</option>
184 <option value="heading1">Heading 1</option>
185 <option value="heading2">Heading 2</option>
186 <option value="heading3">Heading 3</option>
187 <option value="heading4">Heading 4</option>
188 <option value="heading5">Heading 5</option>
189 <option value="heading6">Heading 6</option>
190 </select>
191 </span>
192
193 </div>
157 <div id="toolbar"></div>
194 158
195 159 <div id="main_app">
196 160
197 161 <div id="notebook_panel">
198 162 <div id="notebook"></div>
199 163 <div id="pager_splitter"></div>
200 164 <div id="pager"></div>
201 165 </div>
202 166
203 167 </div>
204 168 <div id='tooltip' class='tooltip ui-corner-all' style='display:none'></div>
205 169
206 170
207 171 {% end %}
208 172
209 173
210 174 {% block script %}
211 175
212 176 <script src="{{ static_url("codemirror/lib/codemirror.js") }}" charset="utf-8"></script>
213 177 <script src="{{ static_url("codemirror/mode/python/python.js") }}" charset="utf-8"></script>
214 178 <script src="{{ static_url("codemirror/mode/htmlmixed/htmlmixed.js") }}" charset="utf-8"></script>
215 179 <script src="{{ static_url("codemirror/mode/xml/xml.js") }}" charset="utf-8"></script>
216 180 <script src="{{ static_url("codemirror/mode/javascript/javascript.js") }}" charset="utf-8"></script>
217 181 <script src="{{ static_url("codemirror/mode/css/css.js") }}" charset="utf-8"></script>
218 182 <script src="{{ static_url("codemirror/mode/rst/rst.js") }}" charset="utf-8"></script>
219 183 <script src="{{ static_url("codemirror/mode/markdown/markdown.js") }}" charset="utf-8"></script>
220 184
221 185 <script src="{{ static_url("pagedown/Markdown.Converter.js") }}" charset="utf-8"></script>
222 186
223 187 <script src="{{ static_url("prettify/prettify.js") }}" charset="utf-8"></script>
224 188 <script src="{{ static_url("dateformat/date.format.js") }}" charset="utf-8"></script>
225 189
226 190 <script src="{{ static_url("js/events.js") }}" type="text/javascript" charset="utf-8"></script>
227 191 <script src="{{ static_url("js/utils.js") }}" type="text/javascript" charset="utf-8"></script>
228 192 <script src="{{ static_url("js/layoutmanager.js") }}" type="text/javascript" charset="utf-8"></script>
229 193 <script src="{{ static_url("js/initmathjax.js") }}" type="text/javascript" charset="utf-8"></script>
230 194 <script src="{{ static_url("js/outputarea.js") }}" type="text/javascript" charset="utf-8"></script>
231 195 <script src="{{ static_url("js/cell.js") }}" type="text/javascript" charset="utf-8"></script>
232 196 <script src="{{ static_url("js/codecell.js") }}" type="text/javascript" charset="utf-8"></script>
233 197 <script src="{{ static_url("js/completer.js") }}" type="text/javascript" charset="utf-8"></script>
234 198 <script src="{{ static_url("js/textcell.js") }}" type="text/javascript" charset="utf-8"></script>
235 199 <script src="{{ static_url("js/kernel.js") }}" type="text/javascript" charset="utf-8"></script>
236 200 <script src="{{ static_url("js/savewidget.js") }}" type="text/javascript" charset="utf-8"></script>
237 201 <script src="{{ static_url("js/quickhelp.js") }}" type="text/javascript" charset="utf-8"></script>
238 202 <script src="{{ static_url("js/pager.js") }}" type="text/javascript" charset="utf-8"></script>
239 203 <script src="{{ static_url("js/menubar.js") }}" type="text/javascript" charset="utf-8"></script>
240 204 <script src="{{ static_url("js/toolbar.js") }}" type="text/javascript" charset="utf-8"></script>
241 205 <script src="{{ static_url("js/notebook.js") }}" type="text/javascript" charset="utf-8"></script>
242 206 <script src="{{ static_url("js/notificationwidget.js") }}" type="text/javascript" charset="utf-8"></script>
243 207 <script src="{{ static_url("js/tooltip.js") }}" type="text/javascript" charset="utf-8"></script>
244 208 <script src="{{ static_url("js/notebookmain.js") }}" type="text/javascript" charset="utf-8"></script>
245 209
246 210 <script src="{{ static_url("js/contexthint.js") }} charset="utf-8"></script>
247 211
248 212 {% end %}
General Comments 0
You need to be logged in to leave comments. Login now