From 6a372a4c6619391948f5b0eb10270b255fec8550 Mon Sep 17 00:00:00 2001 From: Nicholas Bollweg Date: Thu, 29 Jan 2015 21:05:31 -0500 Subject: [PATCH 1/3] squashing the whitespace changes --- .../static/widgets/js/widget_selection.js | 60 ++++++-- .../html/tests/widgets/widget_selection.js | 14 +- IPython/html/widgets/__init__.py | 2 +- IPython/html/widgets/interaction.py | 4 +- .../html/widgets/tests/test_interaction.py | 68 ++++++++- IPython/html/widgets/widget_selection.py | 140 +++++++++++++----- .../Export As (nbconvert).ipynb | 2 +- .../Interactive Widgets/Widget List.ipynb | 46 +++++- .../Interactive Widgets/Widget Styling.ipynb | 4 +- 9 files changed, 262 insertions(+), 78 deletions(-) diff --git a/IPython/html/static/widgets/js/widget_selection.js b/IPython/html/static/widgets/js/widget_selection.js index f00e79933..24aad9f07 100644 --- a/IPython/html/static/widgets/js/widget_selection.js +++ b/IPython/html/static/widgets/js/widget_selection.js @@ -5,8 +5,9 @@ define([ "widgets/js/widget", "base/js/utils", "jquery", + "underscore", "bootstrap", -], function(widget, utils, $){ +], function(widget, utils, $, _){ var DropdownView = widget.DOMWidgetView.extend({ render : function(){ @@ -52,19 +53,19 @@ define([ /** * Update the contents of this view * - * Called when the model is changed. The model may have been + * Called when the model is changed. The model may have been * changed by another view or by a state update from the back-end. */ if (options === undefined || options.updated_view != this) { - var selected_item_text = this.model.get('value_name'); + var selected_item_text = this.model.get('selected_label'); if (selected_item_text.trim().length === 0) { this.$droplabel.html(" "); } else { this.$droplabel.text(selected_item_text); } - var items = this.model.get('_value_names'); + var items = this.model.get('_options_labels'); var $replace_droplist = $('