Show More
@@ -0,0 +1,1 b'' | |||||
|
1 | from widget import ContainerWidget No newline at end of file |
@@ -0,0 +1,2 b'' | |||||
|
1 | var ContainerModel = IPython.WidgetModel.extend({}); | |||
|
2 | IPython.notebook.widget_manager.register_widget_model('container_widget', ContainerModel); |
@@ -0,0 +1,14 b'' | |||||
|
1 | var ContainerView = IPython.WidgetView.extend({ | |||
|
2 | ||||
|
3 | render : function(){ | |||
|
4 | this.$el.html(''); | |||
|
5 | this.$container = $('<div />') | |||
|
6 | .addClass('container') | |||
|
7 | .addClass(this.model.comm.comm_id); | |||
|
8 | this.$el.append(this.$container); | |||
|
9 | }, | |||
|
10 | ||||
|
11 | update : function(){}, | |||
|
12 | }); | |||
|
13 | ||||
|
14 | IPython.notebook.widget_manager.register_widget_view('ContainerView', ContainerView); |
@@ -0,0 +1,11 b'' | |||||
|
1 | import os | |||
|
2 | ||||
|
3 | from ..widget import Widget | |||
|
4 | from IPython.utils.traitlets import Unicode | |||
|
5 | from IPython.utils.javascript import display_all_js | |||
|
6 | ||||
|
7 | class ContainerWidget(Widget): | |||
|
8 | target_name = Unicode('container_widget') | |||
|
9 | default_view_name = Unicode('ContainerView') | |||
|
10 | ||||
|
11 | _keys = [] |
General Comments 0
You need to be logged in to leave comments.
Login now