##// END OF EJS Templates
Making Notebook.set_dirty an event so CodeCell can set it....
Brian Granger -
Show More
@@ -170,7 +170,7 b' var IPython = (function (IPython) {'
170 CodeCell.prototype._handle_execute_reply = function (content) {
170 CodeCell.prototype._handle_execute_reply = function (content) {
171 this.set_input_prompt(content.execution_count);
171 this.set_input_prompt(content.execution_count);
172 this.element.removeClass("running");
172 this.element.removeClass("running");
173 // this.dirty = true;
173 $([IPython.events]).trigger('set_dirty.Notebook', {'value': true});
174 }
174 }
175
175
176 CodeCell.prototype._handle_set_next_input = function (text) {
176 CodeCell.prototype._handle_set_next_input = function (text) {
@@ -68,6 +68,10 b' var IPython = (function (IPython) {'
68 that.dirty = true;
68 that.dirty = true;
69 });
69 });
70
70
71 $([IPython.events]).on('set_dirty.Notebook', function (event, data) {
72 that.dirty = data.value;
73 });
74
71 $([IPython.events]).on('select.Cell', function (event, data) {
75 $([IPython.events]).on('select.Cell', function (event, data) {
72 var index = that.find_cell_index(data.cell);
76 var index = that.find_cell_index(data.cell);
73 that.select(index);
77 that.select(index);
General Comments 0
You need to be logged in to leave comments. Login now