##// END OF EJS Templates
Add submenu under kernel for changing kernel
Thomas Kluyver -
Show More
@@ -29,6 +29,8 b' define(['
29 29 KernelSelector.prototype.got_kernelspecs = function(data, status, xhr) {
30 30 this.kernelspecs = {};
31 31 var menu = this.element.find("#kernel_selector");
32 var change_kernel_submenu = $("#menu-change-kernel-submenu");
33 console.log(change_kernel_submenu);
32 34 for (var i = 0; i < data.length; i++) {
33 35 var ks = data[i];
34 36 this.kernelspecs[ks.name] = ks;
@@ -37,6 +39,12 b' define(['
37 39 .click($.proxy(this.change_kernel, this, ks.name))
38 40 .text(ks.display_name));
39 41 menu.append(ksentry);
42
43 var ks_submenu_entry = $("<li>").attr("id", "kernel-submenu-"+ks.name).append($('<a>')
44 .attr('href', '#')
45 .click($.proxy(this.change_kernel, this, ks.name))
46 .text(ks.display_name));
47 change_kernel_submenu.append(ks_submenu_entry);
40 48 }
41 49 };
42 50
@@ -226,6 +226,11 b' class="notebook_app"'
226 226 <li id="restart_kernel"
227 227 title="Restart the Kernel">
228 228 <a href="#">Restart</a></li>
229 <li class="divider"></li>
230 <li id="menu-change-kernel" class="dropdown-submenu">
231 <a href="#">Change kernel</a>
232 <ul class="dropdown-menu" id="menu-change-kernel-submenu"></ul>
233 </li>
229 234 </ul>
230 235 </li>
231 236 <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">Help</a>
General Comments 0
You need to be logged in to leave comments. Login now