From 7d069cd792e87cfb25b4aab68beaee059383a47e Mon Sep 17 00:00:00 2001 From: Matthias BUSSONNIER Date: Thu, 10 May 2012 10:42:29 +0200 Subject: [PATCH] Notification + tooltip demo Use notification to quicky remind use of the tooltip Use javascript in notebook to make a live demo in 01_notebook_introduction tooltip docstring is remplaceid for the first use by a live tutorial --- .../frontend/html/notebook/static/js/tooltip.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/IPython/frontend/html/notebook/static/js/tooltip.js b/IPython/frontend/html/notebook/static/js/tooltip.js index bb2853296..20f49dc22 100644 --- a/IPython/frontend/html/notebook/static/js/tooltip.js +++ b/IPython/frontend/html/notebook/static/js/tooltip.js @@ -123,9 +123,18 @@ var IPython = (function (IPython) { this.tooltip.append(this.text); // function that will be called if you press tab 1, 2, 3... times in a row - this.tabs_functions = [ function(cell,text){that._request_tooltip(cell,text)}, - function(){that.expand()}, - function(){that.stick()}, + this.tabs_functions = [ function(cell,text){ + that._request_tooltip(cell,text); + IPython.notification_widget.set_message('tab again to expand pager',2500); + }, + function(){ + that.expand(); + IPython.notification_widget.set_message('tab again to make pager sticky for 10s',2500); + }, + function(){ + that.stick(); + IPython.notification_widget.set_message('tab again to open help in pager',2500); + }, function(cell){ that.cancel_stick(); that.showInPager(cell);