##// END OF EJS Templates
Added on_display callback
Added on_display callback

File last commit:

r14293:4be46e9c
r14330:5d5c3ecd
Show More
container.js
33 lines | 1.2 KiB | application/javascript | JavascriptLexer
Jonathan Frederic
Updated require js references, now absolute paths are used
r14285 require(["notebook/js/widget"], function(){
Jonathan Frederic
Lots of updates to widget(s) js...
r14263 var ContainerModel = IPython.WidgetModel.extend({});
Jonathan Frederic
Made registered model name look like other model names
r14275 IPython.notebook.widget_manager.register_widget_model('ContainerWidgetModel', ContainerModel);
Jonathan Frederic
Moved view code into model files
r14252
Jonathan Frederic
Lots of updates to widget(s) js...
r14263 var ContainerView = IPython.WidgetView.extend({
render : function(){
Jonathan Frederic
Attempt 1, HBox and VBox implementation.
r14268 this.$el = $('<div />')
Jonathan Frederic
Changed underscores in CSS names to dashes
r14293 .addClass('widget-container');
Jonathan Frederic
Lots of updates to widget(s) js...
r14263 },
Jonathan Frederic
Attempt 1, HBox and VBox implementation.
r14268 update : function(){
Jonathan Frederic
Flex box system improvements...
r14269
// Apply flexible box model properties by adding and removing
// corrosponding CSS classes.
// Defined in IPython/html/static/base/less/flexbox.less
var flex_properties = ['vbox', 'hbox', 'center', 'end', 'center'];
for (var index in flex_properties) {
if (this.model.get('_' + flex_properties[index])) {
this.$el.addClass(flex_properties[index]);
} else {
this.$el.removeClass(flex_properties[index]);
}
Jonathan Frederic
Attempt 1, HBox and VBox implementation.
r14268 }
Jonathan Frederic
Fixes that allow last commit to work.
r14279 return IPython.WidgetView.prototype.update.call(this);
Jonathan Frederic
Attempt 1, HBox and VBox implementation.
r14268 },
Jonathan Frederic
LOTS OF WIDGET CHANGES...
r14278
Jonathan Frederic
Changed parent/child api widgets
r14280 display_child : function(view) {
this.$el.append(view.$el);
Jonathan Frederic
LOTS OF WIDGET CHANGES...
r14278 },
Jonathan Frederic
Lots of updates to widget(s) js...
r14263 });
Jonathan Frederic
Moved view code into model files
r14252
Jonathan Frederic
Lots of updates to widget(s) js...
r14263 IPython.notebook.widget_manager.register_widget_view('ContainerView', ContainerView);
});