##// END OF EJS Templates
add raw cell toolbar preset
MinRK -
Show More
@@ -0,0 +1,60 b''
1 //----------------------------------------------------------------------------
2 // Copyright (C) 2012 The IPython Development Team
3 //
4 // Distributed under the terms of the BSD License. The full license is in
5 // the file COPYING, distributed as part of this software.
6 //----------------------------------------------------------------------------
7
8 //============================================================================
9 // CellToolbar Example
10 //============================================================================
11
12 (function(IPython) {
13 "use strict";
14
15 var CellToolbar = IPython.CellToolbar;
16 var raw_cell_preset = [];
17
18 var select_type = CellToolbar.utils.select_ui_generator([
19 ["None", "-"],
20 ["LaTeX", "text/latex"],
21 ["restructuredText", "text/restructuredtext"],
22 ["HTML", "text/html"],
23 ["markdown", "text/markdown"],
24 ["Python", "text/python"],
25 ["Custom", , "dialog"],
26
27 ],
28 // setter
29 function(cell, value) {
30 if (value === '-') {
31 delete cell.metadata.raw_mime;
32 } else if (value === 'dialog'){
33 // IPython.dialog.modal(
34 // "Set custom raw cell format",
35 //
36 // OK
37 // )
38 //
39 } else {
40 cell.metadata.raw_mime = value;
41 }
42 },
43 //getter
44 function(cell) {
45 return cell.metadata.raw_mime || "-";
46 },
47 // name
48 "Raw NBConvert Format",
49 // cell_types
50 ["raw"]
51 );
52
53 CellToolbar.register_callback('raw_cell.select', select_type);
54
55 raw_cell_preset.push('raw_cell.select');
56
57 CellToolbar.register_preset('Raw Cell Format', raw_cell_preset);
58 console.log('Raw Cell Format toolbar preset loaded.');
59
60 }(IPython)); No newline at end of file
@@ -1,207 +1,207 b''
1 //----------------------------------------------------------------------------
1 //----------------------------------------------------------------------------
2 // Copyright (C) 2011 The IPython Development Team
2 // Copyright (C) 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 // ToolBar
9 // ToolBar
10 //============================================================================
10 //============================================================================
11
11
12 var IPython = (function (IPython) {
12 var IPython = (function (IPython) {
13 "use strict";
13 "use strict";
14
14
15 var MainToolBar = function (selector) {
15 var MainToolBar = function (selector) {
16 IPython.ToolBar.apply(this, arguments);
16 IPython.ToolBar.apply(this, arguments);
17 this.construct();
17 this.construct();
18 this.add_celltype_list();
18 this.add_celltype_list();
19 this.add_celltoolbar_list();
19 this.add_celltoolbar_list();
20 this.bind_events();
20 this.bind_events();
21 };
21 };
22
22
23 MainToolBar.prototype = new IPython.ToolBar();
23 MainToolBar.prototype = new IPython.ToolBar();
24
24
25 MainToolBar.prototype.construct = function () {
25 MainToolBar.prototype.construct = function () {
26 this.add_buttons_group([
26 this.add_buttons_group([
27 {
27 {
28 id : 'save_b',
28 id : 'save_b',
29 label : 'Save and Checkpoint',
29 label : 'Save and Checkpoint',
30 icon : 'icon-save',
30 icon : 'icon-save',
31 callback : function () {
31 callback : function () {
32 IPython.notebook.save_checkpoint();
32 IPython.notebook.save_checkpoint();
33 }
33 }
34 }
34 }
35 ]);
35 ]);
36 this.add_buttons_group([
36 this.add_buttons_group([
37 {
37 {
38 id : 'cut_b',
38 id : 'cut_b',
39 label : 'Cut Cell',
39 label : 'Cut Cell',
40 icon : 'icon-cut',
40 icon : 'icon-cut',
41 callback : function () {
41 callback : function () {
42 IPython.notebook.cut_cell();
42 IPython.notebook.cut_cell();
43 }
43 }
44 },
44 },
45 {
45 {
46 id : 'copy_b',
46 id : 'copy_b',
47 label : 'Copy Cell',
47 label : 'Copy Cell',
48 icon : 'icon-copy',
48 icon : 'icon-copy',
49 callback : function () {
49 callback : function () {
50 IPython.notebook.copy_cell();
50 IPython.notebook.copy_cell();
51 }
51 }
52 },
52 },
53 {
53 {
54 id : 'paste_b',
54 id : 'paste_b',
55 label : 'Paste Cell Below',
55 label : 'Paste Cell Below',
56 icon : 'icon-paste',
56 icon : 'icon-paste',
57 callback : function () {
57 callback : function () {
58 IPython.notebook.paste_cell_below();
58 IPython.notebook.paste_cell_below();
59 }
59 }
60 }
60 }
61 ],'cut_copy_paste');
61 ],'cut_copy_paste');
62
62
63 this.add_buttons_group([
63 this.add_buttons_group([
64 {
64 {
65 id : 'move_up_b',
65 id : 'move_up_b',
66 label : 'Move Cell Up',
66 label : 'Move Cell Up',
67 icon : 'icon-arrow-up',
67 icon : 'icon-arrow-up',
68 callback : function () {
68 callback : function () {
69 IPython.notebook.move_cell_up();
69 IPython.notebook.move_cell_up();
70 }
70 }
71 },
71 },
72 {
72 {
73 id : 'move_down_b',
73 id : 'move_down_b',
74 label : 'Move Cell Down',
74 label : 'Move Cell Down',
75 icon : 'icon-arrow-down',
75 icon : 'icon-arrow-down',
76 callback : function () {
76 callback : function () {
77 IPython.notebook.move_cell_down();
77 IPython.notebook.move_cell_down();
78 }
78 }
79 }
79 }
80 ],'move_up_down');
80 ],'move_up_down');
81
81
82 this.add_buttons_group([
82 this.add_buttons_group([
83 {
83 {
84 id : 'insert_above_b',
84 id : 'insert_above_b',
85 label : 'Insert Cell Above',
85 label : 'Insert Cell Above',
86 icon : 'icon-circle-arrow-up',
86 icon : 'icon-circle-arrow-up',
87 callback : function () {
87 callback : function () {
88 IPython.notebook.insert_cell_above('code');
88 IPython.notebook.insert_cell_above('code');
89 }
89 }
90 },
90 },
91 {
91 {
92 id : 'insert_below_b',
92 id : 'insert_below_b',
93 label : 'Insert Cell Below',
93 label : 'Insert Cell Below',
94 icon : 'icon-circle-arrow-down',
94 icon : 'icon-circle-arrow-down',
95 callback : function () {
95 callback : function () {
96 IPython.notebook.insert_cell_below('code');
96 IPython.notebook.insert_cell_below('code');
97 }
97 }
98 }
98 }
99 ],'insert_above_below');
99 ],'insert_above_below');
100
100
101 this.add_buttons_group([
101 this.add_buttons_group([
102 {
102 {
103 id : 'run_b',
103 id : 'run_b',
104 label : 'Run Cell',
104 label : 'Run Cell',
105 icon : 'icon-play',
105 icon : 'icon-play',
106 callback : function () {
106 callback : function () {
107 IPython.notebook.execute_selected_cell();
107 IPython.notebook.execute_selected_cell();
108 }
108 }
109 },
109 },
110 {
110 {
111 id : 'interrupt_b',
111 id : 'interrupt_b',
112 label : 'Interrupt',
112 label : 'Interrupt',
113 icon : 'icon-stop',
113 icon : 'icon-stop',
114 callback : function () {
114 callback : function () {
115 IPython.notebook.session.interrupt_kernel();
115 IPython.notebook.session.interrupt_kernel();
116 }
116 }
117 }
117 }
118 ],'run_int');
118 ],'run_int');
119 };
119 };
120
120
121 MainToolBar.prototype.add_celltype_list = function () {
121 MainToolBar.prototype.add_celltype_list = function () {
122 this.element
122 this.element
123 .append($('<select/>')
123 .append($('<select/>')
124 .attr('id','cell_type')
124 .attr('id','cell_type')
125 // .addClass('ui-widget-content')
125 // .addClass('ui-widget-content')
126 .append($('<option/>').attr('value','code').text('Code'))
126 .append($('<option/>').attr('value','code').text('Code'))
127 .append($('<option/>').attr('value','markdown').text('Markdown'))
127 .append($('<option/>').attr('value','markdown').text('Markdown'))
128 .append($('<option/>').attr('value','raw').text('Raw Text'))
128 .append($('<option/>').attr('value','raw').text('Raw NBConvert'))
129 .append($('<option/>').attr('value','heading1').text('Heading 1'))
129 .append($('<option/>').attr('value','heading1').text('Heading 1'))
130 .append($('<option/>').attr('value','heading2').text('Heading 2'))
130 .append($('<option/>').attr('value','heading2').text('Heading 2'))
131 .append($('<option/>').attr('value','heading3').text('Heading 3'))
131 .append($('<option/>').attr('value','heading3').text('Heading 3'))
132 .append($('<option/>').attr('value','heading4').text('Heading 4'))
132 .append($('<option/>').attr('value','heading4').text('Heading 4'))
133 .append($('<option/>').attr('value','heading5').text('Heading 5'))
133 .append($('<option/>').attr('value','heading5').text('Heading 5'))
134 .append($('<option/>').attr('value','heading6').text('Heading 6'))
134 .append($('<option/>').attr('value','heading6').text('Heading 6'))
135 );
135 );
136 };
136 };
137
137
138
138
139 MainToolBar.prototype.add_celltoolbar_list = function () {
139 MainToolBar.prototype.add_celltoolbar_list = function () {
140 var label = $('<span/>').addClass("navbar-text").text('Cell Toolbar:');
140 var label = $('<span/>').addClass("navbar-text").text('Cell Toolbar:');
141 var select = $('<select/>')
141 var select = $('<select/>')
142 // .addClass('ui-widget-content')
142 // .addClass('ui-widget-content')
143 .attr('id', 'ctb_select')
143 .attr('id', 'ctb_select')
144 .append($('<option/>').attr('value', '').text('None'));
144 .append($('<option/>').attr('value', '').text('None'));
145 this.element.append(label).append(select);
145 this.element.append(label).append(select);
146 select.change(function() {
146 select.change(function() {
147 var val = $(this).val()
147 var val = $(this).val()
148 if (val =='') {
148 if (val =='') {
149 IPython.CellToolbar.global_hide();
149 IPython.CellToolbar.global_hide();
150 } else {
150 } else {
151 IPython.CellToolbar.global_show();
151 IPython.CellToolbar.global_show();
152 IPython.CellToolbar.activate_preset(val);
152 IPython.CellToolbar.activate_preset(val);
153 }
153 }
154 });
154 });
155 // Setup the currently registered presets.
155 // Setup the currently registered presets.
156 var presets = IPython.CellToolbar.list_presets();
156 var presets = IPython.CellToolbar.list_presets();
157 for (var i=0; i<presets.length; i++) {
157 for (var i=0; i<presets.length; i++) {
158 var name = presets[i];
158 var name = presets[i];
159 select.append($('<option/>').attr('value', name).text(name));
159 select.append($('<option/>').attr('value', name).text(name));
160 }
160 }
161 // Setup future preset registrations.
161 // Setup future preset registrations.
162 $([IPython.events]).on('preset_added.CellToolbar', function (event, data) {
162 $([IPython.events]).on('preset_added.CellToolbar', function (event, data) {
163 var name = data.name;
163 var name = data.name;
164 select.append($('<option/>').attr('value', name).text(name));
164 select.append($('<option/>').attr('value', name).text(name));
165 });
165 });
166 };
166 };
167
167
168
168
169 MainToolBar.prototype.bind_events = function () {
169 MainToolBar.prototype.bind_events = function () {
170 var that = this;
170 var that = this;
171
171
172 this.element.find('#cell_type').change(function () {
172 this.element.find('#cell_type').change(function () {
173 var cell_type = $(this).val();
173 var cell_type = $(this).val();
174 if (cell_type === 'code') {
174 if (cell_type === 'code') {
175 IPython.notebook.to_code();
175 IPython.notebook.to_code();
176 } else if (cell_type === 'markdown') {
176 } else if (cell_type === 'markdown') {
177 IPython.notebook.to_markdown();
177 IPython.notebook.to_markdown();
178 } else if (cell_type === 'raw') {
178 } else if (cell_type === 'raw') {
179 IPython.notebook.to_raw();
179 IPython.notebook.to_raw();
180 } else if (cell_type === 'heading1') {
180 } else if (cell_type === 'heading1') {
181 IPython.notebook.to_heading(undefined, 1);
181 IPython.notebook.to_heading(undefined, 1);
182 } else if (cell_type === 'heading2') {
182 } else if (cell_type === 'heading2') {
183 IPython.notebook.to_heading(undefined, 2);
183 IPython.notebook.to_heading(undefined, 2);
184 } else if (cell_type === 'heading3') {
184 } else if (cell_type === 'heading3') {
185 IPython.notebook.to_heading(undefined, 3);
185 IPython.notebook.to_heading(undefined, 3);
186 } else if (cell_type === 'heading4') {
186 } else if (cell_type === 'heading4') {
187 IPython.notebook.to_heading(undefined, 4);
187 IPython.notebook.to_heading(undefined, 4);
188 } else if (cell_type === 'heading5') {
188 } else if (cell_type === 'heading5') {
189 IPython.notebook.to_heading(undefined, 5);
189 IPython.notebook.to_heading(undefined, 5);
190 } else if (cell_type === 'heading6') {
190 } else if (cell_type === 'heading6') {
191 IPython.notebook.to_heading(undefined, 6);
191 IPython.notebook.to_heading(undefined, 6);
192 }
192 }
193 });
193 });
194 $([IPython.events]).on('selected_cell_type_changed.Notebook', function (event, data) {
194 $([IPython.events]).on('selected_cell_type_changed.Notebook', function (event, data) {
195 if (data.cell_type === 'heading') {
195 if (data.cell_type === 'heading') {
196 that.element.find('#cell_type').val(data.cell_type+data.level);
196 that.element.find('#cell_type').val(data.cell_type+data.level);
197 } else {
197 } else {
198 that.element.find('#cell_type').val(data.cell_type);
198 that.element.find('#cell_type').val(data.cell_type);
199 }
199 }
200 });
200 });
201 };
201 };
202
202
203 IPython.MainToolBar = MainToolBar;
203 IPython.MainToolBar = MainToolBar;
204
204
205 return IPython;
205 return IPython;
206
206
207 }(IPython));
207 }(IPython));
@@ -1,301 +1,302 b''
1 {% extends "page.html" %}
1 {% extends "page.html" %}
2
2
3 {% block stylesheet %}
3 {% block stylesheet %}
4
4
5 {% if mathjax_url %}
5 {% if mathjax_url %}
6 <script type="text/javascript" src="{{mathjax_url}}?config=TeX-AMS_HTML-full&delayStartupUntil=configured" charset="utf-8"></script>
6 <script type="text/javascript" src="{{mathjax_url}}?config=TeX-AMS_HTML-full&delayStartupUntil=configured" charset="utf-8"></script>
7 {% endif %}
7 {% endif %}
8 <script type="text/javascript">
8 <script type="text/javascript">
9 // MathJax disabled, set as null to distingish from *missing* MathJax,
9 // MathJax disabled, set as null to distingish from *missing* MathJax,
10 // where it will be undefined, and should prompt a dialog later.
10 // where it will be undefined, and should prompt a dialog later.
11 window.mathjax_url = "{{mathjax_url}}";
11 window.mathjax_url = "{{mathjax_url}}";
12 </script>
12 </script>
13
13
14 <link rel="stylesheet" href="{{ static_url("components/codemirror/lib/codemirror.css") }}">
14 <link rel="stylesheet" href="{{ static_url("components/codemirror/lib/codemirror.css") }}">
15
15
16 {{super()}}
16 {{super()}}
17
17
18 <link rel="stylesheet" href="{{ static_url("notebook/css/override.css") }}" type="text/css" />
18 <link rel="stylesheet" href="{{ static_url("notebook/css/override.css") }}" type="text/css" />
19
19
20 {% endblock %}
20 {% endblock %}
21
21
22 {% block params %}
22 {% block params %}
23
23
24 data-project="{{project}}"
24 data-project="{{project}}"
25 data-base-project-url="{{base_project_url}}"
25 data-base-project-url="{{base_project_url}}"
26 data-base-kernel-url="{{base_kernel_url}}"
26 data-base-kernel-url="{{base_kernel_url}}"
27 data-notebook-name="{{notebook_name}}"
27 data-notebook-name="{{notebook_name}}"
28 data-notebook-path="{{notebook_path}}"
28 data-notebook-path="{{notebook_path}}"
29 class="notebook_app"
29 class="notebook_app"
30
30
31 {% endblock %}
31 {% endblock %}
32
32
33
33
34 {% block header %}
34 {% block header %}
35
35
36 <span id="save_widget" class="nav pull-left">
36 <span id="save_widget" class="nav pull-left">
37 <span id="notebook_name"></span>
37 <span id="notebook_name"></span>
38 <span id="checkpoint_status"></span>
38 <span id="checkpoint_status"></span>
39 <span id="autosave_status"></span>
39 <span id="autosave_status"></span>
40 </span>
40 </span>
41
41
42 {% endblock %}
42 {% endblock %}
43
43
44
44
45 {% block site %}
45 {% block site %}
46
46
47 <div id="menubar-container" class="container">
47 <div id="menubar-container" class="container">
48 <div id="menubar">
48 <div id="menubar">
49 <div class="navbar">
49 <div class="navbar">
50 <div class="navbar-inner">
50 <div class="navbar-inner">
51 <div class="container">
51 <div class="container">
52 <ul id="menus" class="nav">
52 <ul id="menus" class="nav">
53 <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">File</a>
53 <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">File</a>
54 <ul class="dropdown-menu">
54 <ul class="dropdown-menu">
55 <li id="new_notebook"
55 <li id="new_notebook"
56 title="Make a new notebook (Opens a new window)">
56 title="Make a new notebook (Opens a new window)">
57 <a href="#">New</a></li>
57 <a href="#">New</a></li>
58 <li id="open_notebook"
58 <li id="open_notebook"
59 title="Opens a new window with the Dashboard view">
59 title="Opens a new window with the Dashboard view">
60 <a href="#">Open...</a></li>
60 <a href="#">Open...</a></li>
61 <!-- <hr/> -->
61 <!-- <hr/> -->
62 <li class="divider"></li>
62 <li class="divider"></li>
63 <li id="copy_notebook"
63 <li id="copy_notebook"
64 title="Open a copy of this notebook's contents and start a new kernel">
64 title="Open a copy of this notebook's contents and start a new kernel">
65 <a href="#">Make a Copy...</a></li>
65 <a href="#">Make a Copy...</a></li>
66 <li id="rename_notebook"><a href="#">Rename...</a></li>
66 <li id="rename_notebook"><a href="#">Rename...</a></li>
67 <li id="save_checkpoint"><a href="#">Save and Checkpoint</a></li>
67 <li id="save_checkpoint"><a href="#">Save and Checkpoint</a></li>
68 <!-- <hr/> -->
68 <!-- <hr/> -->
69 <li class="divider"></li>
69 <li class="divider"></li>
70 <li id="restore_checkpoint" class="dropdown-submenu"><a href="#">Revert to Checkpoint</a>
70 <li id="restore_checkpoint" class="dropdown-submenu"><a href="#">Revert to Checkpoint</a>
71 <ul class="dropdown-menu">
71 <ul class="dropdown-menu">
72 <li><a href="#"></a></li>
72 <li><a href="#"></a></li>
73 <li><a href="#"></a></li>
73 <li><a href="#"></a></li>
74 <li><a href="#"></a></li>
74 <li><a href="#"></a></li>
75 <li><a href="#"></a></li>
75 <li><a href="#"></a></li>
76 <li><a href="#"></a></li>
76 <li><a href="#"></a></li>
77 </ul>
77 </ul>
78 </li>
78 </li>
79 <li class="divider"></li>
79 <li class="divider"></li>
80 <li class="dropdown-submenu"><a href="#">Download as</a>
80 <li class="dropdown-submenu"><a href="#">Download as</a>
81 <ul class="dropdown-menu">
81 <ul class="dropdown-menu">
82 <li id="download_ipynb"><a href="#">IPython Notebook (.ipynb)</a></li>
82 <li id="download_ipynb"><a href="#">IPython Notebook (.ipynb)</a></li>
83 <!-- <li id="download_py"><a href="#">Python (.py)</a></li> -->
83 <!-- <li id="download_py"><a href="#">Python (.py)</a></li> -->
84 </ul>
84 </ul>
85 </li>
85 </li>
86 <li class="divider"></li>
86 <li class="divider"></li>
87
87
88 <li id="kill_and_exit"
88 <li id="kill_and_exit"
89 title="Shutdown this notebook's kernel, and close this window">
89 title="Shutdown this notebook's kernel, and close this window">
90 <a href="#" >Close and halt</a></li>
90 <a href="#" >Close and halt</a></li>
91 </ul>
91 </ul>
92 </li>
92 </li>
93 <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">Edit</a>
93 <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">Edit</a>
94 <ul class="dropdown-menu">
94 <ul class="dropdown-menu">
95 <li id="cut_cell"><a href="#">Cut Cell</a></li>
95 <li id="cut_cell"><a href="#">Cut Cell</a></li>
96 <li id="copy_cell"><a href="#">Copy Cell</a></li>
96 <li id="copy_cell"><a href="#">Copy Cell</a></li>
97 <li id="paste_cell_above" class="disabled"><a href="#">Paste Cell Above</a></li>
97 <li id="paste_cell_above" class="disabled"><a href="#">Paste Cell Above</a></li>
98 <li id="paste_cell_below" class="disabled"><a href="#">Paste Cell Below</a></li>
98 <li id="paste_cell_below" class="disabled"><a href="#">Paste Cell Below</a></li>
99 <li id="paste_cell_replace" class="disabled"><a href="#">Paste Cell &amp; Replace</a></li>
99 <li id="paste_cell_replace" class="disabled"><a href="#">Paste Cell &amp; Replace</a></li>
100 <li id="delete_cell"><a href="#">Delete Cell</a></li>
100 <li id="delete_cell"><a href="#">Delete Cell</a></li>
101 <li id="undelete_cell" class="disabled"><a href="#">Undo Delete Cell</a></li>
101 <li id="undelete_cell" class="disabled"><a href="#">Undo Delete Cell</a></li>
102 <li class="divider"></li>
102 <li class="divider"></li>
103 <li id="split_cell"><a href="#">Split Cell</a></li>
103 <li id="split_cell"><a href="#">Split Cell</a></li>
104 <li id="merge_cell_above"><a href="#">Merge Cell Above</a></li>
104 <li id="merge_cell_above"><a href="#">Merge Cell Above</a></li>
105 <li id="merge_cell_below"><a href="#">Merge Cell Below</a></li>
105 <li id="merge_cell_below"><a href="#">Merge Cell Below</a></li>
106 <li class="divider"></li>
106 <li class="divider"></li>
107 <li id="move_cell_up"><a href="#">Move Cell Up</a></li>
107 <li id="move_cell_up"><a href="#">Move Cell Up</a></li>
108 <li id="move_cell_down"><a href="#">Move Cell Down</a></li>
108 <li id="move_cell_down"><a href="#">Move Cell Down</a></li>
109 <li class="divider"></li>
109 <li class="divider"></li>
110 <li id="select_previous"><a href="#">Select Previous Cell</a></li>
110 <li id="select_previous"><a href="#">Select Previous Cell</a></li>
111 <li id="select_next"><a href="#">Select Next Cell</a></li>
111 <li id="select_next"><a href="#">Select Next Cell</a></li>
112 <li class="divider"></li>
112 <li class="divider"></li>
113 <li id="edit_nb_metadata"><a href="#">Edit Notebook Metadata</a></li>
113 <li id="edit_nb_metadata"><a href="#">Edit Notebook Metadata</a></li>
114 </ul>
114 </ul>
115 </li>
115 </li>
116 <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">View</a>
116 <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">View</a>
117 <ul class="dropdown-menu">
117 <ul class="dropdown-menu">
118 <li id="toggle_header"
118 <li id="toggle_header"
119 title="Show/Hide the IPython Notebook logo and notebook title (above menu bar)">
119 title="Show/Hide the IPython Notebook logo and notebook title (above menu bar)">
120 <a href="#">Toggle Header</a></li>
120 <a href="#">Toggle Header</a></li>
121 <li id="toggle_toolbar"
121 <li id="toggle_toolbar"
122 title="Show/Hide the action icons (below menu bar)">
122 title="Show/Hide the action icons (below menu bar)">
123 <a href="#">Toggle Toolbar</a></li>
123 <a href="#">Toggle Toolbar</a></li>
124 </ul>
124 </ul>
125 </li>
125 </li>
126 <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">Insert</a>
126 <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">Insert</a>
127 <ul class="dropdown-menu">
127 <ul class="dropdown-menu">
128 <li id="insert_cell_above"
128 <li id="insert_cell_above"
129 title="Insert an empty Code cell above the currently active cell">
129 title="Insert an empty Code cell above the currently active cell">
130 <a href="#">Insert Cell Above</a></li>
130 <a href="#">Insert Cell Above</a></li>
131 <li id="insert_cell_below"
131 <li id="insert_cell_below"
132 title="Insert an empty Code cell below the currently active cell">
132 title="Insert an empty Code cell below the currently active cell">
133 <a href="#">Insert Cell Below</a></li>
133 <a href="#">Insert Cell Below</a></li>
134 </ul>
134 </ul>
135 </li>
135 </li>
136 <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">Cell</a>
136 <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">Cell</a>
137 <ul class="dropdown-menu">
137 <ul class="dropdown-menu">
138 <li id="run_cell" title="Run this cell, and move cursor to the next one">
138 <li id="run_cell" title="Run this cell, and move cursor to the next one">
139 <a href="#">Run</a></li>
139 <a href="#">Run</a></li>
140 <li id="run_cell_in_place" title="Run this cell, without moving to the next one">
140 <li id="run_cell_in_place" title="Run this cell, without moving to the next one">
141 <a href="#">Run in Place</a></li>
141 <a href="#">Run in Place</a></li>
142 <li id="run_all_cells" title="Run all cells in the notebook">
142 <li id="run_all_cells" title="Run all cells in the notebook">
143 <a href="#">Run All</a></li>
143 <a href="#">Run All</a></li>
144 <li id="run_all_cells_above" title="Run all cells above (but not including) this cell">
144 <li id="run_all_cells_above" title="Run all cells above (but not including) this cell">
145 <a href="#">Run All Above</a></li>
145 <a href="#">Run All Above</a></li>
146 <li id="run_all_cells_below" title="Run this cell and all cells below it">
146 <li id="run_all_cells_below" title="Run this cell and all cells below it">
147 <a href="#">Run All Below</a></li>
147 <a href="#">Run All Below</a></li>
148 <li class="divider"></li>
148 <li class="divider"></li>
149 <li id="change_cell_type" class="dropdown-submenu"
149 <li id="change_cell_type" class="dropdown-submenu"
150 title="All cells in the notebook have a cell type. By default, new cells are created as 'Code' cells">
150 title="All cells in the notebook have a cell type. By default, new cells are created as 'Code' cells">
151 <a href="#">Cell Type</a>
151 <a href="#">Cell Type</a>
152 <ul class="dropdown-menu">
152 <ul class="dropdown-menu">
153 <li id="to_code"
153 <li id="to_code"
154 title="Contents will be sent to the kernel for execution, and output will display in the footer of cell">
154 title="Contents will be sent to the kernel for execution, and output will display in the footer of cell">
155 <a href="#">Code</a></li>
155 <a href="#">Code</a></li>
156 <li id="to_markdown"
156 <li id="to_markdown"
157 title="Contents will be rendered as HTML and serve as explanatory text">
157 title="Contents will be rendered as HTML and serve as explanatory text">
158 <a href="#">Markdown</a></li>
158 <a href="#">Markdown</a></li>
159 <li id="to_raw"
159 <li id="to_raw"
160 title="Contents will pass through nbconvert unmodified">
160 title="Contents will pass through nbconvert unmodified">
161 <a href="#">Raw NBConvert</a></li>
161 <a href="#">Raw NBConvert</a></li>
162 <li id="to_heading1"><a href="#">Heading 1</a></li>
162 <li id="to_heading1"><a href="#">Heading 1</a></li>
163 <li id="to_heading2"><a href="#">Heading 2</a></li>
163 <li id="to_heading2"><a href="#">Heading 2</a></li>
164 <li id="to_heading3"><a href="#">Heading 3</a></li>
164 <li id="to_heading3"><a href="#">Heading 3</a></li>
165 <li id="to_heading4"><a href="#">Heading 4</a></li>
165 <li id="to_heading4"><a href="#">Heading 4</a></li>
166 <li id="to_heading5"><a href="#">Heading 5</a></li>
166 <li id="to_heading5"><a href="#">Heading 5</a></li>
167 <li id="to_heading6"><a href="#">Heading 6</a></li>
167 <li id="to_heading6"><a href="#">Heading 6</a></li>
168 </ul>
168 </ul>
169 </li>
169 </li>
170 <li class="divider"></li>
170 <li class="divider"></li>
171 <li id="toggle_output"
171 <li id="toggle_output"
172 title="Show/Hide the output portion of a Code cell">
172 title="Show/Hide the output portion of a Code cell">
173 <a href="#">Toggle Current Output</a></li>
173 <a href="#">Toggle Current Output</a></li>
174 <li id="all_outputs" class="dropdown-submenu"><a href="#">All Output</a>
174 <li id="all_outputs" class="dropdown-submenu"><a href="#">All Output</a>
175 <ul class="dropdown-menu">
175 <ul class="dropdown-menu">
176 <li id="expand_all_output"><a href="#">Expand</a></li>
176 <li id="expand_all_output"><a href="#">Expand</a></li>
177 <li id="scroll_all_output"><a href="#">Scroll Long</a></li>
177 <li id="scroll_all_output"><a href="#">Scroll Long</a></li>
178 <li id="collapse_all_output"><a href="#">Collapse</a></li>
178 <li id="collapse_all_output"><a href="#">Collapse</a></li>
179 <li id="clear_all_output"
179 <li id="clear_all_output"
180 title="Remove the output portion of all Code cells">
180 title="Remove the output portion of all Code cells">
181 <a href="#">Clear</a></li>
181 <a href="#">Clear</a></li>
182 </ul>
182 </ul>
183 </li>
183 </li>
184 </ul>
184 </ul>
185 </li>
185 </li>
186 <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">Kernel</a>
186 <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">Kernel</a>
187 <ul class="dropdown-menu">
187 <ul class="dropdown-menu">
188 <li id="int_kernel"
188 <li id="int_kernel"
189 title="Send KeyboardInterrupt (CTRL-C) to the Kernel">
189 title="Send KeyboardInterrupt (CTRL-C) to the Kernel">
190 <a href="#">Interrupt</a></li>
190 <a href="#">Interrupt</a></li>
191 <li id="restart_kernel"
191 <li id="restart_kernel"
192 title="Restart the Kernel">
192 title="Restart the Kernel">
193 <a href="#">Restart</a></li>
193 <a href="#">Restart</a></li>
194 </ul>
194 </ul>
195 </li>
195 </li>
196 <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">Help</a>
196 <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">Help</a>
197 <ul class="dropdown-menu" title="Opens in a new window">
197 <ul class="dropdown-menu" title="Opens in a new window">
198 <li><a href="http://ipython.org/documentation.html" target="_blank">IPython Help</a></li>
198 <li><a href="http://ipython.org/documentation.html" target="_blank">IPython Help</a></li>
199 <li><a href="http://ipython.org/ipython-doc/stable/interactive/notebook.html" target="_blank">Notebook Help</a></li>
199 <li><a href="http://ipython.org/ipython-doc/stable/interactive/notebook.html" target="_blank">Notebook Help</a></li>
200 <li id="keyboard_shortcuts" title="Opens a tooltip with all keyboard shortcuts"><a href="#">Keyboard Shortcuts</a></li>
200 <li id="keyboard_shortcuts" title="Opens a tooltip with all keyboard shortcuts"><a href="#">Keyboard Shortcuts</a></li>
201 <li class="divider"></li>
201 <li class="divider"></li>
202 <li><a href="http://docs.python.org" target="_blank">Python</a></li>
202 <li><a href="http://docs.python.org" target="_blank">Python</a></li>
203 <li><a href="http://docs.scipy.org/doc/numpy/reference/" target="_blank">NumPy</a></li>
203 <li><a href="http://docs.scipy.org/doc/numpy/reference/" target="_blank">NumPy</a></li>
204 <li><a href="http://docs.scipy.org/doc/scipy/reference/" target="_blank">SciPy</a></li>
204 <li><a href="http://docs.scipy.org/doc/scipy/reference/" target="_blank">SciPy</a></li>
205 <li><a href="http://matplotlib.org/" target="_blank">Matplotlib</a></li>
205 <li><a href="http://matplotlib.org/" target="_blank">Matplotlib</a></li>
206 <li><a href="http://docs.sympy.org/dev/index.html" target="_blank">SymPy</a></li>
206 <li><a href="http://docs.sympy.org/dev/index.html" target="_blank">SymPy</a></li>
207 <li><a href="http://pandas.pydata.org/pandas-docs/stable/" target="_blank">pandas</a></li>
207 <li><a href="http://pandas.pydata.org/pandas-docs/stable/" target="_blank">pandas</a></li>
208 </ul>
208 </ul>
209 </li>
209 </li>
210 </ul>
210 </ul>
211 <div id="notification_area"></div>
211 <div id="notification_area"></div>
212 </div>
212 </div>
213 </div>
213 </div>
214 </div>
214 </div>
215 </div>
215 </div>
216 <div id="maintoolbar" class="navbar">
216 <div id="maintoolbar" class="navbar">
217 <div class="toolbar-inner navbar-inner navbar-nobg">
217 <div class="toolbar-inner navbar-inner navbar-nobg">
218 <div id="maintoolbar-container" class="container"></div>
218 <div id="maintoolbar-container" class="container"></div>
219 </div>
219 </div>
220 </div>
220 </div>
221 </div>
221 </div>
222
222
223 <div id="ipython-main-app">
223 <div id="ipython-main-app">
224
224
225 <div id="notebook_panel">
225 <div id="notebook_panel">
226 <div id="notebook"></div>
226 <div id="notebook"></div>
227 <div id="pager_splitter"></div>
227 <div id="pager_splitter"></div>
228 <div id="pager">
228 <div id="pager">
229 <div id='pager_button_area'>
229 <div id='pager_button_area'>
230 </div>
230 </div>
231 <div id="pager-container" class="container"></div>
231 <div id="pager-container" class="container"></div>
232 </div>
232 </div>
233 </div>
233 </div>
234
234
235 </div>
235 </div>
236 <div id='tooltip' class='ipython_tooltip' style='display:none'></div>
236 <div id='tooltip' class='ipython_tooltip' style='display:none'></div>
237
237
238
238
239 {% endblock %}
239 {% endblock %}
240
240
241
241
242 {% block script %}
242 {% block script %}
243
243
244 {{super()}}
244 {{super()}}
245
245
246 <script src="{{ static_url("components/codemirror/lib/codemirror.js") }}" charset="utf-8"></script>
246 <script src="{{ static_url("components/codemirror/lib/codemirror.js") }}" charset="utf-8"></script>
247 <script type="text/javascript">
247 <script type="text/javascript">
248 CodeMirror.modeURL = "{{ static_url("components/codemirror/mode/%N/%N.js") }}";
248 CodeMirror.modeURL = "{{ static_url("components/codemirror/mode/%N/%N.js") }}";
249 </script>
249 </script>
250 <script src="{{ static_url("components/codemirror/addon/mode/loadmode.js") }}" charset="utf-8"></script>
250 <script src="{{ static_url("components/codemirror/addon/mode/loadmode.js") }}" charset="utf-8"></script>
251 <script src="{{ static_url("components/codemirror/addon/mode/multiplex.js") }}" charset="utf-8"></script>
251 <script src="{{ static_url("components/codemirror/addon/mode/multiplex.js") }}" charset="utf-8"></script>
252 <script src="{{ static_url("components/codemirror/addon/mode/overlay.js") }}" charset="utf-8"></script>
252 <script src="{{ static_url("components/codemirror/addon/mode/overlay.js") }}" charset="utf-8"></script>
253 <script src="{{ static_url("components/codemirror/addon/edit/matchbrackets.js") }}" charset="utf-8"></script>
253 <script src="{{ static_url("components/codemirror/addon/edit/matchbrackets.js") }}" charset="utf-8"></script>
254 <script src="{{ static_url("components/codemirror/addon/comment/comment.js") }}" charset="utf-8"></script>
254 <script src="{{ static_url("components/codemirror/addon/comment/comment.js") }}" charset="utf-8"></script>
255 <script src="{{ static_url("components/codemirror/mode/htmlmixed/htmlmixed.js") }}" charset="utf-8"></script>
255 <script src="{{ static_url("components/codemirror/mode/htmlmixed/htmlmixed.js") }}" charset="utf-8"></script>
256 <script src="{{ static_url("components/codemirror/mode/xml/xml.js") }}" charset="utf-8"></script>
256 <script src="{{ static_url("components/codemirror/mode/xml/xml.js") }}" charset="utf-8"></script>
257 <script src="{{ static_url("components/codemirror/mode/javascript/javascript.js") }}" charset="utf-8"></script>
257 <script src="{{ static_url("components/codemirror/mode/javascript/javascript.js") }}" charset="utf-8"></script>
258 <script src="{{ static_url("components/codemirror/mode/css/css.js") }}" charset="utf-8"></script>
258 <script src="{{ static_url("components/codemirror/mode/css/css.js") }}" charset="utf-8"></script>
259 <script src="{{ static_url("components/codemirror/mode/rst/rst.js") }}" charset="utf-8"></script>
259 <script src="{{ static_url("components/codemirror/mode/rst/rst.js") }}" charset="utf-8"></script>
260 <script src="{{ static_url("components/codemirror/mode/markdown/markdown.js") }}" charset="utf-8"></script>
260 <script src="{{ static_url("components/codemirror/mode/markdown/markdown.js") }}" charset="utf-8"></script>
261 <script src="{{ static_url("components/codemirror/mode/gfm/gfm.js") }}" charset="utf-8"></script>
261 <script src="{{ static_url("components/codemirror/mode/gfm/gfm.js") }}" charset="utf-8"></script>
262 <script src="{{ static_url("components/codemirror/mode/python/python.js") }}" charset="utf-8"></script>
262 <script src="{{ static_url("components/codemirror/mode/python/python.js") }}" charset="utf-8"></script>
263 <script src="{{ static_url("notebook/js/codemirror-ipython.js") }}" charset="utf-8"></script>
263 <script src="{{ static_url("notebook/js/codemirror-ipython.js") }}" charset="utf-8"></script>
264
264
265 <script src="{{ static_url("components/highlight.js/build/highlight.pack.js") }}" charset="utf-8"></script>
265 <script src="{{ static_url("components/highlight.js/build/highlight.pack.js") }}" charset="utf-8"></script>
266
266
267 <script src="{{ static_url("dateformat/date.format.js") }}" charset="utf-8"></script>
267 <script src="{{ static_url("dateformat/date.format.js") }}" charset="utf-8"></script>
268
268
269 <script src="{{ static_url("base/js/events.js") }}" type="text/javascript" charset="utf-8"></script>
269 <script src="{{ static_url("base/js/events.js") }}" type="text/javascript" charset="utf-8"></script>
270 <script src="{{ static_url("base/js/utils.js") }}" type="text/javascript" charset="utf-8"></script>
270 <script src="{{ static_url("base/js/utils.js") }}" type="text/javascript" charset="utf-8"></script>
271 <script src="{{ static_url("base/js/dialog.js") }}" type="text/javascript" charset="utf-8"></script>
271 <script src="{{ static_url("base/js/dialog.js") }}" type="text/javascript" charset="utf-8"></script>
272 <script src="{{ static_url("services/kernels/js/kernel.js") }}" type="text/javascript" charset="utf-8"></script>
272 <script src="{{ static_url("services/kernels/js/kernel.js") }}" type="text/javascript" charset="utf-8"></script>
273 <script src="{{ static_url("services/kernels/js/comm.js") }}" type="text/javascript" charset="utf-8"></script>
273 <script src="{{ static_url("services/kernels/js/comm.js") }}" type="text/javascript" charset="utf-8"></script>
274 <script src="{{ static_url("services/sessions/js/session.js") }}" type="text/javascript" charset="utf-8"></script>
274 <script src="{{ static_url("services/sessions/js/session.js") }}" type="text/javascript" charset="utf-8"></script>
275 <script src="{{ static_url("notebook/js/layoutmanager.js") }}" type="text/javascript" charset="utf-8"></script>
275 <script src="{{ static_url("notebook/js/layoutmanager.js") }}" type="text/javascript" charset="utf-8"></script>
276 <script src="{{ static_url("notebook/js/mathjaxutils.js") }}" type="text/javascript" charset="utf-8"></script>
276 <script src="{{ static_url("notebook/js/mathjaxutils.js") }}" type="text/javascript" charset="utf-8"></script>
277 <script src="{{ static_url("notebook/js/outputarea.js") }}" type="text/javascript" charset="utf-8"></script>
277 <script src="{{ static_url("notebook/js/outputarea.js") }}" type="text/javascript" charset="utf-8"></script>
278 <script src="{{ static_url("notebook/js/cell.js") }}" type="text/javascript" charset="utf-8"></script>
278 <script src="{{ static_url("notebook/js/cell.js") }}" type="text/javascript" charset="utf-8"></script>
279 <script src="{{ static_url("notebook/js/celltoolbar.js") }}" type="text/javascript" charset="utf-8"></script>
279 <script src="{{ static_url("notebook/js/celltoolbar.js") }}" type="text/javascript" charset="utf-8"></script>
280 <script src="{{ static_url("notebook/js/codecell.js") }}" type="text/javascript" charset="utf-8"></script>
280 <script src="{{ static_url("notebook/js/codecell.js") }}" type="text/javascript" charset="utf-8"></script>
281 <script src="{{ static_url("notebook/js/completer.js") }}" type="text/javascript" charset="utf-8"></script>
281 <script src="{{ static_url("notebook/js/completer.js") }}" type="text/javascript" charset="utf-8"></script>
282 <script src="{{ static_url("notebook/js/textcell.js") }}" type="text/javascript" charset="utf-8"></script>
282 <script src="{{ static_url("notebook/js/textcell.js") }}" type="text/javascript" charset="utf-8"></script>
283 <script src="{{ static_url("notebook/js/savewidget.js") }}" type="text/javascript" charset="utf-8"></script>
283 <script src="{{ static_url("notebook/js/savewidget.js") }}" type="text/javascript" charset="utf-8"></script>
284 <script src="{{ static_url("notebook/js/quickhelp.js") }}" type="text/javascript" charset="utf-8"></script>
284 <script src="{{ static_url("notebook/js/quickhelp.js") }}" type="text/javascript" charset="utf-8"></script>
285 <script src="{{ static_url("notebook/js/pager.js") }}" type="text/javascript" charset="utf-8"></script>
285 <script src="{{ static_url("notebook/js/pager.js") }}" type="text/javascript" charset="utf-8"></script>
286 <script src="{{ static_url("notebook/js/menubar.js") }}" type="text/javascript" charset="utf-8"></script>
286 <script src="{{ static_url("notebook/js/menubar.js") }}" type="text/javascript" charset="utf-8"></script>
287 <script src="{{ static_url("notebook/js/toolbar.js") }}" type="text/javascript" charset="utf-8"></script>
287 <script src="{{ static_url("notebook/js/toolbar.js") }}" type="text/javascript" charset="utf-8"></script>
288 <script src="{{ static_url("notebook/js/maintoolbar.js") }}" type="text/javascript" charset="utf-8"></script>
288 <script src="{{ static_url("notebook/js/maintoolbar.js") }}" type="text/javascript" charset="utf-8"></script>
289 <script src="{{ static_url("notebook/js/notebook.js") }}" type="text/javascript" charset="utf-8"></script>
289 <script src="{{ static_url("notebook/js/notebook.js") }}" type="text/javascript" charset="utf-8"></script>
290 <script src="{{ static_url("notebook/js/notificationwidget.js") }}" type="text/javascript" charset="utf-8"></script>
290 <script src="{{ static_url("notebook/js/notificationwidget.js") }}" type="text/javascript" charset="utf-8"></script>
291 <script src="{{ static_url("notebook/js/notificationarea.js") }}" type="text/javascript" charset="utf-8"></script>
291 <script src="{{ static_url("notebook/js/notificationarea.js") }}" type="text/javascript" charset="utf-8"></script>
292 <script src="{{ static_url("notebook/js/tooltip.js") }}" type="text/javascript" charset="utf-8"></script>
292 <script src="{{ static_url("notebook/js/tooltip.js") }}" type="text/javascript" charset="utf-8"></script>
293 <script src="{{ static_url("notebook/js/config.js") }}" type="text/javascript" charset="utf-8"></script>
293 <script src="{{ static_url("notebook/js/config.js") }}" type="text/javascript" charset="utf-8"></script>
294 <script src="{{ static_url("notebook/js/main.js") }}" type="text/javascript" charset="utf-8"></script>
294 <script src="{{ static_url("notebook/js/main.js") }}" type="text/javascript" charset="utf-8"></script>
295
295
296 <script src="{{ static_url("notebook/js/contexthint.js") }}" charset="utf-8"></script>
296 <script src="{{ static_url("notebook/js/contexthint.js") }}" charset="utf-8"></script>
297
297
298 <script src="{{ static_url("notebook/js/celltoolbarpresets/default.js") }}" type="text/javascript" charset="utf-8"></script>
298 <script src="{{ static_url("notebook/js/celltoolbarpresets/default.js") }}" type="text/javascript" charset="utf-8"></script>
299 <script src="{{ static_url("notebook/js/celltoolbarpresets/rawcell.js") }}" type="text/javascript" charset="utf-8"></script>
299 <script src="{{ static_url("notebook/js/celltoolbarpresets/slideshow.js") }}" type="text/javascript" charset="utf-8"></script>
300 <script src="{{ static_url("notebook/js/celltoolbarpresets/slideshow.js") }}" type="text/javascript" charset="utf-8"></script>
300
301
301 {% endblock %}
302 {% endblock %}
General Comments 0
You need to be logged in to leave comments. Login now