From fc3553636d6fda94a9df5befd8eee0c77b8f40f3 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Wed, 23 May 2012 23:54:30 +0000 Subject: [PATCH] Make sure options get set, if provided to constructor --- etemplate/js/et2_widget_selectbox.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/etemplate/js/et2_widget_selectbox.js b/etemplate/js/et2_widget_selectbox.js index 109568e09a..5aa5ac4d67 100644 --- a/etemplate/js/et2_widget_selectbox.js +++ b/etemplate/js/et2_widget_selectbox.js @@ -515,6 +515,7 @@ var et2_selectbox_ro = et2_selectbox.extend([et2_IDetachedDOM], { this.supportedWidgetClasses = []; this.optionValues = {}; + if(this.options.select_options) this.set_select_options(this.options.select_options); }, createInputWidget: function() { @@ -577,7 +578,7 @@ var et2_selectbox_ro = et2_selectbox.extend([et2_IDetachedDOM], { return; } var option = this.optionValues[_value]; - if (typeof option === 'object') + if (typeof option === 'object' && option != null) { this.span.text(option.label); this.set_statustext(option.title);