Show More
@@ -1,58 +1,59 b'' | |||
|
1 | 1 | //---------------------------------------------------------------------------- |
|
2 | 2 | // Copyright (C) 2008-2011 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 | // On document ready |
|
10 | 10 | //============================================================================ |
|
11 | 11 | |
|
12 | 12 | |
|
13 | 13 | $(document).ready(function () { |
|
14 | 14 | |
|
15 | 15 | MathJax.Hub.Config({ |
|
16 | 16 | tex2jax: { |
|
17 | 17 | inlineMath: [ ['$','$'], ["\\(","\\)"] ], |
|
18 | 18 | displayMath: [ ['$$','$$'], ["\\[","\\]"] ], |
|
19 | 19 | }, |
|
20 | 20 | displayAlign: 'left', // Change this to 'center' to center equations. |
|
21 | 21 | "HTML-CSS": { |
|
22 | 22 | styles: {'.MathJax_Display': {"margin": 0}} |
|
23 | 23 | } |
|
24 | 24 | }); |
|
25 | 25 | IPython.markdown_converter = new Markdown.Converter(); |
|
26 | 26 | |
|
27 | 27 | $('div#header').addClass('border-box-sizing'); |
|
28 | 28 | $('div#main_app').addClass('border-box-sizing ui-widget ui-widget-content'); |
|
29 | 29 | $('div#notebook_panel').addClass('border-box-sizing ui-widget'); |
|
30 | 30 | |
|
31 | 31 | IPython.layout_manager = new IPython.LayoutManager(); |
|
32 | 32 | IPython.pager = new IPython.Pager('div#pager', 'div#pager_splitter'); |
|
33 | 33 | IPython.left_panel = new IPython.LeftPanel('div#left_panel', 'div#left_panel_splitter'); |
|
34 | 34 | IPython.save_widget = new IPython.SaveWidget('span#save_widget'); |
|
35 | IPython.quick_help = new IPython.QuickHelp('span#quick_help_area'); | |
|
35 | 36 | IPython.print_widget = new IPython.PrintWidget('span#print_widget'); |
|
36 | 37 | IPython.notebook = new IPython.Notebook('div#notebook'); |
|
37 | 38 | IPython.kernel_status_widget = new IPython.KernelStatusWidget('#kernel_status'); |
|
38 | 39 | IPython.kernel_status_widget.status_idle(); |
|
39 | 40 | |
|
40 | 41 | IPython.layout_manager.do_resize(); |
|
41 | 42 | |
|
42 | 43 | // These have display: none in the css file and are made visible here to prevent FLOUC. |
|
43 | 44 | $('div#header').css('display','block'); |
|
44 | 45 | $('div#main_app').css('display','block'); |
|
45 | 46 | |
|
46 | 47 | // Perform these actions after the notebook has been loaded. |
|
47 | 48 | // We wait 100 milliseconds because the notebook scrolls to the top after a load |
|
48 | 49 | // is completed and we need to wait for that to mostly finish. |
|
49 | 50 | IPython.notebook.load_notebook(function () { |
|
50 | 51 | setTimeout(function () { |
|
51 | 52 | IPython.save_widget.update_url(); |
|
52 | 53 | IPython.layout_manager.do_resize(); |
|
53 | 54 | IPython.pager.collapse(); |
|
54 | 55 | },100); |
|
55 | 56 | }); |
|
56 | 57 | |
|
57 | 58 | }); |
|
58 | 59 |
@@ -1,41 +1,39 b'' | |||
|
1 | 1 | //---------------------------------------------------------------------------- |
|
2 | 2 | // Copyright (C) 2008-2011 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 | // HeaderSection | |
|
9 | // QuickHelp button | |
|
10 | 10 | //============================================================================ |
|
11 | 11 | |
|
12 | 12 | var IPython = (function (IPython) { |
|
13 | 13 | |
|
14 |
var |
|
|
14 | var QuickHelp = function (selector) { | |
|
15 | 15 | this.selector = selector; |
|
16 | 16 | if (this.selector !== undefined) { |
|
17 | 17 | this.element = $(selector); |
|
18 | this.content = this.element.find('div.header'); | |
|
19 | 18 | this.style(); |
|
20 | 19 | this.bind_events(); |
|
21 | 20 | } |
|
22 | 21 | }; |
|
23 | 22 | |
|
24 |
|
|
|
25 | this.content.addClass('ui-helper-clearfix'); | |
|
26 | this.content.find('#quick_help').button(); | |
|
23 | QuickHelp.prototype.style = function () { | |
|
24 | this.element.find('button#quick_help').button(); | |
|
27 | 25 | }; |
|
28 | 26 | |
|
29 |
|
|
|
27 | QuickHelp.prototype.bind_events = function () { | |
|
30 | 28 | var that = this; |
|
31 |
this. |
|
|
29 | this.element.find("button#quick_help").click(function () { | |
|
32 | 30 | IPython.notebook.show_keyboard_shortcuts(); |
|
33 | 31 | }); |
|
34 | 32 | }; |
|
35 | 33 | |
|
36 | 34 | // Set module variables |
|
37 | IPython.HeaderSection = HeaderSection; | |
|
35 | IPython.QuickHelp = QuickHelp; | |
|
38 | 36 | |
|
39 | 37 | return IPython; |
|
40 | 38 | |
|
41 | 39 | }(IPython)); |
@@ -1,280 +1,280 b'' | |||
|
1 | 1 | <!DOCTYPE HTML> |
|
2 | 2 | <html> |
|
3 | 3 | |
|
4 | 4 | <head> |
|
5 | 5 | <meta charset="utf-8"> |
|
6 | 6 | |
|
7 | 7 | <title>IPython Notebook</title> |
|
8 | 8 | |
|
9 | 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 | 11 | <!-- <link rel="stylesheet" href="static/jquery/css/themes/smoothness/jquery-ui-1.8.14.custom.css" type="text/css" />--> |
|
12 | 12 | |
|
13 | 13 | <!-- <script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML" charset="utf-8"></script> --> |
|
14 | 14 | <script type='text/javascript' src='static/mathjax/MathJax.js?config=TeX-AMS_HTML' charset='utf-8'></script> |
|
15 | 15 | <script type="text/javascript"> |
|
16 | 16 | function CheckMathJax(){ |
|
17 | 17 | var div=document.getElementById("MathJaxFetchingWarning") |
|
18 | 18 | if(window.MathJax){ |
|
19 | 19 | document.body.removeChild(div) |
|
20 | 20 | } |
|
21 | 21 | else{ |
|
22 | 22 | div.style.display = "block"; |
|
23 | 23 | } |
|
24 | 24 | } |
|
25 | 25 | if (typeof MathJax == 'undefined') { |
|
26 | 26 | console.log("No local MathJax, loading from CDN"); |
|
27 | 27 | document.write(unescape("%3Cscript type='text/javascript' src='http://cdn.mathjax.org/mathjax/latest/MathJax.js%3Fconfig=TeX-AMS_HTML' charset='utf-8'%3E%3C/script%3E")); |
|
28 | 28 | }else{ |
|
29 | 29 | console.log("Using local MathJax"); |
|
30 | 30 | } |
|
31 | 31 | </script> |
|
32 | 32 | |
|
33 | 33 | <link rel="stylesheet" href="static/codemirror/lib/codemirror.css"> |
|
34 | 34 | <link rel="stylesheet" href="static/codemirror/mode/markdown/markdown.css"> |
|
35 | 35 | <link rel="stylesheet" href="static/codemirror/mode/rst/rst.css"> |
|
36 | 36 | <link rel="stylesheet" href="static/codemirror/theme/ipython.css"> |
|
37 | 37 | <link rel="stylesheet" href="static/codemirror/theme/default.css"> |
|
38 | 38 | |
|
39 | 39 | <link rel="stylesheet" href="static/prettify/prettify.css"/> |
|
40 | 40 | |
|
41 | 41 | <link rel="stylesheet" href="static/css/boilerplate.css" type="text/css" /> |
|
42 | 42 | <link rel="stylesheet" href="static/css/layout.css" type="text/css" /> |
|
43 | 43 | <link rel="stylesheet" href="static/css/base.css" type="text/css" /> |
|
44 | 44 | <link rel="stylesheet" href="static/css/notebook.css" type="text/css" /> |
|
45 | 45 | <link rel="stylesheet" href="static/css/renderedhtml.css" type="text/css" /> |
|
46 | 46 | |
|
47 | 47 | |
|
48 | 48 | </head> |
|
49 | 49 | |
|
50 | 50 | <body onload='CheckMathJax();'> |
|
51 | 51 | |
|
52 | 52 | <div id="header"> |
|
53 | 53 | <span id="ipython_notebook"><h1>IPython Notebook</h1></span> |
|
54 | 54 | <span id="save_widget"> |
|
55 | 55 | <input type="text" id="notebook_name" size="20"></textarea> |
|
56 | 56 | <span id="notebook_id" style="display:none">{{notebook_id}}</span> |
|
57 | 57 | <button id="save_notebook"><u>S</u>ave</button> |
|
58 | 58 | </span> |
|
59 | 59 | <span id="quick_help_area"> |
|
60 | 60 | <button id="quick_help">QuickHelp</button> |
|
61 | 61 | </span> |
|
62 | 62 | <span id="kernel_status">Idle</span> |
|
63 | 63 | </div> |
|
64 | 64 | |
|
65 | 65 | <div id="MathJaxFetchingWarning" |
|
66 | 66 | style="width:80%; margin:auto;padding-top:20%;text-align: justify; display:none"> |
|
67 | 67 | <p style="font-size:26px;">There was an issue trying to fetch MathJax.js |
|
68 | 68 | from the internet.</p> |
|
69 | 69 | |
|
70 | 70 | <p style="padding:0.2em"> With a working internet connection, you can run |
|
71 | 71 | the following at a Python or IPython prompt, which will install a local |
|
72 | 72 | copy of MathJax:</p> |
|
73 | 73 | |
|
74 | 74 | <pre style="background-color:lightblue;border:thin silver solid;padding:0.4em"> |
|
75 | 75 | from IPython.external import mathjax; mathjax.install_mathjax() |
|
76 | 76 | </pre> |
|
77 | 77 | This will try to install MathJax into the directory where you installed |
|
78 | 78 | IPython. If you installed IPython to a location that requires |
|
79 | 79 | administrative privileges to write, you will need to make this call as |
|
80 | 80 | an administrator. On OSX/Linux/Unix, this can be done at the |
|
81 | 81 | command-line via: |
|
82 | 82 | <pre style="background-color:lightblue;border:thin silver solid;padding:0.4em"> |
|
83 | 83 | sudo python -c "from IPython.external import mathjax; mathjax.install_mathjax()" |
|
84 | 84 | </pre> |
|
85 | 85 | </p> |
|
86 | 86 | </div> |
|
87 | 87 | |
|
88 | 88 | <div id="main_app"> |
|
89 | 89 | |
|
90 | 90 | <div id="left_panel"> |
|
91 | 91 | |
|
92 | 92 | <div id="notebook_section"> |
|
93 | 93 | <h3 class="section_header">Notebook</h3> |
|
94 | 94 | <div class="section_content"> |
|
95 | 95 | <div class="section_row"> |
|
96 | 96 | <span id="new_open" class="section_row_buttons"> |
|
97 | 97 | <button id="new_notebook">New</button> |
|
98 | 98 | <button id="open_notebook">Open</button> |
|
99 | 99 | </span> |
|
100 | 100 | <span class="section_row_header">Actions</span> |
|
101 | 101 | </div> |
|
102 | 102 | <div class="section_row"> |
|
103 | 103 | <span> |
|
104 | 104 | <select id="download_format"> |
|
105 | 105 | <option value="json">ipynb</option> |
|
106 | 106 | <option value="py">py</option> |
|
107 | 107 | </select> |
|
108 | 108 | </span> |
|
109 | 109 | <span class="section_row_buttons"> |
|
110 | 110 | <button id="download_notebook">Download</button> |
|
111 | 111 | </span> |
|
112 | 112 | </div> |
|
113 | 113 | <div class="section_row"> |
|
114 | 114 | <span class="section_row_buttons"> |
|
115 | 115 | <span id="print_widget"> |
|
116 | 116 | <button id="print_notebook">Print</button> |
|
117 | 117 | </span> |
|
118 | 118 | </span> |
|
119 | 119 | </div> |
|
120 | 120 | </div> |
|
121 | 121 | </div> |
|
122 | 122 | |
|
123 | 123 | <div id="cell_section"> |
|
124 | 124 | <h3 class="section_header">Cell</h3> |
|
125 | 125 | <div class="section_content"> |
|
126 | 126 | <div class="section_row"> |
|
127 | 127 | <span class="section_row_buttons"> |
|
128 | 128 | <button id="delete_cell"><u>D</u>elete</button> |
|
129 | 129 | </span> |
|
130 | 130 | <span class="section_row_header">Actions</span> |
|
131 | 131 | </div> |
|
132 | 132 | <div class="section_row"> |
|
133 | 133 | <span id="cell_type" class="section_row_buttons"> |
|
134 | 134 | <button id="to_code"><u>C</u>ode</button> |
|
135 | 135 | <!-- <button id="to_html">HTML</button>--> |
|
136 | 136 | <button id="to_markdown"><u>M</u>arkdown</button> |
|
137 | 137 | </span> |
|
138 | 138 | <span class="button_label">Format</span> |
|
139 | 139 | </div> |
|
140 | 140 | <div class="section_row"> |
|
141 | 141 | <span id="cell_output" class="section_row_buttons"> |
|
142 | 142 | <button id="toggle_output"><u>T</u>oggle</button> |
|
143 | 143 | <button id="clear_all_output">ClearAll</button> |
|
144 | 144 | </span> |
|
145 | 145 | <span class="button_label">Output</span> |
|
146 | 146 | </div> |
|
147 | 147 | <div class="section_row"> |
|
148 | 148 | <span id="insert" class="section_row_buttons"> |
|
149 | 149 | <button id="insert_cell_above"><u>A</u>bove</button> |
|
150 | 150 | <button id="insert_cell_below"><u>B</u>elow</button> |
|
151 | 151 | </span> |
|
152 | 152 | <span class="button_label">Insert</span> |
|
153 | 153 | </div> |
|
154 | 154 | <div class="section_row"> |
|
155 | 155 | <span id="move" class="section_row_buttons"> |
|
156 | 156 | <button id="move_cell_up">Up</button> |
|
157 | 157 | <button id="move_cell_down">Down</button> |
|
158 | 158 | </span> |
|
159 | 159 | <span class="button_label">Move</span> |
|
160 | 160 | </div> |
|
161 | 161 | <div class="section_row"> |
|
162 | 162 | <span id="run_cells" class="section_row_buttons"> |
|
163 | 163 | <button id="run_selected_cell">Selected</button> |
|
164 | 164 | <button id="run_all_cells">All</button> |
|
165 | 165 | </span> |
|
166 | 166 | <span class="button_label">Run</span> |
|
167 | 167 | </div> |
|
168 | 168 | <div class="section_row"> |
|
169 | 169 | <span id="autoindent_span"> |
|
170 | 170 | <input type="checkbox" id="autoindent" checked="true"></input> |
|
171 | 171 | </span> |
|
172 | 172 | <span class="checkbox_label">Autoindent:</span> |
|
173 | 173 | </div> |
|
174 | 174 | </div> |
|
175 | 175 | </div> |
|
176 | 176 | |
|
177 | 177 | <div id="kernel_section"> |
|
178 | 178 | <h3 class="section_header">Kernel</h3> |
|
179 | 179 | <div class="section_content"> |
|
180 | 180 | <div class="section_row"> |
|
181 | 181 | <span id="int_restart" class="section_row_buttons"> |
|
182 | 182 | <button id="int_kernel"><u>I</u>nterrupt</button> |
|
183 | 183 | <button id="restart_kernel">Restart</button> |
|
184 | 184 | </span> |
|
185 | 185 | <span class="section_row_header">Actions</span> |
|
186 | 186 | </div> |
|
187 | 187 | <div class="section_row"> |
|
188 | 188 | <span id="kernel_persist"> |
|
189 | 189 | <input type="checkbox" id="kill_kernel"></input> |
|
190 | 190 | </span> |
|
191 | 191 | <span class="checkbox_label">Kill kernel upon exit:</span> |
|
192 | 192 | </div> |
|
193 | 193 | </div> |
|
194 | 194 | </div> |
|
195 | 195 | |
|
196 | 196 | <div id="help_section"> |
|
197 | 197 | <h3 class="section_header">Help</h3> |
|
198 | 198 | <div class="section_content"> |
|
199 | 199 | <div class="section_row"> |
|
200 | 200 | <span id="help_buttons0" class="section_row_buttons"> |
|
201 | 201 | <a id="python_help" href="http://docs.python.org" target="_blank">Python</a> |
|
202 | 202 | <a id="ipython_help" href="http://ipython.org/documentation.html" target="_blank">IPython</a> |
|
203 | 203 | </span> |
|
204 | 204 | <span class="section_row_header">Links</span> |
|
205 | 205 | </div> |
|
206 | 206 | <div class="section_row"> |
|
207 | 207 | <span id="help_buttons1" class="section_row_buttons"> |
|
208 | 208 | <a id="numpy_help" href="http://docs.scipy.org/doc/numpy/reference/" target="_blank">NumPy</a> |
|
209 | 209 | <a id="scipy_help" href="http://docs.scipy.org/doc/scipy/reference/" target="_blank">SciPy</a> |
|
210 | 210 | </span> |
|
211 | 211 | </div> |
|
212 | 212 | <div class="section_row"> |
|
213 | 213 | <span id="help_buttons2" class="section_row_buttons"> |
|
214 | 214 | <a id="matplotlib_help" href="http://matplotlib.sourceforge.net/" target="_blank">MPL</a> |
|
215 | 215 | <a id="sympy_help" href="http://docs.sympy.org/dev/index.html" target="_blank">SymPy</a> |
|
216 | 216 | </span> |
|
217 | 217 | </div> |
|
218 | 218 | <div class="section_row"> |
|
219 | 219 | <span class="help_string">run selected cell</span> |
|
220 | 220 | <span class="help_string_label">Shift-Enter :</span> |
|
221 | 221 | </div> |
|
222 | 222 | <div class="section_row"> |
|
223 | 223 | <span class="help_string">run selected cell in-place</span> |
|
224 | 224 | <span class="help_string_label">Ctrl-Enter :</span> |
|
225 | 225 | </div> |
|
226 | 226 | <div class="section_row"> |
|
227 | 227 | <span class="help_string">show keyboard shortcuts</span> |
|
228 | 228 | <span class="help_string_label">Ctrl-m h :</span> |
|
229 | 229 | </div> |
|
230 | 230 | </div> |
|
231 | 231 | </div> |
|
232 | 232 | |
|
233 | 233 | </div> |
|
234 | 234 | <div id="left_panel_splitter"></div> |
|
235 | 235 | <div id="notebook_panel"> |
|
236 | 236 | <div id="notebook"></div> |
|
237 | 237 | <div id="pager_splitter"></div> |
|
238 | 238 | <div id="pager"></div> |
|
239 | 239 | </div> |
|
240 | 240 | |
|
241 | 241 | </div> |
|
242 | 242 | |
|
243 | 243 | <script src="static/jquery/js/jquery-1.6.2.min.js" type="text/javascript" charset="utf-8"></script> |
|
244 | 244 | <script src="static/jquery/js/jquery-ui-1.8.14.custom.min.js" type="text/javascript" charset="utf-8"></script> |
|
245 | 245 | <script src="static/jquery/js/jquery.autogrow.js" type="text/javascript" charset="utf-8"></script> |
|
246 | 246 | |
|
247 | 247 | <script src="static/codemirror/lib/codemirror.js" charset="utf-8"></script> |
|
248 | 248 | <script src="static/codemirror/mode/python/python.js" charset="utf-8"></script> |
|
249 | 249 | <script src="static/codemirror/mode/htmlmixed/htmlmixed.js" charset="utf-8"></script> |
|
250 | 250 | <script src="static/codemirror/mode/xml/xml.js" charset="utf-8"></script> |
|
251 | 251 | <script src="static/codemirror/mode/javascript/javascript.js" charset="utf-8"></script> |
|
252 | 252 | <script src="static/codemirror/mode/css/css.js" charset="utf-8"></script> |
|
253 | 253 | <script src="static/codemirror/mode/rst/rst.js" charset="utf-8"></script> |
|
254 | 254 | <script src="static/codemirror/mode/markdown/markdown.js" charset="utf-8"></script> |
|
255 | 255 | |
|
256 | 256 | <script src="static/pagedown/Markdown.Converter.js" charset="utf-8"></script> |
|
257 | 257 | |
|
258 | 258 | <script src="static/prettify/prettify.js" charset="utf-8"></script> |
|
259 | 259 | |
|
260 | 260 | <script src="static/js/namespace.js" type="text/javascript" charset="utf-8"></script> |
|
261 | 261 | <script src="static/js/utils.js" type="text/javascript" charset="utf-8"></script> |
|
262 | 262 | <script src="static/js/cell.js" type="text/javascript" charset="utf-8"></script> |
|
263 | 263 | <script src="static/js/codecell.js" type="text/javascript" charset="utf-8"></script> |
|
264 | 264 | <script src="static/js/textcell.js" type="text/javascript" charset="utf-8"></script> |
|
265 | 265 | <script src="static/js/kernel.js" type="text/javascript" charset="utf-8"></script> |
|
266 | 266 | <script src="static/js/kernelstatus.js" type="text/javascript" charset="utf-8"></script> |
|
267 | 267 | <script src="static/js/layout.js" type="text/javascript" charset="utf-8"></script> |
|
268 | 268 | <script src="static/js/savewidget.js" type="text/javascript" charset="utf-8"></script> |
|
269 |
<script src="static/js/ |
|
|
269 | <script src="static/js/quickhelp.js" type="text/javascript" charset="utf-8"></script> | |
|
270 | 270 | <script src="static/js/pager.js" type="text/javascript" charset="utf-8"></script> |
|
271 | 271 | <script src="static/js/panelsection.js" type="text/javascript" charset="utf-8"></script> |
|
272 | 272 | <script src="static/js/printwidget.js" type="text/javascript" charset="utf-8"></script> |
|
273 | 273 | <script src="static/js/leftpanel.js" type="text/javascript" charset="utf-8"></script> |
|
274 | 274 | <script src="static/js/notebook.js" type="text/javascript" charset="utf-8"></script> |
|
275 | 275 | <script src="static/js/notebook_main.js" type="text/javascript" charset="utf-8"></script> |
|
276 | 276 | |
|
277 | 277 | |
|
278 | 278 | </body> |
|
279 | 279 | |
|
280 | 280 | </html> |
General Comments 0
You need to be logged in to leave comments.
Login now