##// END OF EJS Templates
A lot of bug fixes......
Jonathan Frederic -
Show More
@@ -117,7 +117,7 b' def display(*objs, **kwargs):'
117
117
118 # If _ipython_display_ is defined, use that to display this object. If
118 # If _ipython_display_ is defined, use that to display this object. If
119 # it returns NotImplemented, use the _repr_ logic (default).
119 # it returns NotImplemented, use the _repr_ logic (default).
120 if not hasattr(obj, '_ipython_display_') or isinstance(obj._ipython_display_(**kwargs), NotImplemented):
120 if not hasattr(obj, '_ipython_display_') or obj._ipython_display_(**kwargs) == NotImplemented:
121 if raw:
121 if raw:
122 publish_display_data('display', obj, metadata)
122 publish_display_data('display', obj, metadata)
123 else:
123 else:
@@ -15,7 +15,7 b''
15 **/
15 **/
16
16
17 define(["notebook/js/widgets/widget"], function(widget_manager){
17 define(["notebook/js/widgets/widget"], function(widget_manager){
18 var CheckboxView = IPython.DOMWidgetView.extend({
18 var CheckBoxView = IPython.DOMWidgetView.extend({
19
19
20 // Called when view is rendered.
20 // Called when view is rendered.
21 render : function(){
21 render : function(){
@@ -60,12 +60,12 b' define(["notebook/js/widgets/widget"], function(widget_manager){'
60 this.$label.show();
60 this.$label.show();
61 }
61 }
62 }
62 }
63 return CheckboxView.__super__.update.apply(this);
63 return CheckBoxView.__super__.update.apply(this);
64 },
64 },
65
65
66 });
66 });
67
67
68 widget_manager.register_widget_view('CheckboxView', CheckboxView);
68 widget_manager.register_widget_view('CheckBoxView', CheckBoxView);
69
69
70 var ToggleButtonView = IPython.DOMWidgetView.extend({
70 var ToggleButtonView = IPython.DOMWidgetView.extend({
71
71
@@ -166,7 +166,7 b' class Widget(LoggingConfigurable):'
166 def _handle_property_changed(self, name, old, new):
166 def _handle_property_changed(self, name, old, new):
167 """Called when a property has been changed."""
167 """Called when a property has been changed."""
168 # Make sure this isn't information that the front-end just sent us.
168 # Make sure this isn't information that the front-end just sent us.
169 if should_send_property(self, name, new):
169 if self.should_send_property(name, new):
170 # Send new state to front-end
170 # Send new state to front-end
171 self.send_state(key=name)
171 self.send_state(key=name)
172
172
@@ -27,6 +27,6 b' class CheckBoxWidget(DOMWidget):'
27 description = Unicode('', help="Description of the boolean (label).", sync=True)
27 description = Unicode('', help="Description of the boolean (label).", sync=True)
28 disabled = Bool(False, help="Enable or disable user changes.", sync=True)
28 disabled = Bool(False, help="Enable or disable user changes.", sync=True)
29
29
30 class ToggleButtonWidget(CheckboxWidget):
30 class ToggleButtonWidget(CheckBoxWidget):
31 view_name = Unicode('ToggleButtonView', sync=True)
31 view_name = Unicode('ToggleButtonView', sync=True)
32 No newline at end of file
32
@@ -29,13 +29,13 b' class ToggleButtonsWidget(DOMWidget):'
29 description = Unicode(help="Description of the value this widget represents", sync=True)
29 description = Unicode(help="Description of the value this widget represents", sync=True)
30
30
31
31
32 class DropdownWidget(SelectionWidget):
32 class DropdownWidget(ToggleButtonsWidget):
33 view_name = Unicode('DropdownView', sync=True)
33 view_name = Unicode('DropdownView', sync=True)
34
34
35
35
36 class RadioButtonsWidget(SelectionWidget):
36 class RadioButtonsWidget(ToggleButtonsWidget):
37 view_name = Unicode('RadioButtonsView', sync=True)
37 view_name = Unicode('RadioButtonsView', sync=True)
38
38
39
39
40 class ListBoxWidget(SelectionWidget):
40 class ListBoxWidget(ToggleButtonsWidget):
41 view_name = Unicode('ListBoxView', sync=True)
41 view_name = Unicode('ListBoxView', sync=True)
General Comments 0
You need to be logged in to leave comments. Login now