From aa24495b5bf4cdf81f786ae3c357bf5b06157257 Mon Sep 17 00:00:00 2001 From: Matthias BUSSONNIER Date: Mon, 21 Nov 2011 10:09:51 +0100 Subject: [PATCH] add 'more...' and 'close' button to the pager 'more...' button execute 'foo?' **On the behalf of the current cell** which increase it's prompt number to the curent value, and give focus back --- .../html/notebook/static/js/codecell.js | 25 +++++++++++++++++-- .../html/notebook/static/js/notebook.js | 2 +- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/IPython/frontend/html/notebook/static/js/codecell.js b/IPython/frontend/html/notebook/static/js/codecell.js index cfd497301..38ed22dd3 100644 --- a/IPython/frontend/html/notebook/static/js/codecell.js +++ b/IPython/frontend/html/notebook/static/js/codecell.js @@ -153,7 +153,10 @@ var IPython = (function (IPython) { $('#tooltip').remove(); } - CodeCell.prototype.finish_tooltip = function (defstring,docstring) { + CodeCell.prototype.finish_tooltip = function (reply) { + defstring=reply.definition; + docstring=reply.docstring; + name=reply.name; shortened = function(string){ if(string.length > 200){ return string.trim().substring(0,197)+'...'; @@ -166,7 +169,25 @@ var IPython = (function (IPython) { defstring_html= $('
').html(utils.fixConsole(defstring));
             tooltip.append(defstring_html);
         }
-        tooltip.append($('
').html(utils.fixConsole(shortened(docstring))));
+        var pre=$('
').html(utils.fixConsole(shortened(docstring)));
+        var more=$('