From eaea930667ffaa0003aac12e506783ac408b7aed Mon Sep 17 00:00:00 2001 From: Jonathan Frederic Date: Fri, 15 Nov 2013 20:37:57 +0000 Subject: [PATCH] Added ListBoxView --- .../static/notebook/js/widgets/selection.js | 78 +++++++++++++++++++ .../html/static/notebook/less/widgets.less | 6 ++ examples/widgets/Part 1 - Basics.ipynb | 1 + 3 files changed, 85 insertions(+) diff --git a/IPython/html/static/notebook/js/widgets/selection.js b/IPython/html/static/notebook/js/widgets/selection.js index 77de43cd4..61c328faa 100644 --- a/IPython/html/static/notebook/js/widgets/selection.js +++ b/IPython/html/static/notebook/js/widgets/selection.js @@ -274,4 +274,82 @@ define(["notebook/js/widget"], function(widget_manager){ }); widget_manager.register_widget_view('ToggleButtonsView', ToggleButtonsView); + + var ListBoxView = IPython.WidgetView.extend({ + + // Called when view is rendered. + render : function(){ + this.$el + .addClass('widget-hbox') + .html(''); + this.$label = $('
') + .appendTo(this.$el) + .addClass('widget-hlabel') + .hide(); + this.$listbox = $('