From 96a219ede17b8b876990631e260ffbd01da92a11 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Tue, 18 Oct 2011 14:13:44 +0000 Subject: [PATCH] Add select to readonly types, display a value that isn't in the options as blank --- etemplate/js/et2_widget_selectbox.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/etemplate/js/et2_widget_selectbox.js b/etemplate/js/et2_widget_selectbox.js index b656648ebf..f15a1334a0 100644 --- a/etemplate/js/et2_widget_selectbox.js +++ b/etemplate/js/et2_widget_selectbox.js @@ -264,14 +264,18 @@ var et2_selectbox_ro = et2_selectbox.extend({ this.span.text(option.label); this.set_statustext(option.title); } - else + else if (typeof option == "string") { this.span.text(option); } + else + { + this.span.text(""); + } } }); -et2_register_widget(et2_selectbox_ro, ["menupopup_ro", "listbox_ro", "select-cat_ro", +et2_register_widget(et2_selectbox_ro, ["menupopup_ro", "listbox_ro", "select_ro", "select-cat_ro", "select-account_ro", "select-percent_ro", 'select-priority_ro', 'select-access_ro', 'select-country_ro', 'select-state_ro', 'select-year_ro', 'select-month_ro', 'select-day_ro', 'select-dow_ro', 'select-hour_ro', 'select-number_ro', 'select-app_ro',