Show More
@@ -342,4 +342,4 b' div.text_cell_render {' | |||||
342 | } |
|
342 | } | |
343 |
|
343 | |||
344 | .shortcut_descr { |
|
344 | .shortcut_descr { | |
345 | } No newline at end of file |
|
345 | } |
@@ -88,11 +88,11 b' var IPython = (function (IPython) {' | |||||
88 | return false; |
|
88 | return false; | |
89 | }; |
|
89 | }; | |
90 | } else if (event.keyCode === 76 && event.ctrlKey && event.shiftKey |
|
90 | } else if (event.keyCode === 76 && event.ctrlKey && event.shiftKey | |
91 |
|
|
91 | && event.type == 'keydown') { | |
92 | // toggle line numbers with Ctrl-Shift-L |
|
92 | // toggle line numbers with Ctrl-Shift-L | |
93 |
|
|
93 | this.toggle_line_numbers(); | |
94 | } |
|
94 | } | |
95 | else { |
|
95 | else { | |
96 | // keypress/keyup also trigger on TAB press, and we don't want to |
|
96 | // keypress/keyup also trigger on TAB press, and we don't want to | |
97 | // use those to disable tab completion. |
|
97 | // use those to disable tab completion. | |
98 | if (this.is_completing && event.keyCode !== 9) { |
|
98 | if (this.is_completing && event.keyCode !== 9) { | |
@@ -184,12 +184,12 b' var IPython = (function (IPython) {' | |||||
184 | }; |
|
184 | }; | |
185 |
|
185 | |||
186 | CodeCell.prototype.toggle_line_numbers = function () { |
|
186 | CodeCell.prototype.toggle_line_numbers = function () { | |
187 |
|
|
187 | if (this.code_mirror.getOption('lineNumbers') == false) { | |
188 |
|
|
188 | this.code_mirror.setOption('lineNumbers', true); | |
189 |
|
|
189 | } else { | |
190 |
|
|
190 | this.code_mirror.setOption('lineNumbers', false); | |
191 | } |
|
191 | } | |
192 |
|
|
192 | this.code_mirror.refresh() | |
193 | }; |
|
193 | }; | |
194 |
|
194 | |||
195 | CodeCell.prototype.select = function () { |
|
195 | CodeCell.prototype.select = function () { |
@@ -16,14 +16,14 b' var IPython = (function (IPython) {' | |||||
16 | if (this.selector !== undefined) { |
|
16 | if (this.selector !== undefined) { | |
17 | this.element = $(selector); |
|
17 | this.element = $(selector); | |
18 | this.content = this.element.find('div.header'); |
|
18 | this.content = this.element.find('div.header'); | |
19 |
|
|
19 | this.style(); | |
20 | this.bind_events(); |
|
20 | this.bind_events(); | |
21 | } |
|
21 | } | |
22 | }; |
|
22 | }; | |
23 |
|
23 | |||
24 | HeaderSection.prototype.style = function () { |
|
24 | HeaderSection.prototype.style = function () { | |
25 |
|
|
25 | this.content.addClass('ui-helper-clearfix'); | |
26 |
|
|
26 | this.content.find('#quick_help').button(); | |
27 | }; |
|
27 | }; | |
28 |
|
28 | |||
29 | HeaderSection.prototype.bind_events = function () { |
|
29 | HeaderSection.prototype.bind_events = function () { |
@@ -147,7 +147,7 b' var IPython = (function (IPython) {' | |||||
147 | return false; |
|
147 | return false; | |
148 | } else if (event.which === 190 && that.control_key_active) { |
|
148 | } else if (event.which === 190 && that.control_key_active) { | |
149 | // Restart kernel = . # matches qt console |
|
149 | // Restart kernel = . # matches qt console | |
150 |
|
|
150 | IPython.notebook.restart_kernel(); | |
151 | that.control_key_active = false; |
|
151 | that.control_key_active = false; | |
152 | return false; |
|
152 | return false; | |
153 | } else if (that.control_key_active) { |
|
153 | } else if (that.control_key_active) { | |
@@ -213,8 +213,8 b' var IPython = (function (IPython) {' | |||||
213 | {key: 'Ctrl-m m', help: 'markdown cell'}, |
|
213 | {key: 'Ctrl-m m', help: 'markdown cell'}, | |
214 | {key: 'Ctrl-m p', help: 'select previous'}, |
|
214 | {key: 'Ctrl-m p', help: 'select previous'}, | |
215 | {key: 'Ctrl-m n', help: 'select next'}, |
|
215 | {key: 'Ctrl-m n', help: 'select next'}, | |
216 |
|
|
216 | {key: 'Ctrl-m i', help: 'interrupt kernel'}, | |
217 |
|
|
217 | {key: 'Ctrl-m .', help: 'restart kernel'}, | |
218 | {key: 'Ctrl-m h', help: 'show keyboard shortcuts'} |
|
218 | {key: 'Ctrl-m h', help: 'show keyboard shortcuts'} | |
219 | ]; |
|
219 | ]; | |
220 | for (var i=0; i<shortcuts.length; i++) { |
|
220 | for (var i=0; i<shortcuts.length; i++) { | |
@@ -623,7 +623,7 b' var IPython = (function (IPython) {' | |||||
623 | // Other cell functions: line numbers, ... |
|
623 | // Other cell functions: line numbers, ... | |
624 |
|
624 | |||
625 | Notebook.prototype.cell_toggle_line_numbers = function() { |
|
625 | Notebook.prototype.cell_toggle_line_numbers = function() { | |
626 |
|
|
626 | this.selected_cell().toggle_line_numbers() | |
627 | }; |
|
627 | }; | |
628 |
|
628 | |||
629 | // Kernel related things |
|
629 | // Kernel related things | |
@@ -636,7 +636,7 b' var IPython = (function (IPython) {' | |||||
636 |
|
636 | |||
637 |
|
637 | |||
638 | Notebook.prototype.restart_kernel = function () { |
|
638 | Notebook.prototype.restart_kernel = function () { | |
639 |
|
|
639 | var that = this; | |
640 | var notebook_id = IPython.save_widget.get_notebook_id(); |
|
640 | var notebook_id = IPython.save_widget.get_notebook_id(); | |
641 |
|
641 | |||
642 | var dialog = $('<div/>'); |
|
642 | var dialog = $('<div/>'); | |
@@ -648,7 +648,7 b' var IPython = (function (IPython) {' | |||||
648 | title: "Restart kernel or continue running?", |
|
648 | title: "Restart kernel or continue running?", | |
649 | buttons : { |
|
649 | buttons : { | |
650 | "Restart": function () { |
|
650 | "Restart": function () { | |
651 |
|
|
651 | that.kernel.restart($.proxy(that.kernel_started, that)); | |
652 | $(this).dialog('close'); |
|
652 | $(this).dialog('close'); | |
653 | }, |
|
653 | }, | |
654 | "Continue running": function () { |
|
654 | "Continue running": function () { |
@@ -65,7 +65,7 b'' | |||||
65 | <div id="MathJaxFetchingWarning" |
|
65 | <div id="MathJaxFetchingWarning" | |
66 | style="width:80%; margin:auto;padding-top:20%;text-align: justify; display:none"> |
|
66 | style="width:80%; margin:auto;padding-top:20%;text-align: justify; display:none"> | |
67 | <p style="font-size:26px;">There was an issue trying to fetch MathJax.js |
|
67 | <p style="font-size:26px;">There was an issue trying to fetch MathJax.js | |
68 |
|
|
68 | from the internet.</p> | |
69 |
|
69 | |||
70 | <p style="padding:0.2em"> With a working internet connection, you can run |
|
70 | <p style="padding:0.2em"> With a working internet connection, you can run | |
71 | the following at a Python or IPython prompt, which will install a local |
|
71 | the following at a Python or IPython prompt, which will install a local | |
@@ -278,5 +278,3 b'' | |||||
278 | </body> |
|
278 | </body> | |
279 |
|
279 | |||
280 | </html> |
|
280 | </html> | |
281 |
|
||||
282 |
|
General Comments 0
You need to be logged in to leave comments.
Login now