From 7714f3d058e011c25e04a824433a7f3e5bc65c5c Mon Sep 17 00:00:00 2001 From: "Brian E. Granger" Date: Mon, 21 Jan 2013 16:48:22 -0800 Subject: [PATCH] Removing IPython.notebook references from tooltip.js --- .../frontend/html/notebook/static/js/tooltip.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/IPython/frontend/html/notebook/static/js/tooltip.js b/IPython/frontend/html/notebook/static/js/tooltip.js index 20606289e..61da9342c 100644 --- a/IPython/frontend/html/notebook/static/js/tooltip.js +++ b/IPython/frontend/html/notebook/static/js/tooltip.js @@ -126,7 +126,7 @@ var IPython = (function (IPython) { // reexecute last call in pager by appending ? to show back in pager var that = this; var empty = function () {}; - IPython.notebook.kernel.execute( + cell.kernel.execute( that.name + '?', { 'execute_reply': empty, 'output': empty, @@ -212,7 +212,7 @@ var IPython = (function (IPython) { var callbacks = { 'object_info_reply': $.proxy(this._show, this) } - var msg_id = IPython.notebook.kernel.object_info_request(re.exec(func), callbacks); + var msg_id = cell.kernel.object_info_request(re.exec(func), callbacks); } // make an imediate completion request @@ -360,11 +360,12 @@ var IPython = (function (IPython) { // convenient funciton to have the correct code_mirror back into focus Tooltip.prototype._cmfocus = function () { var cm = this.code_mirror; - if (cm == IPython.notebook.get_selected_cell()) - { - setTimeout(function () { - cm.focus(); - }, 50); + if (IPython.notebook !== undefined) { + if (cm == IPython.notebook.get_selected_cell()) { + setTimeout(function () { + cm.focus(); + }, 50); + } } }