Remove unused code and debugging statements

This commit is contained in:
Jason Grout 2013-12-31 11:10:27 -07:00 committed by Jonathan Frederic
parent 72f7d2fe09
commit 18beaff887
6 changed files with 2 additions and 18 deletions

View File

@ -46,7 +46,6 @@ function(widget_manager, underscore, backbone){
send: function (content, callbacks) { send: function (content, callbacks) {
console.log('send',content, callbacks);
if (this.comm !== undefined) { if (this.comm !== undefined) {
var data = {method: 'custom', custom_content: content}; var data = {method: 'custom', custom_content: content};
this.comm.send(data, callbacks); this.comm.send(data, callbacks);
@ -172,7 +171,6 @@ function(widget_manager, underscore, backbone){
// Build a callback dict. // Build a callback dict.
cell_callbacks: function (cell) { cell_callbacks: function (cell) {
var callbacks = {}; var callbacks = {};
console.log('cell_callbacks A', cell);
if (cell === undefined) { if (cell === undefined) {
// Used the last modified view as the sender of the message. This // Used the last modified view as the sender of the message. This
// will insure that any python code triggered by the sent message // will insure that any python code triggered by the sent message
@ -184,7 +182,6 @@ function(widget_manager, underscore, backbone){
cell = null; cell = null;
} }
} }
console.log('cell_callbacks B', cell);
if (cell !== null) { if (cell !== null) {
// Try to get output handlers // Try to get output handlers
@ -215,7 +212,6 @@ function(widget_manager, underscore, backbone){
}, },
}; };
} }
console.log('constructed callbacks for',cell);
return callbacks; return callbacks;
}, },
}); });

View File

@ -231,12 +231,6 @@ define(["notebook/js/widgets/base"], function(widget_manager) {
return IPython.WidgetView.prototype.update.call(this); 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) { _get_selector_element: function(selector) {
// Since the modal actually isn't within the $el in the DOM, we need to extend // Since the modal actually isn't within the $el in the DOM, we need to extend

View File

@ -108,7 +108,6 @@ define(["notebook/js/widgets/base"], function(widget_manager){
}, },
render: function(){ render: function(){
console.log('rendering tabs', this);
var uuid = 'tabs'+IPython.utils.uuid(); var uuid = 'tabs'+IPython.utils.uuid();
var that = this; var that = this;
this.$tabs = $('<div />', {id: uuid}) this.$tabs = $('<div />', {id: uuid})

View File

@ -70,9 +70,6 @@ class BaseWidget(LoggingConfigurable):
self._msg_callbacks = [] self._msg_callbacks = []
super(BaseWidget, self).__init__(**kwargs) 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) self.on_trait_change(self._handle_property_changed, self.keys)
Widget._handle_widget_constructed(self) Widget._handle_widget_constructed(self)

View File

@ -23,8 +23,7 @@ class ContainerWidget(Widget):
target_name = Unicode('ContainerWidgetModel') target_name = Unicode('ContainerWidgetModel')
default_view_name = Unicode('ContainerView') default_view_name = Unicode('ContainerView')
children = []#List(Instance('IPython.html.widgets.widget.Widget')) children = [] #List(Instance('IPython.html.widgets.widget.Widget'))
_children_lists_attr = List(Unicode, ['children'])
# Keys, all private and managed by helper methods. Flexible box model # Keys, all private and managed by helper methods. Flexible box model
# classes... # classes...

View File

@ -29,8 +29,7 @@ class MulticontainerWidget(Widget):
_titles = Dict(help="Titles of the pages") _titles = Dict(help="Titles of the pages")
selected_index = Int(0) selected_index = Int(0)
children = []#List(Instance('IPython.html.widgets.widget.Widget')) children = [] #List(Instance('IPython.html.widgets.widget.Widget'))
_children_lists_attr = List(Unicode, ['children'])
# Public methods # Public methods
def set_title(self, index, title): def set_title(self, index, title):