From 9865220d531add526bb6c798e6dfd2b0267a0287 Mon Sep 17 00:00:00 2001 From: Jonathan Frederic Date: Fri, 17 Apr 2015 12:23:02 -0700 Subject: [PATCH] Remove widget/CodeCell coupling code. --- .../static/notebook/js/widgetarea.js | 116 ++++++++++++++++++ .../static/notebook/js/codecell.js | 108 +--------------- 2 files changed, 117 insertions(+), 107 deletions(-) create mode 100644 ipython_widgets/static/notebook/js/widgetarea.js diff --git a/ipython_widgets/static/notebook/js/widgetarea.js b/ipython_widgets/static/notebook/js/widgetarea.js new file mode 100644 index 000000000..75b93ba2d --- /dev/null +++ b/ipython_widgets/static/notebook/js/widgetarea.js @@ -0,0 +1,116 @@ + +// Events that this code should rely on. +// delete.Cell +// selected_cell_type_changed.Notebook +// create.Cell + + this.widget_views = []; + this._widgets_live = true; + + var widget_area = $('
') + .addClass('widget-area') + .hide(); + this.widget_area = widget_area; + var widget_prompt = $('
') + .addClass('prompt') + .appendTo(widget_area); + var widget_subarea = $('
') + .addClass('widget-subarea') + .appendTo(widget_area); + this.widget_subarea = widget_subarea; + var that = this; + var widget_clear_buton = $('