From 703ba851b3e7e368725a6b832bcb3ba3b13614b8 2012-01-27 21:54:37 From: Brian Granger Date: 2012-01-27 21:54:37 Subject: [PATCH] Wired the rest of the toolbar buttons up to actions. --- diff --git a/IPython/frontend/html/notebook/static/js/toolbar.js b/IPython/frontend/html/notebook/static/js/toolbar.js index 7db0b43..501f00a 100644 --- a/IPython/frontend/html/notebook/static/js/toolbar.js +++ b/IPython/frontend/html/notebook/static/js/toolbar.js @@ -72,6 +72,36 @@ var IPython = (function (IPython) { ToolBar.prototype.bind_events = function () { + this.element.find('#save_b').click(function () { + IPython.save_widget.save_notebook(); + }); + this.element.find('#cut_b').click(function () { + IPython.notebook.cut_cell(); + }); + this.element.find('#copy_b').click(function () { + IPython.notebook.copy_cell(); + }); + this.element.find('#paste_b').click(function () { + IPython.notebook.paste_cell(); + }); + this.element.find('#move_up_b').click(function () { + IPython.notebook.move_cell_up(); + }); + this.element.find('#move_down_b').click(function () { + IPython.notebook.move_cell_down(); + }); + this.element.find('#insert_above_b').click(function () { + IPython.notebook.insert_cell_above('code'); + }); + this.element.find('#insert_below_b').click(function () { + IPython.notebook.insert_cell_below('code'); + }); + this.element.find('#run_b').click(function () { + IPython.notebook.execute_selected_cell(); + }); + this.element.find('#interrupt_b').click(function () { + IPython.notebook.kernel.interrupt(); + }); this.element.find('#cell_type').change(function () { var cell_type = $(this).val(); if (cell_type === 'code') {