mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-27 04:20:22 +08:00
Adding back Kernel menu and Cell Type submenu.
This commit is contained in:
parent
afb114e6d3
commit
f4bfcadf32
@ -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();
|
||||
|
@ -148,6 +148,28 @@ class="notebook_app"
|
||||
<li id="run_all_cells_below" title="Run this cell and all cells below it">
|
||||
<a href="#">Run All Below</a></li>
|
||||
<li class="divider"></li>
|
||||
<li id="change_cell_type" class="dropdown-submenu"
|
||||
title="All cells in the notebook have a cell type. By default, new cells are created as 'Code' cells">
|
||||
<a href="#">Cell Type</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li id="to_code"
|
||||
title="Contents will be sent to the kernel for execution, and output will display in the footer of cell">
|
||||
<a href="#">Code</a></li>
|
||||
<li id="to_markdown"
|
||||
title="Contents will be rendered as HTML and serve as explanatory text">
|
||||
<a href="#">Markdown</a></li>
|
||||
<li id="to_raw"
|
||||
title="Contents will pass through nbconvert unmodified">
|
||||
<a href="#">Raw NBConvert</a></li>
|
||||
<li id="to_heading1"><a href="#">Heading 1</a></li>
|
||||
<li id="to_heading2"><a href="#">Heading 2</a></li>
|
||||
<li id="to_heading3"><a href="#">Heading 3</a></li>
|
||||
<li id="to_heading4"><a href="#">Heading 4</a></li>
|
||||
<li id="to_heading5"><a href="#">Heading 5</a></li>
|
||||
<li id="to_heading6"><a href="#">Heading 6</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="divider"></li>
|
||||
<li id="current_outputs" class="dropdown-submenu"><a href="#">Current Output</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li id="collapse_current_output"><a href="#">Collapse</a></li>
|
||||
@ -172,6 +194,16 @@ class="notebook_app"
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">Kernel</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li id="int_kernel"
|
||||
title="Send KeyboardInterrupt (CTRL-C) to the Kernel">
|
||||
<a href="#">Interrupt</a></li>
|
||||
<li id="restart_kernel"
|
||||
title="Restart the Kernel">
|
||||
<a href="#">Restart</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">Help</a>
|
||||
<ul class="dropdown-menu" title="Opens in a new window">
|
||||
<li><a href="http://ipython.org/documentation.html" target="_blank">IPython Help</a></li>
|
||||
|
Loading…
Reference in New Issue
Block a user