Show More
@@ -46,7 +46,6 b' function(widget_manager, underscore, backbone){' | |||||
46 |
|
46 | |||
47 |
|
47 | |||
48 | send: function (content, callbacks) { |
|
48 | send: function (content, callbacks) { | |
49 | console.log('send',content, callbacks); |
|
|||
50 | if (this.comm !== undefined) { |
|
49 | if (this.comm !== undefined) { | |
51 | var data = {method: 'custom', custom_content: content}; |
|
50 | var data = {method: 'custom', custom_content: content}; | |
52 | this.comm.send(data, callbacks); |
|
51 | this.comm.send(data, callbacks); | |
@@ -172,7 +171,6 b' function(widget_manager, underscore, backbone){' | |||||
172 | // Build a callback dict. |
|
171 | // Build a callback dict. | |
173 | cell_callbacks: function (cell) { |
|
172 | cell_callbacks: function (cell) { | |
174 | var callbacks = {}; |
|
173 | var callbacks = {}; | |
175 | console.log('cell_callbacks A', cell); |
|
|||
176 | if (cell === undefined) { |
|
174 | if (cell === undefined) { | |
177 | // Used the last modified view as the sender of the message. This |
|
175 | // Used the last modified view as the sender of the message. This | |
178 | // will insure that any python code triggered by the sent message |
|
176 | // will insure that any python code triggered by the sent message | |
@@ -184,7 +182,6 b' function(widget_manager, underscore, backbone){' | |||||
184 | cell = null; |
|
182 | cell = null; | |
185 | } |
|
183 | } | |
186 | } |
|
184 | } | |
187 | console.log('cell_callbacks B', cell); |
|
|||
188 | if (cell !== null) { |
|
185 | if (cell !== null) { | |
189 |
|
186 | |||
190 | // Try to get output handlers |
|
187 | // Try to get output handlers | |
@@ -215,7 +212,6 b' function(widget_manager, underscore, backbone){' | |||||
215 | }, |
|
212 | }, | |
216 | }; |
|
213 | }; | |
217 | } |
|
214 | } | |
218 | console.log('constructed callbacks for',cell); |
|
|||
219 | return callbacks; |
|
215 | return callbacks; | |
220 | }, |
|
216 | }, | |
221 | }); |
|
217 | }); |
@@ -230,12 +230,6 b' define(["notebook/js/widgets/base"], function(widget_manager) {' | |||||
230 |
|
230 | |||
231 | return IPython.WidgetView.prototype.update.call(this); |
|
231 | return IPython.WidgetView.prototype.update.call(this); | |
232 | }, |
|
232 | }, | |
233 |
|
||||
234 | add_child_view: function(attr, view) { |
|
|||
235 | if (attr==='children') { |
|
|||
236 | this.$body.append(view.$el); |
|
|||
237 | } |
|
|||
238 | }, |
|
|||
239 |
|
233 | |||
240 | _get_selector_element: function(selector) { |
|
234 | _get_selector_element: function(selector) { | |
241 |
|
235 |
@@ -70,7 +70,6 b' define(["notebook/js/widgets/base"], function(widget_manager){' | |||||
70 | this.$slider.slider('option', 'orientation', orientation); |
|
70 | this.$slider.slider('option', 'orientation', orientation); | |
71 | value = this.model.get('value'); |
|
71 | value = this.model.get('value'); | |
72 | this.$slider.slider('option', 'value', value); |
|
72 | this.$slider.slider('option', 'value', value); | |
73 | console.log('updating value',value) |
|
|||
74 |
|
73 | |||
75 | // Use the right CSS classes for vertical & horizontal sliders |
|
74 | // Use the right CSS classes for vertical & horizontal sliders | |
76 | if (orientation=='vertical') { |
|
75 | if (orientation=='vertical') { | |
@@ -110,7 +109,6 b' define(["notebook/js/widgets/base"], function(widget_manager){' | |||||
110 | events: { "slide" : "handleSliderChange" }, |
|
109 | events: { "slide" : "handleSliderChange" }, | |
111 | handleSliderChange: function(e, ui) { |
|
110 | handleSliderChange: function(e, ui) { | |
112 | this.model.set('value', ui.value); |
|
111 | this.model.set('value', ui.value); | |
113 | console.log('triggered value change', ui.value, this.model); |
|
|||
114 | this.touch(); |
|
112 | this.touch(); | |
115 | }, |
|
113 | }, | |
116 | }); |
|
114 | }); |
@@ -108,7 +108,6 b' define(["notebook/js/widgets/base"], function(widget_manager){' | |||||
108 | }, |
|
108 | }, | |
109 |
|
109 | |||
110 | render: function(){ |
|
110 | render: function(){ | |
111 | console.log('rendering tabs', this); |
|
|||
112 | var uuid = 'tabs'+IPython.utils.uuid(); |
|
111 | var uuid = 'tabs'+IPython.utils.uuid(); | |
113 | var that = this; |
|
112 | var that = this; | |
114 | this.$tabs = $('<div />', {id: uuid}) |
|
113 | this.$tabs = $('<div />', {id: uuid}) |
@@ -70,9 +70,6 b' class BaseWidget(LoggingConfigurable):' | |||||
70 | self._msg_callbacks = [] |
|
70 | self._msg_callbacks = [] | |
71 | super(BaseWidget, self).__init__(**kwargs) |
|
71 | super(BaseWidget, self).__init__(**kwargs) | |
72 |
|
72 | |||
73 | # Register after init to allow default values to be specified |
|
|||
74 | # TODO: register three different handlers, one for each list, and abstract out the common parts |
|
|||
75 | #print self.keys, self._children_attr, self._children_lists_attr |
|
|||
76 | self.on_trait_change(self._handle_property_changed, self.keys) |
|
73 | self.on_trait_change(self._handle_property_changed, self.keys) | |
77 | Widget._handle_widget_constructed(self) |
|
74 | Widget._handle_widget_constructed(self) | |
78 |
|
75 |
@@ -23,8 +23,7 b' class ContainerWidget(Widget):' | |||||
23 | target_name = Unicode('ContainerWidgetModel') |
|
23 | target_name = Unicode('ContainerWidgetModel') | |
24 | default_view_name = Unicode('ContainerView') |
|
24 | default_view_name = Unicode('ContainerView') | |
25 |
|
25 | |||
26 | children = []#List(Instance('IPython.html.widgets.widget.Widget')) |
|
26 | children = [] #List(Instance('IPython.html.widgets.widget.Widget')) | |
27 | _children_lists_attr = List(Unicode, ['children']) |
|
|||
28 |
|
27 | |||
29 | # Keys, all private and managed by helper methods. Flexible box model |
|
28 | # Keys, all private and managed by helper methods. Flexible box model | |
30 | # classes... |
|
29 | # classes... |
@@ -29,8 +29,7 b' class MulticontainerWidget(Widget):' | |||||
29 | _titles = Dict(help="Titles of the pages") |
|
29 | _titles = Dict(help="Titles of the pages") | |
30 | selected_index = Int(0) |
|
30 | selected_index = Int(0) | |
31 |
|
31 | |||
32 | children = []#List(Instance('IPython.html.widgets.widget.Widget')) |
|
32 | children = [] #List(Instance('IPython.html.widgets.widget.Widget')) | |
33 | _children_lists_attr = List(Unicode, ['children']) |
|
|||
34 |
|
33 | |||
35 | # Public methods |
|
34 | # Public methods | |
36 | def set_title(self, index, title): |
|
35 | def set_title(self, index, title): |
General Comments 0
You need to be logged in to leave comments.
Login now