container.js
18 lines
| 651 B
| application/javascript
|
JavascriptLexer
Jonathan Frederic
|
r14263 | require(["notebook/js/widget"], function(){ | |
var ContainerModel = IPython.WidgetModel.extend({}); | |||
IPython.notebook.widget_manager.register_widget_model('container_widget', ContainerModel); | |||
Jonathan Frederic
|
r14252 | ||
Jonathan Frederic
|
r14263 | var ContainerView = IPython.WidgetView.extend({ | |
render : function(){ | |||
this.$el.html(''); | |||
this.$container = $('<div />') | |||
.addClass('container') | |||
.addClass(this.model.comm.comm_id); | |||
this.$el.append(this.$container); | |||
}, | |||
update : function(){}, | |||
}); | |||
Jonathan Frederic
|
r14252 | ||
Jonathan Frederic
|
r14263 | IPython.notebook.widget_manager.register_widget_view('ContainerView', ContainerView); | |
}); |