Permalink
Browse files

Tidy form display

  • Loading branch information...
1 parent 605702e commit f149f4a1ab4f641096ffad99c4b2e33e32c32000 @systemed committed Oct 19, 2012
Showing with 7 additions and 2 deletions.
  1. +3 −2 net/systemeD/potlatch2/mapfeatures/editors/ChoiceEditor.mxml
  2. +4 −0 styles/Application.css
@@ -8,7 +8,7 @@
label="{fieldName}:"
styleName="titledEditor">
- <s:DropDownList id="inputBox" dataProvider="{choices}" selectedItem="{selectFromTag}"
+ <s:DropDownList id="inputBox" dataProvider="{choices}" selectedItem="{selectFromTag}" width="100%"
change="value = inputBox.selectedItem.value" labelField="label">
<s:itemRenderer>
<fx:Component>
@@ -18,6 +18,7 @@
<fx:Script><![CDATA[
public function getStyledLabel(choice:Choice):String {
if (choice.value==null) return "<font color='#a0a0a0'><i>"+choice.label+"</i></font>";
+ if (choice.description=="Unknown value") return "<i>Unknown</i> "+choice.label;
return choice.label;
}
]]></fx:Script>
@@ -61,7 +62,7 @@
_unknownChoice.description = "Unknown value";
_choices.addItem(_unknownChoice);
}
- _unknownChoice.label = "<i>Unknown:</i> "+Feature.htmlEscape(tagValue);
+ _unknownChoice.label = "("+Feature.htmlEscape(tagValue)+")";
_unknownChoice.icon = null;
_unknownChoice.value = tagValue;
@@ -63,6 +63,10 @@ s|FormItem s|Label#labelDisplay {
textAlign: right;
}
+s|DropDownList s|Label#labelDisplay {
+ textAlign: left;
+}
+
s|FormHeading {
fontSize: 12;
}

0 comments on commit f149f4a

Please sign in to comment.