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