add 'Close and halt' in notebook filemenu

This commit is contained in:
Matthias BUSSONNIER 2012-05-06 14:41:29 +02:00
parent 13cf61912b
commit d549731d32
2 changed files with 6 additions and 0 deletions

View File

@ -68,6 +68,10 @@ var IPython = (function (IPython) {
this.element.find('button#print_notebook').click(function () {
IPython.print_widget.print_notebook();
});
this.element.find('#kill_and_exit').click(function () {
IPython.notebook.kernel.kill();
setTimeout(function(){window.close();}, 200);
});
// Edit
this.element.find('#cut_cell').click(function () {
IPython.notebook.cut_cell();

View File

@ -65,6 +65,8 @@ data-notebook-id={{notebook_id}}
</li>
<hr/>
<li id="print_notebook"><a href="/{{notebook_id}}/print" target="_blank">Print View</a></li>
<hr/>
<li id="kill_and_exit"><a href="#" >Close and halt</a></li>
</ul>
</li>
<li><a href="#">Edit</a>