diff --git a/IPython/html/static/notebook/js/kernelselector.js b/IPython/html/static/notebook/js/kernelselector.js index 908c25e..35402d4 100644 --- a/IPython/html/static/notebook/js/kernelselector.js +++ b/IPython/html/static/notebook/js/kernelselector.js @@ -29,6 +29,8 @@ define([ KernelSelector.prototype.got_kernelspecs = function(data, status, xhr) { this.kernelspecs = {}; var menu = this.element.find("#kernel_selector"); + var change_kernel_submenu = $("#menu-change-kernel-submenu"); + console.log(change_kernel_submenu); for (var i = 0; i < data.length; i++) { var ks = data[i]; this.kernelspecs[ks.name] = ks; @@ -37,6 +39,12 @@ define([ .click($.proxy(this.change_kernel, this, ks.name)) .text(ks.display_name)); menu.append(ksentry); + + var ks_submenu_entry = $("
  • ").attr("id", "kernel-submenu-"+ks.name).append($('') + .attr('href', '#') + .click($.proxy(this.change_kernel, this, ks.name)) + .text(ks.display_name)); + change_kernel_submenu.append(ks_submenu_entry); } }; diff --git a/IPython/html/templates/notebook.html b/IPython/html/templates/notebook.html index 1f759d7..68bb46c 100644 --- a/IPython/html/templates/notebook.html +++ b/IPython/html/templates/notebook.html @@ -226,6 +226,11 @@ class="notebook_app"
  • Restart
  • +
  • +