##// END OF EJS Templates
s/view_name/_view_name
Jonathan Frederic -
Show More
@@ -91,7 +91,7 b''
91 },
91 },
92
92
93 WidgetManager.prototype.create_view = function(model, options, view) {
93 WidgetManager.prototype.create_view = function(model, options, view) {
94 var view_name = model.get('view_name');
94 var view_name = model.get('_view_name');
95 var ViewType = WidgetManager._view_types[view_name];
95 var ViewType = WidgetManager._view_types[view_name];
96 if (ViewType !== undefined && ViewType !== null) {
96 if (ViewType !== undefined && ViewType !== null) {
97
97
@@ -119,7 +119,7 b' class Widget(LoggingConfigurable):'
119 #-------------------------------------------------------------------------
119 #-------------------------------------------------------------------------
120 model_name = Unicode('WidgetModel', help="""Name of the backbone model
120 model_name = Unicode('WidgetModel', help="""Name of the backbone model
121 registered in the front-end to create and sync this widget with.""")
121 registered in the front-end to create and sync this widget with.""")
122 view_name = Unicode(help="""Default view registered in the front-end
122 _view_name = Unicode(help="""Default view registered in the front-end
123 to use to represent the widget.""", sync=True)
123 to use to represent the widget.""", sync=True)
124 _comm = Instance('IPython.kernel.comm.Comm')
124 _comm = Instance('IPython.kernel.comm.Comm')
125
125
@@ -26,9 +26,9 b' class _BoolWidget(DOMWidget):'
26
26
27
27
28 class CheckBoxWidget(_BoolWidget):
28 class CheckBoxWidget(_BoolWidget):
29 view_name = Unicode('CheckBoxView', sync=True)
29 _view_name = Unicode('CheckBoxView', sync=True)
30
30
31
31
32 class ToggleButtonWidget(_BoolWidget):
32 class ToggleButtonWidget(_BoolWidget):
33 view_name = Unicode('ToggleButtonView', sync=True)
33 _view_name = Unicode('ToggleButtonView', sync=True)
34 No newline at end of file
34
@@ -21,7 +21,7 b' from IPython.utils.traitlets import Unicode, Bool'
21 # Classes
21 # Classes
22 #-----------------------------------------------------------------------------
22 #-----------------------------------------------------------------------------
23 class ButtonWidget(DOMWidget):
23 class ButtonWidget(DOMWidget):
24 view_name = Unicode('ButtonView', sync=True)
24 _view_name = Unicode('ButtonView', sync=True)
25
25
26 # Keys
26 # Keys
27 description = Unicode('', help="Description of the button (label).", sync=True)
27 description = Unicode('', help="Description of the button (label).", sync=True)
@@ -20,7 +20,7 b' from IPython.utils.traitlets import Unicode, Bool, List, Instance'
20 # Classes
20 # Classes
21 #-----------------------------------------------------------------------------
21 #-----------------------------------------------------------------------------
22 class ContainerWidget(DOMWidget):
22 class ContainerWidget(DOMWidget):
23 view_name = Unicode('ContainerView', sync=True)
23 _view_name = Unicode('ContainerView', sync=True)
24
24
25 # Keys, all private and managed by helper methods. Flexible box model
25 # Keys, all private and managed by helper methods. Flexible box model
26 # classes...
26 # classes...
@@ -50,7 +50,7 b' class ContainerWidget(DOMWidget):'
50
50
51
51
52 class PopupWidget(ContainerWidget):
52 class PopupWidget(ContainerWidget):
53 view_name = Unicode('PopupView', sync=True)
53 _view_name = Unicode('PopupView', sync=True)
54
54
55 description = Unicode(sync=True)
55 description = Unicode(sync=True)
56 button_text = Unicode(sync=True)
56 button_text = Unicode(sync=True)
@@ -42,18 +42,18 b' class _BoundedFloatWidget(_FloatWidget):'
42
42
43
43
44 class FloatTextWidget(_FloatWidget):
44 class FloatTextWidget(_FloatWidget):
45 view_name = Unicode('FloatTextView', sync=True)
45 _view_name = Unicode('FloatTextView', sync=True)
46
46
47
47
48 class BoundedFloatTextWidget(_BoundedFloatWidget):
48 class BoundedFloatTextWidget(_BoundedFloatWidget):
49 view_name = Unicode('FloatTextView', sync=True)
49 _view_name = Unicode('FloatTextView', sync=True)
50
50
51
51
52 class FloatSliderWidget(_BoundedFloatWidget):
52 class FloatSliderWidget(_BoundedFloatWidget):
53 view_name = Unicode('FloatSliderView', sync=True)
53 _view_name = Unicode('FloatSliderView', sync=True)
54 orientation = Enum([u'horizontal', u'vertical'], u'horizontal',
54 orientation = Enum([u'horizontal', u'vertical'], u'horizontal',
55 help="Vertical or horizontal.", sync=True)
55 help="Vertical or horizontal.", sync=True)
56
56
57
57
58 class FloatProgressWidget(_BoundedFloatWidget):
58 class FloatProgressWidget(_BoundedFloatWidget):
59 view_name = Unicode('ProgressView', sync=True)
59 _view_name = Unicode('ProgressView', sync=True)
@@ -23,7 +23,7 b' from IPython.utils.traitlets import Unicode, CUnicode, Bytes'
23 # Classes
23 # Classes
24 #-----------------------------------------------------------------------------
24 #-----------------------------------------------------------------------------
25 class ImageWidget(DOMWidget):
25 class ImageWidget(DOMWidget):
26 view_name = Unicode('ImageView', sync=True)
26 _view_name = Unicode('ImageView', sync=True)
27
27
28 # Define the custom state properties to sync with the front-end
28 # Define the custom state properties to sync with the front-end
29 format = Unicode('png', sync=True)
29 format = Unicode('png', sync=True)
@@ -42,18 +42,18 b' class _BoundedIntWidget(_IntWidget):'
42
42
43
43
44 class IntTextWidget(_IntWidget):
44 class IntTextWidget(_IntWidget):
45 view_name = Unicode('IntTextView', sync=True)
45 _view_name = Unicode('IntTextView', sync=True)
46
46
47
47
48 class BoundedIntTextWidget(_BoundedIntWidget):
48 class BoundedIntTextWidget(_BoundedIntWidget):
49 view_name = Unicode('IntTextView', sync=True)
49 _view_name = Unicode('IntTextView', sync=True)
50
50
51
51
52 class IntSliderWidget(_BoundedIntWidget):
52 class IntSliderWidget(_BoundedIntWidget):
53 view_name = Unicode('IntSliderView', sync=True)
53 _view_name = Unicode('IntSliderView', sync=True)
54 orientation = Enum([u'horizontal', u'vertical'], u'horizontal',
54 orientation = Enum([u'horizontal', u'vertical'], u'horizontal',
55 help="Vertical or horizontal.", sync=True)
55 help="Vertical or horizontal.", sync=True)
56
56
57
57
58 class IntProgressWidget(_BoundedIntWidget):
58 class IntProgressWidget(_BoundedIntWidget):
59 view_name = Unicode('ProgressView', sync=True)
59 _view_name = Unicode('ProgressView', sync=True)
@@ -85,16 +85,16 b' class _SelectionWidget(DOMWidget):'
85
85
86
86
87 class ToggleButtonsWidget(_SelectionWidget):
87 class ToggleButtonsWidget(_SelectionWidget):
88 view_name = Unicode('ToggleButtonsView', sync=True)
88 _view_name = Unicode('ToggleButtonsView', sync=True)
89
89
90
90
91 class DropdownWidget(_SelectionWidget):
91 class DropdownWidget(_SelectionWidget):
92 view_name = Unicode('DropdownView', sync=True)
92 _view_name = Unicode('DropdownView', sync=True)
93
93
94
94
95 class RadioButtonsWidget(_SelectionWidget):
95 class RadioButtonsWidget(_SelectionWidget):
96 view_name = Unicode('RadioButtonsView', sync=True)
96 _view_name = Unicode('RadioButtonsView', sync=True)
97
97
98
98
99 class ListBoxWidget(_SelectionWidget):
99 class ListBoxWidget(_SelectionWidget):
100 view_name = Unicode('ListBoxView', sync=True)
100 _view_name = Unicode('ListBoxView', sync=True)
@@ -51,8 +51,8 b' class _SelectionContainerWidget(ContainerWidget):'
51
51
52
52
53 class AccordionWidget(_SelectionContainerWidget):
53 class AccordionWidget(_SelectionContainerWidget):
54 view_name = Unicode('AccordionView', sync=True)
54 _view_name = Unicode('AccordionView', sync=True)
55
55
56
56
57 class TabWidget(_SelectionContainerWidget):
57 class TabWidget(_SelectionContainerWidget):
58 view_name = Unicode('TabView', sync=True)
58 _view_name = Unicode('TabView', sync=True)
@@ -26,22 +26,22 b' class _StringWidget(DOMWidget):'
26
26
27
27
28 class HTMLWidget(_StringWidget):
28 class HTMLWidget(_StringWidget):
29 view_name = Unicode('HTMLView', sync=True)
29 _view_name = Unicode('HTMLView', sync=True)
30
30
31
31
32 class LatexWidget(_StringWidget):
32 class LatexWidget(_StringWidget):
33 view_name = Unicode('LatexView', sync=True)
33 _view_name = Unicode('LatexView', sync=True)
34
34
35
35
36 class TextAreaWidget(_StringWidget):
36 class TextAreaWidget(_StringWidget):
37 view_name = Unicode('TextAreaView', sync=True)
37 _view_name = Unicode('TextAreaView', sync=True)
38
38
39 def scroll_to_bottom(self):
39 def scroll_to_bottom(self):
40 self.send({"method": "scroll_to_bottom"})
40 self.send({"method": "scroll_to_bottom"})
41
41
42
42
43 class TextBoxWidget(_StringWidget):
43 class TextBoxWidget(_StringWidget):
44 view_name = Unicode('TextBoxView', sync=True)
44 _view_name = Unicode('TextBoxView', sync=True)
45
45
46 def __init__(self, **kwargs):
46 def __init__(self, **kwargs):
47 super(TextBoxWidget, self).__init__(**kwargs)
47 super(TextBoxWidget, self).__init__(**kwargs)
General Comments 0
You need to be logged in to leave comments. Login now