##// END OF EJS Templates
Disabling auto-save at exit.
Brian E. Granger -
Show More
@@ -87,6 +87,16 b' var IPython = (function (IPython) {'
87 var new_margin = splitter_width + left_panel_width;
87 var new_margin = splitter_width + left_panel_width;
88 $('div#notebook_panel').animate({marginLeft : new_margin + 'px'}, 'fast');
88 $('div#notebook_panel').animate({marginLeft : new_margin + 'px'}, 'fast');
89 });
89 });
90
91 $(window).bind('beforeunload', function () {
92 var kill_kernel = $('#kill_kernel').prop('checked');
93 if (kill_kernel) {
94 that.kernel.kill();
95 return "You are about to exit this notebook and kill the kernel.";
96 } else {
97 return "You are about the exit this notebook and leave the kernel running.";
98 };
99 });
90 };
100 };
91
101
92
102
@@ -32,17 +32,6 b' var IPython = (function (IPython) {'
32 this.element.find('button#save_notebook').click(function () {
32 this.element.find('button#save_notebook').click(function () {
33 IPython.notebook.save_notebook();
33 IPython.notebook.save_notebook();
34 });
34 });
35
36 $(window).bind('beforeunload', function () {
37 var kill_kernel = $('#kill_kernel').prop('checked');
38 IPython.notebook.save_notebook();
39 if (kill_kernel) {
40 IPython.notebook.kernel.kill();
41 return "You are about to exit this notebook and kill the kernel.";
42 } else {
43 return "You are about the exit this notebook and leave the kernel running.";
44 };
45 });
46 };
35 };
47
36
48
37
General Comments 0
You need to be logged in to leave comments. Login now