From ae1b06fd92132ca319dee6265cbe597dc2cecfca 2012-05-31 20:08:27 From: Matthias BUSSONNIER Date: 2012-05-31 20:08:27 Subject: [PATCH] space before function keyword in js --- diff --git a/IPython/frontend/html/notebook/static/js/completer.js b/IPython/frontend/html/notebook/static/js/completer.js index f8ee122..bffb787 100644 --- a/IPython/frontend/html/notebook/static/js/completer.js +++ b/IPython/frontend/html/notebook/static/js/completer.js @@ -1,7 +1,7 @@ // function completer. // // completer should be a class that take an cell instance -var IPython = (function(IPython) { +var IPython = (function (IPython) { // that will prevent us from misspelling "use strict"; @@ -42,13 +42,13 @@ var IPython = (function(IPython) { } - var Completer = function(cell) { + var Completer = function (cell) { this.editor = cell.code_mirror; var that = this; - $([IPython.events]).on('status_busy.Kernel', function() { + $([IPython.events]).on('status_busy.Kernel', function () { that.skip_kernel_completion = true; }); - $([IPython.events]).on('status_idle.Kernel', function() { + $([IPython.events]).on('status_idle.Kernel', function () { that.skip_kernel_completion = false; }); @@ -57,7 +57,7 @@ var IPython = (function(IPython) { - Completer.prototype.startCompletion = function() { + Completer.prototype.startCompletion = function () { // call for a 'first' completion, that will set the editor and do some // special behaviour like autopicking if only one completion availlable // @@ -67,7 +67,7 @@ var IPython = (function(IPython) { this.carryOnCompletion(true); }; - Completer.prototype.carryOnCompletion = function(ff) { + Completer.prototype.carryOnCompletion = function (ff) { // Pass true as parameter if you want the commpleter to autopick when // only one completion. This function is automatically reinvoked at // each keystroke with ff = false @@ -108,7 +108,7 @@ var IPython = (function(IPython) { } }; - Completer.prototype.finish_completing = function(content) { + Completer.prototype.finish_completing = function (content) { // let's build a function that wrap all that stuff into what is needed // for the new completer: var matched_text = content.matched_text; @@ -176,11 +176,11 @@ var IPython = (function(IPython) { $('body').append(this.complete); //build the container var that = this; - this.sel.dblclick(function() { + this.sel.dblclick(function () { that.pick(); }); this.sel.blur(this.close); - this.sel.keydown(function(event) { + this.sel.keydown(function (event) { that.keydown(event); }); @@ -188,17 +188,17 @@ var IPython = (function(IPython) { this.sel.focus(); // Opera sometimes ignores focusing a freshly created node - if (window.opera) setTimeout(function() { + if (window.opera) setTimeout(function () { if (!this.done) this.sel.focus(); }, 100); return true; } - Completer.prototype.insert = function(completion) { + Completer.prototype.insert = function (completion) { this.editor.replaceRange(completion.str, completion.from, completion.to); } - Completer.prototype.build_gui_list = function(completions) { + Completer.prototype.build_gui_list = function (completions) { // Need to clear the all list for (var i = 0; i < completions.length; ++i) { var opt = $('