mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-27 04:20:22 +08:00
s/ModalView/PopupView
This commit is contained in:
parent
7ce9f37b17
commit
046280b51a
@ -60,7 +60,7 @@ define(["notebook/js/widgets/widget"], function(WidgetManager) {
|
||||
WidgetManager.register_widget_view('ContainerView', ContainerView);
|
||||
|
||||
|
||||
var ModalView = IPython.DOMWidgetView.extend({
|
||||
var PopupView = IPython.DOMWidgetView.extend({
|
||||
render: function(){
|
||||
// Called when view is rendered.
|
||||
var that = this;
|
||||
@ -244,7 +244,7 @@ define(["notebook/js/widgets/widget"], function(WidgetManager) {
|
||||
this.show();
|
||||
}
|
||||
|
||||
return ModalView.__super__.update.apply(this);
|
||||
return PopupView.__super__.update.apply(this);
|
||||
},
|
||||
|
||||
_get_selector_element: function(selector) {
|
||||
@ -264,9 +264,9 @@ define(["notebook/js/widgets/widget"], function(WidgetManager) {
|
||||
return this.$window.find(selector.substring(6));
|
||||
}
|
||||
} else {
|
||||
return ModalView.__super__._get_selector_element.apply(this, [selector]);
|
||||
return PopupView.__super__._get_selector_element.apply(this, [selector]);
|
||||
}
|
||||
},
|
||||
});
|
||||
WidgetManager.register_widget_view('ModalView', ModalView);
|
||||
WidgetManager.register_widget_view('PopupView', PopupView);
|
||||
});
|
||||
|
@ -2,7 +2,7 @@ from .widget import Widget, DOMWidget
|
||||
|
||||
from .widget_bool import CheckBoxWidget, ToggleButtonWidget
|
||||
from .widget_button import ButtonWidget
|
||||
from .widget_container import ContainerWidget, ModalWidget
|
||||
from .widget_container import ContainerWidget, PopupWidget
|
||||
from .widget_float import FloatTextWidget, BoundedFloatTextWidget, FloatSliderWidget, FloatProgressWidget
|
||||
from .widget_image import ImageWidget
|
||||
from .widget_int import IntTextWidget, BoundedIntTextWidget, IntSliderWidget, IntProgressWidget
|
||||
|
@ -45,8 +45,8 @@ class ContainerWidget(DOMWidget):
|
||||
self._children = children
|
||||
|
||||
|
||||
class ModalWidget(ContainerWidget):
|
||||
view_name = Unicode('ModalView', sync=True)
|
||||
class PopupWidget(ContainerWidget):
|
||||
view_name = Unicode('PopupView', sync=True)
|
||||
|
||||
description = Unicode(sync=True)
|
||||
button_text = Unicode(sync=True)
|
||||
|
Loading…
Reference in New Issue
Block a user