Show More
@@ -60,7 +60,7 b' define(["notebook/js/widgets/widget"], function(WidgetManager) {' | |||||
60 | WidgetManager.register_widget_view('ContainerView', ContainerView); |
|
60 | WidgetManager.register_widget_view('ContainerView', ContainerView); | |
61 |
|
61 | |||
62 |
|
62 | |||
63 |
var |
|
63 | var PopupView = IPython.DOMWidgetView.extend({ | |
64 | render: function(){ |
|
64 | render: function(){ | |
65 | // Called when view is rendered. |
|
65 | // Called when view is rendered. | |
66 | var that = this; |
|
66 | var that = this; | |
@@ -244,7 +244,7 b' define(["notebook/js/widgets/widget"], function(WidgetManager) {' | |||||
244 | this.show(); |
|
244 | this.show(); | |
245 | } |
|
245 | } | |
246 |
|
246 | |||
247 |
return |
|
247 | return PopupView.__super__.update.apply(this); | |
248 | }, |
|
248 | }, | |
249 |
|
249 | |||
250 | _get_selector_element: function(selector) { |
|
250 | _get_selector_element: function(selector) { | |
@@ -264,9 +264,9 b' define(["notebook/js/widgets/widget"], function(WidgetManager) {' | |||||
264 | return this.$window.find(selector.substring(6)); |
|
264 | return this.$window.find(selector.substring(6)); | |
265 | } |
|
265 | } | |
266 | } else { |
|
266 | } else { | |
267 |
return |
|
267 | return PopupView.__super__._get_selector_element.apply(this, [selector]); | |
268 | } |
|
268 | } | |
269 | }, |
|
269 | }, | |
270 | }); |
|
270 | }); | |
271 |
WidgetManager.register_widget_view(' |
|
271 | WidgetManager.register_widget_view('PopupView', PopupView); | |
272 | }); |
|
272 | }); |
@@ -2,7 +2,7 b' from .widget import Widget, DOMWidget' | |||||
2 |
|
2 | |||
3 | from .widget_bool import CheckBoxWidget, ToggleButtonWidget |
|
3 | from .widget_bool import CheckBoxWidget, ToggleButtonWidget | |
4 | from .widget_button import ButtonWidget |
|
4 | from .widget_button import ButtonWidget | |
5 |
from .widget_container import ContainerWidget, |
|
5 | from .widget_container import ContainerWidget, PopupWidget | |
6 | from .widget_float import FloatTextWidget, BoundedFloatTextWidget, FloatSliderWidget, FloatProgressWidget |
|
6 | from .widget_float import FloatTextWidget, BoundedFloatTextWidget, FloatSliderWidget, FloatProgressWidget | |
7 | from .widget_image import ImageWidget |
|
7 | from .widget_image import ImageWidget | |
8 | from .widget_int import IntTextWidget, BoundedIntTextWidget, IntSliderWidget, IntProgressWidget |
|
8 | from .widget_int import IntTextWidget, BoundedIntTextWidget, IntSliderWidget, IntProgressWidget |
@@ -45,8 +45,8 b' class ContainerWidget(DOMWidget):' | |||||
45 | self._children = children |
|
45 | self._children = children | |
46 |
|
46 | |||
47 |
|
47 | |||
48 |
class |
|
48 | class PopupWidget(ContainerWidget): | |
49 |
view_name = Unicode(' |
|
49 | view_name = Unicode('PopupView', sync=True) | |
50 |
|
50 | |||
51 | description = Unicode(sync=True) |
|
51 | description = Unicode(sync=True) | |
52 | button_text = Unicode(sync=True) |
|
52 | button_text = Unicode(sync=True) |
General Comments 0
You need to be logged in to leave comments.
Login now