Skip to content

Commit

Permalink
Disabling auto-save at exit.
Browse files Browse the repository at this point in the history
  • Loading branch information
ellisonbg committed Aug 13, 2011
1 parent df0ed78 commit 453bf75
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
10 changes: 10 additions & 0 deletions IPython/frontend/html/notebook/static/js/notebook.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -87,6 +87,16 @@ var IPython = (function (IPython) {
var new_margin = splitter_width + left_panel_width; var new_margin = splitter_width + left_panel_width;
$('div#notebook_panel').animate({marginLeft : new_margin + 'px'}, 'fast'); $('div#notebook_panel').animate({marginLeft : new_margin + 'px'}, 'fast');
}); });

$(window).bind('beforeunload', function () {
var kill_kernel = $('#kill_kernel').prop('checked');
if (kill_kernel) {
that.kernel.kill();
return "You are about to exit this notebook and kill the kernel.";
} else {
return "You are about the exit this notebook and leave the kernel running.";
};
});
}; };




Expand Down
11 changes: 0 additions & 11 deletions IPython/frontend/html/notebook/static/js/savewidget.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -32,17 +32,6 @@ var IPython = (function (IPython) {
this.element.find('button#save_notebook').click(function () { this.element.find('button#save_notebook').click(function () {
IPython.notebook.save_notebook(); IPython.notebook.save_notebook();
}); });

$(window).bind('beforeunload', function () {
var kill_kernel = $('#kill_kernel').prop('checked');
IPython.notebook.save_notebook();
if (kill_kernel) {
IPython.notebook.kernel.kill();
return "You are about to exit this notebook and kill the kernel.";
} else {
return "You are about the exit this notebook and leave the kernel running.";
};
});
}; };




Expand Down

0 comments on commit 453bf75

Please sign in to comment.