##// END OF EJS Templates
Merge pull request #5396 from ivanov/fix-5363...
Min RK -
r15995:41452895 merge
parent child Browse files
Show More
@@ -58,6 +58,9 b' var IPython = (function (IPython) {'
58 this.style();
58 this.style();
59 this.create_elements();
59 this.create_elements();
60 this.bind_events();
60 this.bind_events();
61 this.save_notebook = function() { // don't allow save until notebook_loaded
62 this.save_notebook_error(null, null, "Load failed, save is disabled");
63 };
61 };
64 };
62
65
63 /**
66 /**
@@ -1723,7 +1726,8 b' var IPython = (function (IPython) {'
1723 };
1726 };
1724
1727
1725 /**
1728 /**
1726 * Save this notebook on the server.
1729 * Save this notebook on the server. This becomes a notebook instance's
1730 * .save_notebook method *after* the entire notebook has been loaded.
1727 *
1731 *
1728 * @method save_notebook
1732 * @method save_notebook
1729 */
1733 */
@@ -2100,7 +2104,9 b' var IPython = (function (IPython) {'
2100 IPython.CellToolbar.global_show();
2104 IPython.CellToolbar.global_show();
2101 IPython.CellToolbar.activate_preset(this.metadata.celltoolbar);
2105 IPython.CellToolbar.activate_preset(this.metadata.celltoolbar);
2102 }
2106 }
2103
2107
2108 // now that we're fully loaded, it is safe to restore save functionality
2109 delete(this.save_notebook);
2104 $([IPython.events]).trigger('notebook_loaded.Notebook');
2110 $([IPython.events]).trigger('notebook_loaded.Notebook');
2105 };
2111 };
2106
2112
@@ -188,8 +188,8 b' var IPython = (function (IPython) {'
188 $([IPython.events]).on('notebook_saved.Notebook', function () {
188 $([IPython.events]).on('notebook_saved.Notebook', function () {
189 nnw.set_message("Notebook saved",2000);
189 nnw.set_message("Notebook saved",2000);
190 });
190 });
191 $([IPython.events]).on('notebook_save_failed.Notebook', function () {
191 $([IPython.events]).on('notebook_save_failed.Notebook', function (evt, xhr, status, data) {
192 nnw.set_message("Notebook save failed");
192 nnw.set_message(data || "Notebook save failed");
193 });
193 });
194
194
195 // Checkpoint events
195 // Checkpoint events
General Comments 0
You need to be logged in to leave comments. Login now