##// END OF EJS Templates
update interact now that SelectionWidget.values is a dict
MinRK -
Show More
@@ -67,10 +67,9 b' def _widget_abbrev_single_value(o):'
67 if isinstance(o, string_types):
67 if isinstance(o, string_types):
68 return TextWidget(value=unicode_type(o))
68 return TextWidget(value=unicode_type(o))
69 elif isinstance(o, dict):
69 elif isinstance(o, dict):
70 labels = [unicode_type(k) for k in o]
70 # get a single value in a Python 2+3 way:
71 values = o.values()
71 value = next(iter(o.values()))
72 w = DropdownWidget(value=values[0], values=values, labels=labels)
72 return DropdownWidget(value=value, values=o)
73 return w
74 elif isinstance(o, bool):
73 elif isinstance(o, bool):
75 return CheckboxWidget(value=o)
74 return CheckboxWidget(value=o)
76 elif isinstance(o, float):
75 elif isinstance(o, float):
General Comments 0
You need to be logged in to leave comments. Login now