From 793dcac0443ce38e6ebe1e181a9f61714cc60a6f 2014-01-16 10:57:10 From: Jason Grout Date: 2014-01-16 10:57:10 Subject: [PATCH] Remove unused code and debugging statements --- diff --git a/IPython/html/static/notebook/js/widgets/base.js b/IPython/html/static/notebook/js/widgets/base.js index d453055..a8218b5 100644 --- a/IPython/html/static/notebook/js/widgets/base.js +++ b/IPython/html/static/notebook/js/widgets/base.js @@ -46,7 +46,6 @@ function(widget_manager, underscore, backbone){ send: function (content, callbacks) { - console.log('send',content, callbacks); if (this.comm !== undefined) { var data = {method: 'custom', custom_content: content}; this.comm.send(data, callbacks); @@ -172,7 +171,6 @@ function(widget_manager, underscore, backbone){ // Build a callback dict. cell_callbacks: function (cell) { var callbacks = {}; - console.log('cell_callbacks A', cell); if (cell === undefined) { // Used the last modified view as the sender of the message. This // will insure that any python code triggered by the sent message @@ -184,7 +182,6 @@ function(widget_manager, underscore, backbone){ cell = null; } } - console.log('cell_callbacks B', cell); if (cell !== null) { // Try to get output handlers @@ -215,7 +212,6 @@ function(widget_manager, underscore, backbone){ }, }; } - console.log('constructed callbacks for',cell); return callbacks; }, }); diff --git a/IPython/html/static/notebook/js/widgets/container.js b/IPython/html/static/notebook/js/widgets/container.js index aba568f..85cd444 100644 --- a/IPython/html/static/notebook/js/widgets/container.js +++ b/IPython/html/static/notebook/js/widgets/container.js @@ -230,12 +230,6 @@ define(["notebook/js/widgets/base"], function(widget_manager) { return IPython.WidgetView.prototype.update.call(this); }, - - add_child_view: function(attr, view) { - if (attr==='children') { - this.$body.append(view.$el); - } - }, _get_selector_element: function(selector) { diff --git a/IPython/html/static/notebook/js/widgets/float_range.js b/IPython/html/static/notebook/js/widgets/float_range.js index 735a8b8..e9f29a3 100644 --- a/IPython/html/static/notebook/js/widgets/float_range.js +++ b/IPython/html/static/notebook/js/widgets/float_range.js @@ -70,7 +70,6 @@ define(["notebook/js/widgets/base"], function(widget_manager){ this.$slider.slider('option', 'orientation', orientation); value = this.model.get('value'); this.$slider.slider('option', 'value', value); - console.log('updating value',value) // Use the right CSS classes for vertical & horizontal sliders if (orientation=='vertical') { @@ -110,7 +109,6 @@ define(["notebook/js/widgets/base"], function(widget_manager){ events: { "slide" : "handleSliderChange" }, handleSliderChange: function(e, ui) { this.model.set('value', ui.value); - console.log('triggered value change', ui.value, this.model); this.touch(); }, }); diff --git a/IPython/html/static/notebook/js/widgets/multicontainer.js b/IPython/html/static/notebook/js/widgets/multicontainer.js index e3202cb..09a2ef5 100644 --- a/IPython/html/static/notebook/js/widgets/multicontainer.js +++ b/IPython/html/static/notebook/js/widgets/multicontainer.js @@ -108,7 +108,6 @@ define(["notebook/js/widgets/base"], function(widget_manager){ }, render: function(){ - console.log('rendering tabs', this); var uuid = 'tabs'+IPython.utils.uuid(); var that = this; this.$tabs = $('
', {id: uuid}) diff --git a/IPython/html/widgets/widget.py b/IPython/html/widgets/widget.py index b1f2909..74bf6c3 100644 --- a/IPython/html/widgets/widget.py +++ b/IPython/html/widgets/widget.py @@ -70,9 +70,6 @@ class BaseWidget(LoggingConfigurable): self._msg_callbacks = [] super(BaseWidget, self).__init__(**kwargs) - # Register after init to allow default values to be specified - # TODO: register three different handlers, one for each list, and abstract out the common parts - #print self.keys, self._children_attr, self._children_lists_attr self.on_trait_change(self._handle_property_changed, self.keys) Widget._handle_widget_constructed(self) diff --git a/IPython/html/widgets/widget_container.py b/IPython/html/widgets/widget_container.py index 754a967..b1528ab 100644 --- a/IPython/html/widgets/widget_container.py +++ b/IPython/html/widgets/widget_container.py @@ -23,8 +23,7 @@ class ContainerWidget(Widget): target_name = Unicode('ContainerWidgetModel') default_view_name = Unicode('ContainerView') - children = []#List(Instance('IPython.html.widgets.widget.Widget')) - _children_lists_attr = List(Unicode, ['children']) + children = [] #List(Instance('IPython.html.widgets.widget.Widget')) # Keys, all private and managed by helper methods. Flexible box model # classes... diff --git a/IPython/html/widgets/widget_multicontainer.py b/IPython/html/widgets/widget_multicontainer.py index 9835c08..149a6b0 100644 --- a/IPython/html/widgets/widget_multicontainer.py +++ b/IPython/html/widgets/widget_multicontainer.py @@ -29,8 +29,7 @@ class MulticontainerWidget(Widget): _titles = Dict(help="Titles of the pages") selected_index = Int(0) - children = []#List(Instance('IPython.html.widgets.widget.Widget')) - _children_lists_attr = List(Unicode, ['children']) + children = [] #List(Instance('IPython.html.widgets.widget.Widget')) # Public methods def set_title(self, index, title):