From f62703e5f2d2c8717517fa6a62a2882e681c163f 2014-01-16 10:55:58 From: Jonathan Frederic Date: 2014-01-16 10:55:58 Subject: [PATCH] Add selection widget --- diff --git a/IPython/html/widgets/selection/__init__.py b/IPython/html/widgets/selection/__init__.py new file mode 100644 index 0000000..6d2fc06 --- /dev/null +++ b/IPython/html/widgets/selection/__init__.py @@ -0,0 +1 @@ +from widget import SelectionWidget \ No newline at end of file diff --git a/IPython/html/widgets/selection/model.js b/IPython/html/widgets/selection/model.js new file mode 100644 index 0000000..7741f82 --- /dev/null +++ b/IPython/html/widgets/selection/model.js @@ -0,0 +1,2 @@ +var SelectionWidgetModel = IPython.WidgetModel.extend({}); +IPython.notebook.widget_manager.register_widget_model('SelectionWidgetModel', SelectionWidgetModel); diff --git a/IPython/html/widgets/selection/view_dropdown.js b/IPython/html/widgets/selection/view_dropdown.js new file mode 100644 index 0000000..45c2ab7 --- /dev/null +++ b/IPython/html/widgets/selection/view_dropdown.js @@ -0,0 +1,62 @@ +var DropdownView = IPython.WidgetView.extend({ + + // Called when view is rendered. + render : function(){ + + this.$el + .html('') + .addClass(this.model.comm.comm_id); + this.$buttongroup = $('
') + .addClass('btn-group') + .appendTo(this.$el); + this.$droplabel = $('