From 5e20d457cdcbbe522ccecd5b48ababaa92526946 Mon Sep 17 00:00:00 2001 From: MinRK Date: Fri, 5 Jul 2013 22:05:53 -0700 Subject: [PATCH] add create.Cell and delete.Cell js events The events fire after the cell has been created or deleted. closes #3154 --- IPython/html/static/notebook/js/notebook.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/IPython/html/static/notebook/js/notebook.js b/IPython/html/static/notebook/js/notebook.js index 5fedfec05..ff6f32184 100644 --- a/IPython/html/static/notebook/js/notebook.js +++ b/IPython/html/static/notebook/js/notebook.js @@ -737,6 +737,7 @@ var IPython = (function (IPython) { this.undelete_index = i; this.undelete_below = false; }; + $([IPython.events]).trigger('delete.Cell', {'cell': cell, 'index': i}); this.set_dirty(true); }; return this; @@ -777,6 +778,7 @@ var IPython = (function (IPython) { if(this._insert_element_at_index(cell.element,index)){ cell.render(); this.select(this.find_cell_index(cell)); + $([IPython.events]).trigger('create.Cell', {'cell': cell, 'index': index}); this.set_dirty(true); } }