From f4bfcadf32a0b38fade4340f5164ae489e6d07d9 Mon Sep 17 00:00:00 2001 From: "Brian E. Granger" Date: Sat, 7 Dec 2013 22:50:13 -0800 Subject: [PATCH] Adding back Kernel menu and Cell Type submenu. --- IPython/html/static/notebook/js/menubar.js | 34 ++++++++++++++++++++++ IPython/html/templates/notebook.html | 32 ++++++++++++++++++++ 2 files changed, 66 insertions(+) diff --git a/IPython/html/static/notebook/js/menubar.js b/IPython/html/static/notebook/js/menubar.js index befe83179..eecbf5645 100644 --- a/IPython/html/static/notebook/js/menubar.js +++ b/IPython/html/static/notebook/js/menubar.js @@ -219,6 +219,33 @@ var IPython = (function (IPython) { this.element.find('#run_all_cells_below').click(function () { IPython.notebook.execute_cells_below(); }); + this.element.find('#to_code').click(function () { + IPython.notebook.to_code(); + }); + this.element.find('#to_markdown').click(function () { + IPython.notebook.to_markdown(); + }); + this.element.find('#to_raw').click(function () { + IPython.notebook.to_raw(); + }); + this.element.find('#to_heading1').click(function () { + IPython.notebook.to_heading(undefined, 1); + }); + this.element.find('#to_heading2').click(function () { + IPython.notebook.to_heading(undefined, 2); + }); + this.element.find('#to_heading3').click(function () { + IPython.notebook.to_heading(undefined, 3); + }); + this.element.find('#to_heading4').click(function () { + IPython.notebook.to_heading(undefined, 4); + }); + this.element.find('#to_heading5').click(function () { + IPython.notebook.to_heading(undefined, 5); + }); + this.element.find('#to_heading6').click(function () { + IPython.notebook.to_heading(undefined, 6); + }); this.element.find('#collapse_current_output').click(function () { IPython.notebook.collapse_output(); }); @@ -243,6 +270,13 @@ var IPython = (function (IPython) { this.element.find('#clear_all_output').click(function () { IPython.notebook.clear_all_output(); }); + // Kernel + this.element.find('#int_kernel').click(function () { + IPython.notebook.session.interrupt_kernel(); + }); + this.element.find('#restart_kernel').click(function () { + IPython.notebook.restart_kernel(); + }); // Help this.element.find('#keyboard_shortcuts').click(function () { IPython.quick_help.show_keyboard_shortcuts(); diff --git a/IPython/html/templates/notebook.html b/IPython/html/templates/notebook.html index 9abfe0cea..eb72cabe3 100644 --- a/IPython/html/templates/notebook.html +++ b/IPython/html/templates/notebook.html @@ -148,6 +148,28 @@ class="notebook_app"
  • Run All Below
  • + +
  • +