mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-30 12:11:32 +08:00
Clean up accidentally introduced hard tabs in JS code.
This commit is contained in:
parent
83790b7e29
commit
1a109765b8
@ -342,4 +342,4 @@ div.text_cell_render {
|
||||
}
|
||||
|
||||
.shortcut_descr {
|
||||
}
|
||||
}
|
||||
|
@ -88,11 +88,11 @@ var IPython = (function (IPython) {
|
||||
return false;
|
||||
};
|
||||
} else if (event.keyCode === 76 && event.ctrlKey && event.shiftKey
|
||||
&& event.type == 'keydown') {
|
||||
&& event.type == 'keydown') {
|
||||
// toggle line numbers with Ctrl-Shift-L
|
||||
this.toggle_line_numbers()
|
||||
this.toggle_line_numbers();
|
||||
}
|
||||
else {
|
||||
else {
|
||||
// keypress/keyup also trigger on TAB press, and we don't want to
|
||||
// use those to disable tab completion.
|
||||
if (this.is_completing && event.keyCode !== 9) {
|
||||
@ -184,12 +184,12 @@ var IPython = (function (IPython) {
|
||||
};
|
||||
|
||||
CodeCell.prototype.toggle_line_numbers = function () {
|
||||
if (this.code_mirror.getOption('lineNumbers') == false) {
|
||||
this.code_mirror.setOption('lineNumbers', true);
|
||||
} else {
|
||||
this.code_mirror.setOption('lineNumbers', false);
|
||||
}
|
||||
this.code_mirror.refresh()
|
||||
if (this.code_mirror.getOption('lineNumbers') == false) {
|
||||
this.code_mirror.setOption('lineNumbers', true);
|
||||
} else {
|
||||
this.code_mirror.setOption('lineNumbers', false);
|
||||
}
|
||||
this.code_mirror.refresh()
|
||||
};
|
||||
|
||||
CodeCell.prototype.select = function () {
|
||||
|
@ -16,14 +16,14 @@ var IPython = (function (IPython) {
|
||||
if (this.selector !== undefined) {
|
||||
this.element = $(selector);
|
||||
this.content = this.element.find('div.header');
|
||||
this.style();
|
||||
this.style();
|
||||
this.bind_events();
|
||||
}
|
||||
};
|
||||
|
||||
HeaderSection.prototype.style = function () {
|
||||
this.content.addClass('ui-helper-clearfix');
|
||||
this.content.find('#quick_help').button();
|
||||
this.content.addClass('ui-helper-clearfix');
|
||||
this.content.find('#quick_help').button();
|
||||
};
|
||||
|
||||
HeaderSection.prototype.bind_events = function () {
|
||||
|
@ -147,7 +147,7 @@ var IPython = (function (IPython) {
|
||||
return false;
|
||||
} else if (event.which === 190 && that.control_key_active) {
|
||||
// Restart kernel = . # matches qt console
|
||||
IPython.notebook.restart_kernel();
|
||||
IPython.notebook.restart_kernel();
|
||||
that.control_key_active = false;
|
||||
return false;
|
||||
} else if (that.control_key_active) {
|
||||
@ -213,8 +213,8 @@ var IPython = (function (IPython) {
|
||||
{key: 'Ctrl-m m', help: 'markdown cell'},
|
||||
{key: 'Ctrl-m p', help: 'select previous'},
|
||||
{key: 'Ctrl-m n', help: 'select next'},
|
||||
{key: 'Ctrl-m i', help: 'interrupt kernel'},
|
||||
{key: 'Ctrl-m .', help: 'restart kernel'},
|
||||
{key: 'Ctrl-m i', help: 'interrupt kernel'},
|
||||
{key: 'Ctrl-m .', help: 'restart kernel'},
|
||||
{key: 'Ctrl-m h', help: 'show keyboard shortcuts'}
|
||||
];
|
||||
for (var i=0; i<shortcuts.length; i++) {
|
||||
@ -623,7 +623,7 @@ var IPython = (function (IPython) {
|
||||
// Other cell functions: line numbers, ...
|
||||
|
||||
Notebook.prototype.cell_toggle_line_numbers = function() {
|
||||
this.selected_cell().toggle_line_numbers()
|
||||
this.selected_cell().toggle_line_numbers()
|
||||
};
|
||||
|
||||
// Kernel related things
|
||||
@ -636,7 +636,7 @@ var IPython = (function (IPython) {
|
||||
|
||||
|
||||
Notebook.prototype.restart_kernel = function () {
|
||||
var that = this;
|
||||
var that = this;
|
||||
var notebook_id = IPython.save_widget.get_notebook_id();
|
||||
|
||||
var dialog = $('<div/>');
|
||||
@ -648,7 +648,7 @@ var IPython = (function (IPython) {
|
||||
title: "Restart kernel or continue running?",
|
||||
buttons : {
|
||||
"Restart": function () {
|
||||
that.kernel.restart($.proxy(that.kernel_started, that));
|
||||
that.kernel.restart($.proxy(that.kernel_started, that));
|
||||
$(this).dialog('close');
|
||||
},
|
||||
"Continue running": function () {
|
||||
|
@ -65,7 +65,7 @@
|
||||
<div id="MathJaxFetchingWarning"
|
||||
style="width:80%; margin:auto;padding-top:20%;text-align: justify; display:none">
|
||||
<p style="font-size:26px;">There was an issue trying to fetch MathJax.js
|
||||
from the internet.</p>
|
||||
from the internet.</p>
|
||||
|
||||
<p style="padding:0.2em"> With a working internet connection, you can run
|
||||
the following at a Python or IPython prompt, which will install a local
|
||||
@ -278,5 +278,3 @@
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user