From f8ef2ae087d0ac5010d02c4ebe24462b735a7df6 Mon Sep 17 00:00:00 2001 From: Paul Schmermund Date: Sat, 5 Apr 2014 08:35:34 -0600 Subject: [PATCH] Add three buttons for future use in new features. A cell of two buttons and a cell of one button were added for the upcoming pause feature and 2 other features. --- .../html/static/notebook/js/maintoolbar.js | 30 +++++++++++++++++++ IPython/html/static/notebook/js/notebook.js | 28 +++++++++++++++-- 2 files changed, 56 insertions(+), 2 deletions(-) diff --git a/IPython/html/static/notebook/js/maintoolbar.js b/IPython/html/static/notebook/js/maintoolbar.js index 462195800..13cce0074 100644 --- a/IPython/html/static/notebook/js/maintoolbar.js +++ b/IPython/html/static/notebook/js/maintoolbar.js @@ -131,6 +131,36 @@ var IPython = (function (IPython) { } } ],'turtle_power'); + + this.add_buttons_group([ + { + id : 'cowabunga', + label : 'Pause Turtle', + icon : 'icon-bug', + callback : function () { + turtle_pause(); + } + } + ],'cowabunga'); + + this.add_buttons_group([ + { + id : 'radical_dude', + label : 'Andrew Button 1', + icon : 'icon-bug', + callback : function () { + ak_button1(); + } + }, + { + id : 'pizza', + label : 'Andrew Button 2', + icon : 'icon-anchor', + callback : function () { + ak_button2(); + } + } + ],'Donatello'); }; MainToolBar.prototype.add_celltype_list = function () { diff --git a/IPython/html/static/notebook/js/notebook.js b/IPython/html/static/notebook/js/notebook.js index 4e79fe8d8..854f589c6 100644 --- a/IPython/html/static/notebook/js/notebook.js +++ b/IPython/html/static/notebook/js/notebook.js @@ -1407,9 +1407,9 @@ var IPython = (function (IPython) { }; /** - * Execute or render cell outputs and go into command mode. + *. + * * - * @method execute_cell */ Notebook.prototype.execute_cell = function () { //clear turtle timeout @@ -1433,6 +1433,30 @@ var IPython = (function (IPython) { Notebook.prototype.turtle_help = function () { window.open('/static/notebook/js/helppage.html'); } + + /** + * Claudine's requested button + * + * + */ + Notebook.prototype.turtle_pause = function(){ + } + + /** + * Andrew's requested button #1 + * + * + */ + Notebook.prototype.ak1_button = function(){ + } + + /** + * Andrews's requested button #2 + * + * + */ + Notebook.prototype.ak2_button = function(){ + } /** * Execute or render cell outputs and insert a new cell below.